OFFSET
0,2
EXAMPLE
a(3) = 11389 because 11389^2+1 = 2 * 41 ^ 3 * 941.
MATHEMATICA
b=9; n41=41; jo=Join[{0, b}, Table[n41=41*n41; b=PowerMod[b, 41, n41]; b=Min[b, n41-b], {99}]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Nov 04 2012
STATUS
approved