proposed
approved
proposed
approved
editing
proposed
return c # Chai Wah Wu, May 09 2023
(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
approved
editing
editing
approved
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, 5014}]
proposed
editing
editing
proposed
a(15) onwards from David W. Wilson, Jan 20 2016
proposed
editing
editing
proposed