A093094 "Products into digits": start with a(1)=2, a(2)=2; adjoin digits of product of a(k) and a(k+1) for k from 1 to infinity.
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
Offset: 1
Examples
a(3)=a(1)*a(2), a(4)=a(2)*a(3), a(5)=first digit of (a(3)*a(4)), a(6)=2nd digit of (a(3)*a(4)), a(9)=a(6)*a(7)
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Haskell
a093094 n = a093094_list !! (n-1) a093094_list = f [2,2] where f (u : vs@(v : _)) = u : f (vs ++ if w < 10 then [w] else uncurry ((. return) . (:)) $ divMod w 10) where w = u * v -- Reinhard Zumkeller, Aug 08 2013
-
Mathematica
Fold[Join[#, IntegerDigits[Times @@ #[[#2;; #2+1]]]] &, {2, 2}, Range[100]] (* Paolo Xausa, Aug 18 2025 *)
-
Python
from itertools import islice from collections import deque def agen(): # generator of terms a = deque([2, 2]) while True: a.extend(list(map(int, str(a[0]*a[1])))) yield a.popleft() print(list(islice(agen(), 101))) # Michael S. Branicky, Feb 15 2024
Extensions
Definition revised by Franklin T. Adams-Watters, Mar 16 2006
Comments