OFFSET
2,3
COMMENTS
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.
EXAMPLE
Irregular triangle begins
n/k|| 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ... || Length ||
----------------------------------------------------------------------
2 || -1 1 || 2 ||
3 || 2, -1, -2, 1 || 4 ||
4 || 2, -3, 1 || 3 ||
5 || 2, 4, -3, 5, -1, -2, -4, 3, -5, 1 || 10 ||
6 || 2, 4, -5, 3, 6, -1, -2, -4, 5, -3, -6, 1 || 12 ||
7 || 2, 4, 8, -1, -2, -4, -8, 1 || 8 ||
PROG
(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)
CROSSREFS
KEYWORD
sign,tabf
AUTHOR
Davis Smith, Apr 28 2022
STATUS
approved