OFFSET
0,3
LINKS
EXAMPLE
a(0)=1; a(1)=1; a(2)=1+1=2; a(3)=2+1+1=4; a(4)=4+2+1+1=8; a(5)=8+4+2+1+1=16;a(6)=6+1+8+4+2+1=22.
MATHEMATICA
(* greedy code *)s={1}; dd={1}; Do[a=Total[Take[dd, -k]]; AppendTo[s, a]; dd=Flatten[{dd, IntegerDigits[a]}], {k, 1, 100}]; s
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Zak Seidov, Jan 24 2015
STATUS
approved