A045777 a(1)=1, a(2)=2; thereafter successive products of pairs of digits make further digits.
1, 2, 2, 4, 8, 3, 2, 2, 4, 6, 4, 8, 2, 4, 2, 4, 3, 2, 1, 6, 8, 8, 8, 1, 2, 6, 2, 6, 4, 8, 6, 4, 6, 4, 8, 2, 1, 2, 1, 2, 1, 2, 2, 4, 3, 2, 4, 8, 2, 4, 2, 4, 2, 4, 3, 2, 1, 6, 2, 2, 2, 2, 2, 2, 4, 8, 1, 2, 6, 8, 3, 2, 1, 6, 8, 8, 8, 8, 8, 1, 2, 6, 2, 6, 1, 2, 4, 4, 4, 4, 4, 8, 3, 2, 8, 2, 1, 2, 4, 8, 2, 4, 6, 2, 6
Offset: 1
Examples
1*2=2 2*2=4 2*4=8 4*8=32 8*3=24...
Links
- T. D. Noe, Table of n, a(n) for n = 1..15212
- Erich Friedman, Puzzles of the Week.
Programs
-
Mathematica
t = {1, 2}; Do[ t = Join[t, IntegerDigits[t[[n-1]] t[[n-2]]]], {n, 3, 100}]; t
-
Python
from itertools import islice from collections import deque def agen(): # generator of terms a = deque([1, 2]) while True: a.extend(list(map(int, str(a[0]*a[1])))) yield a.popleft() print(list(islice(agen(), 105))) # Michael S. Branicky, Feb 15 2024
Comments