OFFSET
1,1
COMMENTS
The square of a(n) is the smallest squared prime that is a pseudoprime (> n) in base n; for example, a(2) = 1093, and 1093^2 = 1194649 is the smallest squared prime that is pseudoprime in base 2. - Eric Chen, Nov 26 2014
Is a(n) defined for all n? - Eric Chen, Nov 26 2014
Does every prime appear in this sequence? - Eric Chen, Nov 26 2014
a(22)..a(28) = {13, 13, 5, 20771, 71, 11, 19}, a(30)..a(46) = {7, 7, 1093, 233, 46145917691, 1613, 66161, 77867, 17, 8039, 11, 29, 23, 103, 229, 1283, 829}, a(48)..a(49) = {7, 491531}, a(51)..a(60) = {41, 461, 47, 19, 30109, 647, 47699, 131, 2777, 29}, a(62)..a(71) = {19, 23, 1093, 17, 89351671, 47, 19, 19, 13, 47}, a(74)..a(81) = {1251922253819, 17, 37, 32687, 43, 263, 13, 11}, a(83)..a(100) = {4871, 163, 11779, 68239, 1999, 2535619637, 13, 6590291053, 293, 727, 509, 11, 2137, 109, 2914393, 28627, 13, 487}; a(n) is currently unknown for n = {21, 29, 47, 50, 61, 72, 73, 82, 126, 132, 154, 186, 187, 188, 200, 203, 222, 231, 237, 301, 304, 309, 311, 327, 335, 347, 351, 355, 357, 435, 441, 454, 458, 496, 541, 542, 546, 554, 570, 593, 609, 610, 639, 640, 654, 662, 668, 674, 692, 697, 698, 701, 718, 724, 725, 727, 733, 743, 760, 772, 775, 777, 784, 798, 807, 808, 812, 829, 841, 858, 860, 871, 883, 912, 919, 944, 980, 983, 986, ...}. - Eric Chen, Nov 26 2014
a(21) > 3.4 * 10^13. - Eric Chen, Nov 26 2014
LINKS
Eric Chen, Table of known a(n) up to a(1000)
Richard Fischer, Fermat quotients B^(P-1) == 1 (mod P^2)
Wikipedia, Wieferich prime
EXAMPLE
a(12) = 2693 because the Wieferich primes to base 12 are 2693, 123653, ..., and 2693 is greater than sqrt(12), so a(12) = 2693.
a(17) = 46021 because the Wieferich primes to base 17 are 2, 3, 46021, 48947, 478225523351, ..., but neither 2 nor 3 is greater than sqrt(17), so a(17) = 46021.
MATHEMATICA
a247072[n_] := Block[{p = Int[Sqrt[n]]+1}, While[!PrimeQ[p] || [p < 10^8 && PowerMod[n, p - 1, p^2] != 1], p++]; If[p == 10^8, 0, p]]; Table[ a247072[n], {n, 100}] (* Eric Chen, Nov 27 2014 *)
PROG
(PARI) a(n)=forprime(p=sqrtint(n)+1, , if(Mod(n^(p-1), p^2)==1, return(p)))
n=1; while(n<101, print1(a(n), ", "); n++) \\ Charles R Greathouse IV, Nov 16 2014
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Eric Chen, Nov 16 2014
STATUS
approved