OFFSET
2,1
COMMENTS
The number of initial terms in row n with constant values is equal to the highest value of x such that p = prime(n) satisfies 2^(p-1) == 1 (mod p^x).
From Robert Israel, Feb 24 2017: (Start)
a(n,k+1) is either a(n,k) or a(n,k)*prime(n). If it is a(n,k)*prime(n), then a(n,k+j) = a(n,k)*prime(n)^j for all j>=1.
a(n,2) = a(n,1) if and only if prime(n) is a Wieferich prime (A001220).
(End)
LINKS
Robert Israel, Table of n, a(n) for n = 2..10012 (first 142 antidiagonals, flattened)
EXAMPLE
Array A(n, k) starts
2, 6, 18, 54, 162, 486, 1458
4, 20, 100, 500, 2500, 12500, 62500
3, 21, 147, 1029, 7203, 50421, 352947
10, 110, 1210, 13310, 146410, 1610510, 17715610
12, 156, 2028, 26364, 342732, 4455516, 57921708
8, 136, 2312, 39304, 668168, 11358856, 193100552
18, 342, 6498, 123462, 2345778, 44569782, 846825858
MAPLE
seq(seq(numtheory:-order(2, ithprime(i)^(m-i)), i=2..m-1), m=2..10); # Robert Israel, Feb 24 2017
MATHEMATICA
A[n_, k_] := MultiplicativeOrder[2, Prime[n]^k];
Table[A[n-k+1, k], {n, 2, 11}, {k, n-1, 1, -1}] // Flatten (* Jean-François Alcover, Mar 02 2020 *)
PROG
(PARI) a(n, k) = znorder(Mod(2, prime(n)^k))
array(rows, cols) = for(n=2, rows+1, for(k=1, cols, print1(a(n, k), ", ")); print(""))
array(7, 8) \\ print 7 X 8 array
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Felix Fröhlich, Feb 24 2017
STATUS
approved