# [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:

0,1,2,1,1,1,6,1,7,1,10,5,1,1,2,1,1,7,18,5,19,1,22,17,16,1,2,5,1,1,30,1,31,1,
12,29,1,1,2,25,1,19,42,5,16,1,46,17,22,21

This is the reason why the first sequence I showed in
http://list.seqfan.eu/pipermail/seqfan/2010-September/005898.html
is rather dense and filled four lines until reaching 400. 561 comes later
in the same sequence.

RJM

```