

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



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



KEYWORD

nonn,base


AUTHOR



EXTENSIONS



STATUS

approved



