OFFSET
2
COMMENTS
If A(n, k) = 1, then A(n^t, k) = 1 for every t > 1.
A(n, k) > 0 iff A258045(n, k) > 1.
Column k is the characteristic function of row n of A244249. - Felix Fröhlich, Mar 11 2019
EXAMPLE
A(3, 5) = 1, since prime(5) = 11 is a base-3 Wieferich prime, i.e., 3^10 == 1 (mod 11^2).
A(6, 3) = 0, since prime(3) = 5 is not a base-6 Wieferich prime, i.e., 6^4 =/= 1 (mod 5^2).
Array A(n, k) starts as follows:
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
.
Antidiagonals as a triangular array:
0
0, 0
0, 0, 0
0, 0, 0, 1
0, 0, 0, 0, 0
0, 1, 0, 0, 0, 0
0, 0, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 1, 1, 1
0, 0, 0, 0, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 0, 0, 0, 1, 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1
PROG
(PARI) is(n, k) = Mod(n, prime(k)^2)^(prime(k)-1)==1
table(rows, cols) = for(n=2, rows+1, for(k=1, cols, print1(is(n, k), ", ")); print(""))
table(9, 10) \\ print 9 X 10 table
(PARI) first(n) = my(res = vector(n), v = [1, 1]); for(i=1, n, res[i] = is(v[2]+1, v[1]); v=nxt(v)); res
nxt = (v)->if(v[1]==1, [v[2]+1, v[1]], [v[1]-1, v[2]+1]) \\ using is() above. \\ David A. Corneth, Mar 11 2019
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Felix Fröhlich, Dec 05 2016
EXTENSIONS
More terms from Felix Fröhlich, Mar 11 2019
STATUS
approved