Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #19 May 26 2018 22:12:28
%S 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,
%T 14,68,84,19,18,54,31,97,57,83,68,48,4,51,149,51,105,176,136,110,190,
%U 202,69,8,27,143,248,226,129,261,110,71,75,59,79,295,176,121
%N Smallest k > 0 such that 2^(p-1) (mod p^2) < k*p for p = prime(n).
%C If p is a Wieferich prime (A001220), then a(n) = 1.
%C Is a(n) = 1 for any p that is not a Wieferich prime?
%C 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
%t 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 *)
%o (PARI) a(n) = my(p=prime(n), res=lift(Mod(2, p^2)^(p-1))); 1+res\p
%Y Cf. A000040, A001220, A196202.
%K nonn
%O 1,1
%A _Felix Fröhlich_, May 08 2018