OFFSET
1,2
COMMENTS
This sequence does not enter into a loop. The 200th term has 49 digits.
LINKS
Jean-Marc Falcoz, Table of n, a(n) for n = 1..202
EXAMPLE
1*2 is 2; then 2*2 is 4; 2*4 is 8; 4*8 is 32; 8*3 = 24 (as 3 is the first digit of 32); 32*2 = 64 (as 2 is the first digit of 24); etc.
MAPLE
a:= proc(n) option remember; `if`(n<3, n,
a(n-2)*iquo(a(n-1), 10^(length(a(n-1))-1)))
end:
seq(a(n), n=1..50); # Alois P. Heinz, Mar 12 2018
MATHEMATICA
nxt[{a_, b_}]:={b, a IntegerDigits[b][[1]]}; NestList[nxt, {1, 2}, 40][[All, 1]] (* Harvey P. Dale, Oct 04 2019 *)
PROG
(PARI) a(n) = if(n==1, 1, if(n==2, 2, a(n-2)*digits(a(n-1))[1])) \\ Felix Fröhlich, Mar 12 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Eric Angelini and Jean-Marc Falcoz, Mar 12 2018
STATUS
approved