login
Square array A(n, k) read by antidiagonals downwards: multiplicative order of 2 modulo prime(n)^k, where k runs over the positive integers.
3

%I #21 Mar 02 2020 09:39:37

%S 2,6,4,18,20,3,54,100,21,10,162,500,147,110,12,486,2500,1029,1210,156,

%T 8,1458,12500,7203,13310,2028,136,18,4374,62500,50421,146410,26364,

%U 2312,342,11,13122,312500,352947,1610510,342732,39304,6498,253,28,39366,1562500,2470629,17715610,4455516,668168,123462,5819,812,5

%N Square array A(n, k) read by antidiagonals downwards: multiplicative order of 2 modulo prime(n)^k, where k runs over the positive integers.

%C 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).

%C From _Robert Israel_, Feb 24 2017: (Start)

%C 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.

%C a(n,2) = a(n,1) if and only if prime(n) is a Wieferich prime (A001220).

%C (End)

%H Robert Israel, <a href="/A282902/b282902.txt">Table of n, a(n) for n = 2..10012</a> (first 142 antidiagonals, flattened)

%e Array A(n, k) starts

%e 2, 6, 18, 54, 162, 486, 1458

%e 4, 20, 100, 500, 2500, 12500, 62500

%e 3, 21, 147, 1029, 7203, 50421, 352947

%e 10, 110, 1210, 13310, 146410, 1610510, 17715610

%e 12, 156, 2028, 26364, 342732, 4455516, 57921708

%e 8, 136, 2312, 39304, 668168, 11358856, 193100552

%e 18, 342, 6498, 123462, 2345778, 44569782, 846825858

%p seq(seq(numtheory:-order(2,ithprime(i)^(m-i)),i=2..m-1),m=2..10); # _Robert Israel_, Feb 24 2017

%t A[n_, k_] := MultiplicativeOrder[2, Prime[n]^k];

%t Table[A[n-k+1, k], {n, 2, 11}, {k, n-1, 1, -1}] // Flatten (* _Jean-François Alcover_, Mar 02 2020 *)

%o (PARI) a(n, k) = znorder(Mod(2, prime(n)^k))

%o array(rows, cols) = for(n=2, rows+1, for(k=1, cols, print1(a(n, k), ", ")); print(""))

%o array(7, 8) \\ print 7 X 8 array

%Y Cf. A014664 (column 1), A243905 (column 2).

%Y Cf. A001220.

%K nonn,tabl

%O 2,1

%A _Felix Fröhlich_, Feb 24 2017