OFFSET
1,1
COMMENTS
a(10) = 10 + (1 + 0) + (1*0) = 11 ; a(19) = 19 + (9 + 1) + (9*1) = 38.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
MATHEMATICA
Table[n+Total[IntegerDigits[n]]+Times@@IntegerDigits[n], {n, 70}] (* Harvey P. Dale, Jun 07 2020 *)
PROG
(PARI) a(n) = my(d=digits(n)); n + vecsum(d) + vecprod(d); \\ Michel Marcus, Nov 12 2022
(Python)
from math import prod
def a(n): d = list(map(int, str(n))); return n + sum(d) + prod(d)
print([a(n) for n in range(1, 71)]) # Michael S. Branicky, Nov 20 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Claudio Meller, Jun 07 2009
STATUS
approved