OFFSET
1,2
COMMENTS
FORMULA
a(n)=prime(n)-1 if prime(n) == 2 or 3 (mod 4)
EXAMPLE
A000364 modulo 5=prime(3) gives : 1,1,0,1,0,1,0,1,0,1,0,... with period (1,0) of length 2, hence a(3)=2.
MATHEMATICA
f[n_] := Block[{p = Prime[n], t, d = Divisors[p - 1], dk, k = 1}, t = Mod[Table[Abs@EulerE[2i], {i, 2, p}], p]; While[dk = d[[k]]; Nand @@ Equal @@@ Partition[Partition[t, dk], 2, 1], k++ ]; dk]; Array[f, 63] (* Ray Chandler, Mar 15 2007 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Apr 06 2003
EXTENSIONS
More terms from John W. Layman, Jul 29 2005
Extended by Ray Chandler, Mar 15 2007
STATUS
approved