OFFSET
1,1
EXAMPLE
The sequence of base-226 Wieferich primes starts 3, 5, 7, 97, 157, ... Since 226 is the smallest b such that the three consecutive primes starting with prime(2) = 3 are base-b Wieferich primes, A(2, 3) = 226.
Array starts:
n=1: 5, 17, 449, 557, 19601, 132857
n=2: 8, 26, 226, 1207, 54568, 2006776
n=3: 7, 18, 1207, 1451, 13543, 296449
n=4: 18, 148, 606, 13543, 296449, 17134811
n=5: 3, 239, 3469, 24675, 3414284, 36763941
n=6: 19, 249, 653, 39016, 14380864, 34998229
PROG
(PARI) primevec(initialp, vecsize) = my(v=[initialp]); while(#v < vecsize, v=concat(v, nextprime(v[#v]+1))); v
a(n, k) = my(v=primevec(prime(n), k), b=2, i=0); while(1, for(x=1, #v, if(Mod(b, v[x]^2)^(v[x]-1)!=1, i++; break)); if(i==0, return(b)); b++; i=0)
array(rows, cols) = for(s=1, rows, for(t=1, cols, print1(a(s, t), ", ")); print(""))
array(5, 6) \\ print 5 X 6 array
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Felix Fröhlich, May 27 2017
EXTENSIONS
More terms from Max Alekseyev, Oct 10 2023
STATUS
approved