A244249 Table A(n,k) in which n-th row lists in increasing order all bases b to which p = prime(n) is a Wieferich prime (i.e., b^(p-1) is congruent to 1 mod p^2), read by antidiagonals.
5, 9, 8, 13, 10, 7, 17, 17, 18, 18, 21, 19, 24, 19, 3, 25, 26, 26, 30, 9, 19, 29, 28, 32, 31, 27, 22, 38, 33, 35, 43, 48, 40, 23, 40, 28, 37, 37, 49, 50, 81, 70, 65, 54, 28, 41, 44, 51, 67, 94, 80, 75, 62, 42, 14, 45, 46, 57, 68, 112, 89, 110, 68, 63, 41, 115
Offset: 1
Examples
Table starts with: p = 2: 5, 9, 13, 17, 21, 25, 29, 33, ... p = 3: 8, 10, 17, 19, 26, 28, 35, 37, ... p = 5: 7, 18, 24, 26, 32, 43, 49, 51, ... p = 7: 18, 19, 30, 31, 48, 50, 67, 68, ... p = 11: 3, 9, 27, 40, 81, 94, 112, 118, ... p = 13: 19, 22, 23, 70, 80, 89, 99, 146, ... p = 17: 38, 40, 65, 75, 110, 131, 134, 155, ...
Links
- Alois P. Heinz, Rows n = 1..141, flattened
Programs
-
Maple
A:= proc(n, k) option remember; local p, b; p:= ithprime(n); for b from 1 +`if`(k=1, 1, A(n, k-1)) while b &^ (p-1) mod p^2<>1 do od; b end: seq(seq(A(n, 1+d-n), n=1..d), d=1..14); # Alois P. Heinz, Jul 02 2014
-
Mathematica
A[n_, k_] := A[n, k] = Module[{p, b}, p = Prime[n]; For[b = 1 + If[k == 1, 1, A[n, k-1]], PowerMod[b, p-1, p^2] != 1, b++]; b]; Table[Table[A[n, 1+d-n], {n, 1, d}], {d, 1, 14}] // Flatten (* Jean-François Alcover, Mar 09 2015, after Alois P. Heinz *)
-
PARI
forprime(p=2, 10^1, print1("p=", p, ": "); for(a=2, 10^2, if(Mod(a, p^2)^(p-1)==1, print1(a, ", "))); print(""))