[seqfan] Re: zig-zag pseudoprimes

Richard Mathar mathar at strw.leidenuniv.nl
Wed Sep 1 16:54:43 CEST 2010

http://list.seqfan.eu/pipermail/seqfan/2010-September/005903.html :
vs> Nevertheless, I did not understand if you really obtained that, e.g., A000111(561)==1(mod 561)?

Yes. I naively trusted that the following Maple implementation works 
on my computer (one of the two branches of your problem in comments):

A000111 := proc(n)
        2^n*abs( euler(n,1/2)+euler(n,1)) ;
end proc:
for n from 1 do
        if modp(A000111(n),n) = 1 and modp(n,4) = 1 and not isprime(n) then
        # if modp(A000111(n),n) = n-1 and modp(n,4) = 3 and not isprime(n) then
                printf("%d,\n",n) ;
        end if;
end do:

It is not unusual that A000111(n) == 1 (mod n), if we consider the
statistics in the following sequence of A000111(n) mod n, n>=1:


This is the reason why the first sequence I showed in
is rather dense and filled four lines until reaching 400. 561 comes later
in the same sequence.


More information about the SeqFan mailing list