OFFSET
1,2
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..1000
FORMULA
a(A068191(n)) = 0 for n >=1.
a(n) <> 0 iff n in { A002473 }. - Michael S. Branicky, Jan 21 2021
EXAMPLE
113, 131, and 311 are the 3-digit numbers whose product of digits is 3; 311 is the largest.
MATHEMATICA
Table[If[FactorInteger[n][[-1, 1]] > 9, 0, i = (10^n - 1)/9; While[i < 10^n && Times @@ (d = IntegerDigits[i]) != n, i++]; If[i == 10^n, 0, FromDigits[Reverse[d]]]], {n, 30}] (* T. D. Noe, Oct 24 2011 *)
PROG
(Python)
def A198376(n):
ncopy, p, an = n, 1, ""
for d in range(9, 1, -1):
while ncopy%d == 0: ncopy//=d; p *= d; an += str(d)
if p == n and len(an) <= n: return int(an+'1'*(n-len(an)))
return 0
print([A198376(n) for n in range(1, 25)]) # Michael S. Branicky, Jan 21 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jaroslav Krizek, Oct 23 2011
STATUS
approved