login
A108720
a(n)=a(n-1)+sum of digits(a(n-1))*sum of digits(a(n-2)).
0
1, 1, 2, 4, 12, 24, 42, 78, 168, 393, 618, 843, 1068, 1293, 1518, 1743, 1968, 2328, 2688, 3048, 3408, 3633, 3858, 4218, 4578, 4938, 5514, 5874, 6234, 6594, 6954, 7530, 7890, 8250, 8610, 8835, 9195, 9771, 10347, 10707, 10932, 11157, 11382, 11607, 11832
OFFSET
1,3
EXAMPLE
a(7)=42,sum of digits(42)=6,a(8)=78,sum of digits(78)=15,
a(9)=78+6*15=168
MAPLE
a[1]:=1:a[2]:=1:for n from 3 to 100 do d:=a[n-1]:s:=0:while d>0 do c:=d mod 10:s:=s+c:d:=(d-c)/10 od:e:=a[n-2]:t:=0:while e>0 do c:=e mod 10:t:=t+c:e:=(e-c)/10 od:a[n]:=a[n-1]+s*t od: seq(a[n], n=1..100);
MATHEMATICA
Transpose[NestList[{Last[#], Last[#]+Total[IntegerDigits[Last[#]]] Total[ IntegerDigits[ First[#]]]}&, {1, 1}, 50]][[1]] (* Harvey P. Dale, Dec 09 2011 *)
CROSSREFS
Sequence in context: A332666 A230481 A212169 * A330592 A089822 A079352
KEYWORD
easy,base,nonn
AUTHOR
Miklos Kristof, Jun 21 2005
STATUS
approved