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.

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.

This page as a plain text file.
%I A096381 #30 Aug 18 2025 11:44:20
%S A096381 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,
%T A096381 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,
%U A096381 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
%N 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.
%C A096381 Berzsenyi sets the puzzle of showing that 6 occurs infinitely often in the sequence. It is easy to compose variations on the sequence, e.g., vary a(1) and a(2), or use a base other than 10, or use the product of three successive members instead of 2.
%D A096381 George Berzsenyi, Competition Corner problem 468, The Mathematics Student (published by NCTM), Vol. 26, No. 2, November 1978.
%D A096381 Loren C. Larson, Problem-Solving Through Problems, Springer, 1983, page 8, Problem 1.1.6.
%H A096381 Robert Israel, <a href="/A096381/b096381.txt">Table of n, a(n) for n = 1..10000</a>
%H A096381 George Berzsenyi, István Laukó, and Gabriella Pintér, <a href="https://www.ms-competitioncorner.com">The Competition Corner in the Mathematics Student</a>, 2021. See p. 2, problem 1/2/1.
%e A096381 a(1)a(2) = 14, so a(3) = 1 and a(4) = 4.
%p A096381 R:= 2,7: count:= 2:
%p A096381 for i from 1 while count < 200 do
%p A096381   t:= R[i]*R[i+1];
%p A096381   if t >= 10 then R:= R, floor(t/10),t mod 10; count:= count+2 else R:= R, t;
%p A096381 count:= count+1 fi;
%p A096381 od:
%p A096381 R; # _Robert Israel_, Jan 16 2018
%t A096381 Fold[Join[#, IntegerDigits[Times @@ #[[#2;;#2+1]]]] &, {2, 7}, Range[100]] (* _Paolo Xausa_, Aug 17 2025 *)
%o A096381 (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
%o A096381 (Python)
%o A096381 from itertools import islice
%o A096381 from collections import deque
%o A096381 def agen(): # generator of terms
%o A096381     a = deque([2, 7])
%o A096381     while True:
%o A096381         a.extend(list(map(int, str(a[0]*a[1]))))
%o A096381         yield a.popleft()
%o A096381 print(list(islice(agen(), 105))) # _Michael S. Branicky_, Aug 18 2025
%Y A096381 Cf. A045777, A060310, A093094, A093095, A093096, A093097.
%K A096381 base,easy,nonn
%O A096381 1,1
%A A096381 _Gerry Myerson_, Aug 04 2004
%E A096381 Corrected by _Robert Israel_, Jan 16 2018