cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A354782 Second digit from left in decimal expansion of 2^n (n >= 4).

Original entry on oeis.org

6, 2, 4, 2, 5, 1, 0, 0, 0, 1, 6, 2, 5, 3, 6, 2, 0, 0, 1, 3, 6, 3, 7, 3, 6, 3, 0, 1, 2, 5, 7, 4, 8, 3, 7, 4, 0, 1, 3, 7, 7, 5, 0, 4, 8, 6, 1, 2, 5, 0, 8, 6, 2, 4, 8, 7, 1, 3, 6, 2, 8, 6, 3, 4, 9, 9, 1, 3, 7, 4, 8, 7, 5, 5, 0, 0, 2, 4, 8, 6, 9, 8, 7, 5, 0, 1, 2, 4, 9, 9, 9, 9, 9, 5, 1, 3, 2, 5, 0, 0, 0, 0, 1, 6, 2, 4, 2, 5, 1
Offset: 4

Views

Author

N. J. A. Sloane, Jul 07 2022, following a suggestion from Alexander Wajnberg

Keywords

Examples

			2^4 = 16, so a(4) = 6. 2^5 = 32, so a(5) = 2.
		

Crossrefs

Programs

  • Maple
    a:= n-> parse(""||(2^n)[2]):
    seq(a(n), n=4..112);  # Alois P. Heinz, Jul 07 2022
  • Mathematica
    A354782[n_]:=IntegerDigits[2^n][[2]];Array[A354782,100,4] (* Paolo Xausa, Oct 22 2023 *)
  • Python
    def A354782(n): return int(str(1<Chai Wah Wu, Jul 07 2022

A253389 a(n) is the repeating digit pattern in penultimate digit of successive powers of n (omitting initial powers without at least two digits).

Original entry on oeis.org

13625124998637487500, 28428684442602686000, 1652983470, 2, 31975, 4400, 61964512293803548770, 8264462800, 0, 1234567890, 14233809528576619047, 16969012743858543270, 9412305876, 27, 15937, 18125674943632987050, 2376, 1652983470, 0, 24680, 84530839221546916077, 22644848642280060680, 27, 2, 7, 22840808842260464660, 28556013027144398697, 2488420660, 0
Offset: 2

Views

Author

Erik Maher, Dec 31 2014

Keywords

Comments

This is looking one step past the well-known rules for the last digit of successive powers: Powers of integers ending in digit 2 always repeat 2486 in the last digit pattern, powers of integers ending in digit 3 always repeat 3971, of integers ending in 4 repeat 46, of integers ending in 1, 5, and 6 repeat themselves, of integers ending in 7 repeat 7931, of integers ending in 8 repeat 8426, and of integers ending in 9 repeat 91.
Is there a pattern in the repeating patterns in the penultimate digits? Possibly 99 patterns, for x = 01 to 99?
All pattern lengths are a divisor of 20, as n^2 == n^22 (mod 100). - Walter Roscello, Jan 22 2023
Some terms have quasi-periodic patterns with first nonzero digit(s) not in the period, such as a(14), a(15) and a(18) ignoring first digit 1 while a(22) ignoring first digit 2. In these cases, the periodic patterns of a(n) could be rewritten by rotation. - Lerong Zhu, May 10 2024

Examples

			Powers of 2: 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096...
Second-to-the-last digits, skipping the one-digit powers: 1,3,6,2,5,1,2,4,9,9,8,6,3,7,4,8,7,5,0,0,...
Find repeating pattern and concatenate digits: 13625124998637487500
10 does not repeat its penultimate digit (1), so a(10)=0.
		

Crossrefs

Cf. A160590 (penultimate digit of 2^n).

Extensions

Missing a(8) inserted by Walter Roscello, Jan 22 2023
a(12)-a(30) from Lerong Zhu, May 10 2024

A352378 Irregular triangle read by rows: T(n,k) is the (n-th)-to-last digit of 2^p such that p == k + A123384(n-1) (mod A005054(n)); k >= 0.

Original entry on oeis.org

2, 4, 8, 6, 1, 3, 6, 2, 5, 1, 2, 4, 9, 9, 8, 6, 3, 7, 4, 8, 7, 5, 0, 0, 1, 2, 5, 0, 0, 0, 1, 3, 7, 5, 0, 1, 2, 5, 1, 3, 6, 2, 4, 8, 7, 4, 9, 8, 6, 2, 5, 1, 3, 7, 4, 9, 8, 7, 5, 1, 2, 4, 8, 6, 3, 6, 3, 6, 2, 4, 9, 9, 9, 9, 8, 7, 4, 9, 9, 9, 8, 6, 2, 4, 9, 8, 7, 4, 8, 6, 3, 7, 5, 1, 2, 5, 0, 1, 3, 7, 4, 8, 6, 2, 5, 0, 1
Offset: 1

Views

Author

Davis Smith, Mar 14 2022

Keywords

Comments

The n-th row of this triangle is the cycle of the (n-th)-to-last digit of powers of 2.
The period of the last n digits of powers of 2 where the exponent is greater than or equal to n is A005054(n). As a result, this triangle can be used to get the (n-th)-to-last digit of a large power of 2; if p == k + A123384(n-1) (mod A005054(n)), then the (n-th)-to-last digit (base 10) of 2^p is T(n,k). For example, for n = 1, if p == 1 (mod 4), then 2^p == 2 (mod 10) and if p == 3 (mod 4), then 2^p == 8 (mod 10). For n = 2, if p == 4 (mod 20), then the second-to-last digit of 2^p (base 10) is 1 and if p == 7 (mod 20), then the second-to-last digit of 2^p (base 10) is 2.

Examples

			Irregular triangle begins:
n/k| 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ... | Number of terms:
---+---------------------------------------+-----------------
1  | 2, 4, 8, 6;                           |                4
2  | 1, 3, 6, 2, 5, 1, 2, 4, 9, 9,  8, ... |               20
3  | 1, 2, 5, 0, 0, 0, 1, 3, 7, 5,  0, ... |              100
4  | 1, 2, 4, 8, 6, 2, 5, 1, 2, 4,  8, ... |              500
5  | 1, 3, 6, 3, 6, 2, 4, 9, 9, 8,  7, ... |             2500
6  | 1, 2, 5, 0, 0, 1, 3, 7, 5, 1,  2, ... |            12500
...
		

Crossrefs

The (n-th)-to-last digit of a power of 2: A000689 (n=1), A160590 (n=2).

Programs

  • PARI
    A352378_rows(n)=my(N=logint(10^(n-1),2),k=4*5^(n-1)); vector(k,v,floor(lift(Mod(2,10^n)^(v+N))/(10^(n-1))))

Formula

For n > 1, T(n,0) = 1.
Showing 1-3 of 3 results.