A096381 Beginning with 2, 7, multiply successive pairs of members and adjoin the result as the next one or two members of the sequence, depending on whether the product is a one- or two-digit number.
2, 7, 1, 4, 7, 4, 2, 8, 2, 8, 8, 1, 6, 1, 6, 1, 6, 6, 4, 8, 6, 6, 6, 6, 6, 3, 6, 2, 4, 3, 2, 4, 8, 3, 6, 3, 6, 3, 6, 3, 6, 1, 8, 1, 8, 1, 2, 8, 1, 2, 6, 8, 3, 2, 2, 4, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 6, 8, 8, 8, 8, 2, 1, 6, 8, 2, 1, 2, 4, 8, 2, 4, 6, 4, 8, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 4, 8
Offset: 1
Examples
a(1)a(2) = 14, so a(3) = 1 and a(4) = 4.
References
- George Berzsenyi, Competition Corner problem 468, The Mathematics Student (published by NCTM), Vol. 26, No. 2, November 1978.
- Loren C. Larson, Problem-Solving Through Problems, Springer, 1983, page 8, Problem 1.1.6.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
- George Berzsenyi, István Laukó, and Gabriella Pintér, The Competition Corner in the Mathematics Student, 2021. See p. 2, problem 1/2/1.
Programs
-
Haskell
a=2:7:concat[(if x*y>9then[x*y`div`10]else[])++[x*y`mod`10]|(x,y)<-a`zip`tail a] -- Paul Stoeber (pstoeber(AT)uni-potsdam.de), Oct 08 2005
-
Maple
R:= 2,7: count:= 2: for i from 1 while count < 200 do t:= R[i]*R[i+1]; if t >= 10 then R:= R, floor(t/10),t mod 10; count:= count+2 else R:= R, t; count:= count+1 fi; od: R; # Robert Israel, Jan 16 2018
-
Mathematica
Fold[Join[#, IntegerDigits[Times @@ #[[#2;;#2+1]]]] &, {2, 7}, Range[100]] (* Paolo Xausa, Aug 17 2025 *)
-
Python
from itertools import islice from collections import deque def agen(): # generator of terms a = deque([2, 7]) while True: a.extend(list(map(int, str(a[0]*a[1])))) yield a.popleft() print(list(islice(agen(), 105))) # Michael S. Branicky, Aug 18 2025
Extensions
Corrected by Robert Israel, Jan 16 2018
Comments