login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A304214
Smallest k > 0 such that 2^(p-1) (mod p^2) < k*p for p = prime(n).
0
2, 2, 4, 3, 6, 4, 14, 4, 18, 2, 7, 2, 24, 26, 45, 37, 9, 37, 11, 3, 57, 20, 49, 7, 58, 93, 60, 14, 68, 84, 19, 18, 54, 31, 97, 57, 83, 68, 48, 4, 51, 149, 51, 105, 176, 136, 110, 190, 202, 69, 8, 27, 143, 248, 226, 129, 261, 110, 71, 75, 59, 79, 295, 176, 121
OFFSET
1,1
COMMENTS
If p is a Wieferich prime (A001220), then a(n) = 1.
Is a(n) = 1 for any p that is not a Wieferich prime?
Smallest k > 0 such that A196202(i) < k*A000040(i), where i is the index of p in A000040. - Felix Fröhlich, May 14 2018
MATHEMATICA
Table[If[p == 2, p, Block[{k = 1}, While[PowerMod[2, (p - 1), p^2] >= Mod[k p, p^2], k++]; k]], {p, Prime@ Range@ 65}] (* Michael De Vlieger, May 14 2018 *)
PROG
(PARI) a(n) = my(p=prime(n), res=lift(Mod(2, p^2)^(p-1))); 1+res\p
CROSSREFS
KEYWORD
nonn
AUTHOR
Felix Fröhlich, May 08 2018
STATUS
approved