login
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.
1

%I #10 Jan 16 2018 21:11:58

%S 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 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 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 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 Larson 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. I haven't seen the Mathematics Student reference cited in Larson.

%D Author?, The Mathematics Student, Vol. 26, No. 2, November 1978.

%D Loren C. Larson, Problem-Solving Through Problems, Springer, 1983, page 8, Problem 1.1.6

%H Robert Israel, <a href="/A096381/b096381.txt">Table of n, a(n) for n = 1..10000</a>

%e a(1)a(2) = 14, so a(3) = 1 and a(4) = 4.

%p R:= 2,7: count:= 2:

%p for i from 1 while count < 200 do

%p t:= R[i]*R[i+1];

%p if t >= 10 then R:= R, floor(t/10),t mod 10; count:= count+2 else R:= R, t;

%p count:= count+1 fi;

%p od:

%p R; # _Robert Israel_, Jan 16 2018

%o (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

%K base,easy,nonn

%O 1,1

%A _Gerry Myerson_, Aug 04 2004

%E Corrected by _Robert Israel_, Jan 16 2018