OFFSET
1,2
LINKS
David W. Wilson, Table of n, a(n) for n = 1..1000
EXAMPLE
a(4) = 384 because 4*(product of digits of 384) = 4*96 = 384, and no number smaller than 384 has this property.
MATHEMATICA
Do[k = n; If[Mod[n, 10] == 0, Print[0]; Continue[]]; While[Apply[Times, RealDigits[k][[1]]]*n != k, k += n]; Print[k], {n, 1, 14}]
PROG
(Python)
from itertools import count, combinations_with_replacement
from math import prod
def A056770(n):
if not n%10: return 0
for l in count(1):
if 9**l*n < 10**(l-1): return 0
c = 10**l
for d in combinations_with_replacement(range(1, 10), l):
if sorted(str(a:=prod(d)*n)) == list(str(e) for e in d):
c = min(c, a)
if c < 10**l:
return c # Chai Wah Wu, May 09 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert G. Wilson v, Aug 16 2000
EXTENSIONS
a(15) onwards from David W. Wilson, Jan 20 2016
STATUS
approved