A339531 Numbers b > 1 such that the smallest two primes, i.e., 2 and 3 are base-b Wieferich primes.
17, 37, 53, 73, 89, 109, 125, 145, 161, 181, 197, 217, 233, 253, 269, 289, 305, 325, 341, 361, 377, 397, 413, 433, 449, 469, 485, 505, 521, 541, 557, 577, 593, 613, 629, 649, 665, 685, 701, 721, 737, 757, 773, 793, 809, 829, 845, 865, 881, 901, 917, 937, 953
Offset: 1
Keywords
Links
- Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
Crossrefs
Programs
-
Mathematica
Select[Range[2, 10^3], Function[b, AllTrue[{2, 3}, PowerMod[b, (# - 1), #^2] == 1 &]]] (* Michael De Vlieger, Dec 10 2020 *)
-
PARI
is(n) = forprime(p=1, 3, if(Mod(n, p^2)^(p-1)!=1, return(0))); 1
Formula
a(n) = 4*A263941(n) + 1 for n>=2, a(n) = 4*floor((9*n)/2) + 1 for all n. - Hugo Pfoertner, Dec 08 2020
From Chai Wah Wu, Aug 18 2025: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3) for n > 3.
G.f.: x*(-x^2 + 20*x + 17)/((x - 1)^2*(x + 1)). (End)