OFFSET
1,2
COMMENTS
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
10 = 5 + 5 = 10 + (1*0) and 22 = 16 + (1*6) are terms.
MATHEMATICA
m = 100; Select[Union[Table[n + Times @@ IntegerDigits[n], {n, 0, m}]], # <= m &] (* Amiram Eldar, Sep 16 2020 *)
PROG
(PARI) isok(m) = {if (m==0, return (1)); for (k=1, m, if (k+vecprod(digits(k)) == m, return (1)); ); } \\ Michel Marcus, Sep 17 2020
(Python)
from math import prod
def b(n): return n + prod(map(int, str(n)))
def aupto(n): return sorted(set(b(m) for m in range(n+1) if b(m) <= n))
print(aupto(109)) # Michael S. Branicky, Jan 09 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Sep 16 2020
STATUS
approved