

A238984


a(n+1) is the product of the last three digits of the sequence up to a(n), start with a(0)=2.


6



2, 8, 32, 48, 64, 192, 18, 16, 48, 192, 18, 16, 48, 192, 18, 16, 48, 192, 18, 16, 48, 192, 18, 16, 48, 192, 18, 16, 48, 192, 18, 16, 48, 192, 18, 16, 48, 192, 18, 16, 48, 192, 18, 16, 48, 192, 18, 16, 48, 192, 18, 16, 48, 192, 18, 16, 48, 192, 18, 16, 48
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,1


COMMENTS

Additional rule: if there are fewer than k=3 digits in the sequence so far, then it is "extended to the left" with the first digit (i.e., that digit is repeated as often as necessary).
For any starting value, the sequence obtained through these rules ends either in repeating 0's, or in repeating 1's, or in the cycle (16,48,192,18). So 2 is the least starting value for which this nontrivial cycle is entered, after 5 iterations, at a(5)=192.


LINKS

Table of n, a(n) for n=0..60.
E. Angelini, Multiplication by themselves of the last k digits.


FORMULA

a(n+4)=a(n) for n > 4.


EXAMPLE

a(1) = 2*2*2 = 8 (here the initial digit is used 3 times), a(2) = 2*2*8 = 32 (here the initial digit is used twice to get k=3 factors), a(3) = 8*3*2 = 48, ...


PROG

(PARI) A238984(n, a=2, k=3, print_all=0)={my(L=if(a, digits(a), [0]), S=Str(k"..")); while(#L<k, L=concat(L[1], L)); for(m=1, n, print_all&&print1(a", "); a=prod(i=1, k, L[i]); L=vecextract(concat(L, if(a, digits(a))), S)); a}


CROSSREFS

Cf. A239419, A239616, A239721, A239722.
Sequence in context: A323145 A071387 A200063 * A071389 A026369 A269818
Adjacent sequences: A238981 A238982 A238983 * A238985 A238986 A238987


KEYWORD

nonn,base


AUTHOR

Eric Angelini and M. F. Hasler, Aug 01 2014


EXTENSIONS

PARI program corrected by Jens Kruse Andersen, Aug 02 2014


STATUS

approved



