OFFSET
1,2
COMMENTS
The sequence grows very slowly. For n <= 10000 the maximal value is 27.
LINKS
Marius A. Burtea, Table of n, a(n) for n = 1..6000
FORMULA
EXAMPLE
a(73) = 3 because 7*3 = 21 and 2+1 = 3.
MAPLE
P:=proc(n) local i, k, w; for i from 1 by 1 to n do w:=1; k:=i; while k>0 do w:=w*(k-(trunc(k/10)*10)); k:=trunc(k/10); od; k:=w; w:=0; while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; print(w); od; end: P(100);
MATHEMATICA
Table[Total[IntegerDigits[Times@@IntegerDigits[n]]], {n, 100}] (* Harvey P. Dale, Feb 08 2013 *)
PROG
(Magma) [&+Intseq((&*(Intseq(n)))):n in [1..100]]; // Marius A. Burtea, Jun 06 2019
(PARI) a(n) = sumdigits(vecprod(digits(n))); \\ Michel Marcus, Jun 07 2019
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Paolo P. Lava and Giorgio Balzarotti, May 03 2007
STATUS
approved