OFFSET
1,1
COMMENTS
LINKS
Felix Fröhlich, Table of n, a(n) for n = 1..1000
MATHEMATICA
a[n_] := Block[{b=2, p = Prime@{n, n+1}}, While[{1, 1} != PowerMod[ b, p-1, p^2], b++]; b]; Array[a, 40] (* Giovanni Resta, Jun 23 2015 *)
PROG
(PARI) a(n) = p=prime(n); q=prime(n+1); b=2; while(Mod(b, p^2)^(p-1)!=1 || Mod(b, q^2)^(q-1)!=1, b++); b
CROSSREFS
KEYWORD
nonn
AUTHOR
Felix Fröhlich, Jun 18 2015
STATUS
approved