OFFSET
0,2
EXAMPLE
a(3) = 9466 because 9466^2+1 = 29 * 37 ^ 3 * 61.
MATHEMATICA
b=6; n37=37; jo=Join[{0, b}, Table[n37=37*n37; b=PowerMod[b, 37, n37]; b=Min[b, n37-b], {99}]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Nov 04 2012
STATUS
approved