%I #18 Apr 29 2022 17:20:27
%S -1,1,2,-1,-2,1,2,-3,1,2,4,-3,5,-1,-2,-4,3,-5,1,2,4,-5,3,6,-1,-2,-4,5,
%T -3,-6,1,2,4,8,-1,-2,-4,-8,1,2,4,8,-3,-6,7,-5,9,-1,-2,-4,-8,3,6,-7,5,
%U -9,1,2,4,8,-7,9,-5,-10,3,6,-11,1,2,4,8,-13,3,6,12,-5,-10,9,-11,7,14,-1,-2,-4,-8,13,-3,-6,-12,5,10,-9,11,-7,-14,1,2,4,8,-15,1
%N Irregular triangle read by rows; T(n,k) = 2^k (mod prime(n)), terminating when T(n,k) = 1.
%C Although the most significant digits of powers of 2 in base n are generally not periodic (the exception being when n is a power of 2), the least significant digits are. For example, 2 to an even power is congruent to 1 (mod 3) and 2 to an odd power is congruent to -1 (mod 3). This means that one can determine one of the prime factors of a Mersenne number, A000225, using the exponent. If n == 0 (mod 2), then A000225(n) == 0 (mod 3) (is a multiple of 3); if n == 0 (mod 4), then A000225(n) == 0 (mod 5); if n == 0 (mod 3), then A000225(n) == 0 (mod 7), and so on.
%C This general fact gives a reason for why certain Mersenne numbers are not prime (even with prime exponents). If p is congruent to 0 mod A014664(n) (the length of an n-th row) and prime(n) is less than the A000225(p), then prime(n) is a nontrivial factor of A000225(p).
%e Irregular triangle begins
%e n/k|| 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ... || Length ||
%e ----------------------------------------------------------------------
%e 2 || -1 1 || 2 ||
%e 3 || 2, -1, -2, 1 || 4 ||
%e 4 || 2, -3, 1 || 3 ||
%e 5 || 2, 4, -3, 5, -1, -2, -4, 3, -5, 1 || 10 ||
%e 6 || 2, 4, -5, 3, 6, -1, -2, -4, 5, -3, -6, 1 || 12 ||
%e 7 || 2, 4, 8, -1, -2, -4, -8, 1 || 8 ||
%o (PARI) A353171_row(n)->my(N=centerlift(Mod(2,prime(n))^1),L=List(N),k=1);while(N!=1,k++;listput(L,N=centerlift(Mod(2,prime(n))^k)));Vec(L)
%Y Cf. A000225, A014664.
%Y Cf. similar sequences: A201908, A201912.
%K sign,tabf
%O 2,3
%A _Davis Smith_, Apr 28 2022
|