login
a(1)=1, a(2)=2; thereafter successive products of pairs of digits make further digits.
2

%I #19 Feb 15 2024 14:20:06

%S 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,

%T 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,

%U 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

%N a(1)=1, a(2)=2; thereafter successive products of pairs of digits make further digits.

%C The numbers 0, 5, 7, and 9 never appear, but arbitrarily long sequences of 8's appear.

%H T. D. Noe, <a href="/A045777/b045777.txt">Table of n, a(n) for n = 1..15212</a>

%H Erich Friedman, <a href="https://erich-friedman.github.io/puzzle/mathpuzzle/">Puzzles of the Week</a>.

%e 1*2=2 2*2=4 2*4=8 4*8=32 8*3=24...

%t t = {1, 2}; Do[ t = Join[t, IntegerDigits[t[[n-1]] t[[n-2]]]], {n, 3, 100}]; t

%o (Python)

%o from itertools import islice

%o from collections import deque

%o def agen(): # generator of terms

%o a = deque([1, 2])

%o while True:

%o a.extend(list(map(int, str(a[0]*a[1]))))

%o yield a.popleft()

%o print(list(islice(agen(), 105))) # _Michael S. Branicky_, Feb 15 2024

%K easy,nonn,base

%O 1,2

%A _Erich Friedman_