|
|
A273775
|
|
Smallest prime p > n + 1 where a base b exists with abs(b - p) = n such that b^(p-1) == 1 (mod p^2).
|
|
1
|
|
|
257, 23, 13, 229, 11, 13, 13, 599, 29, 109, 541, 29, 83, 4099, 2011, 23, 47, 2042851, 115981
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
4,1
|
|
COMMENTS
|
Smallest p = prime(i) such that at least one of p-n or p+n occurs in the i-th row of A244249.
a(2) = 5. a(3) and a(23) are larger than 10^8 if they exist.
|
|
LINKS
|
|
|
EXAMPLE
|
For n = 4: p = 257 satisfies b^(p-1) == 1 (mod p^2) for b = p+4 = 261, i.e., 261^256 == 1 (mod 257^2) and is the smallest such p, so a(4) = 257.
|
|
MATHEMATICA
|
f[n_] := Block[{p = NextPrime[n +1]}, While[ PowerMod[p - n, p -1, p^2] != 1 && PowerMod[p + n, p -1, p^2] != 1, q = p = NextPrime@ p]; p] (* Robert G. Wilson v, Dec 14 2016 *)
|
|
PROG
|
(PARI) a(n) = forprime(p=n+2, , my(b=p-n, c=p+n); if(Mod(b, p^2)^(p-1)==1 || Mod(c, p^2)^(p-1)==1, return(p)))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,hard,more
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|