OFFSET
1,1
COMMENTS
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10656 (all terms with <= 23 digits)
EXAMPLE
229 is in the sequence because it has digits in nondecreasing order, no digit 1 and a product of digits 2*2*9 = 36 which is a power of 6.
MATHEMATICA
Select[Range[10^6], And[FreeQ[#, 1], AllTrue[Differences@ #, # > -1 &], IntegerQ@ Log[6, Times @@ #]] &@ IntegerDigits@ # &] (* Michael De Vlieger, Jun 30 2018 *)
PROG
(PARI) is(n) = my(d = digits(n), p = prod(i = 1, #d, d[i])); d[1] >= 2 && vecsort(d) == d && 6^logint(p, 6) == p
(Python)
from math import prod
from sympy.utilities.iterables import multiset_combinations
def auptod(maxdigs):
n, digs, alst, targets = 0, 1, [], set(6**i for i in range(1, maxdigs*3))
for digs in range(1, maxdigs+1):
mcstr = "".join(str(d)*digs for d in "234689")
for mc in multiset_combinations(mcstr, digs):
if prod(map(int, mc)) in targets: alst.append(int("".join(mc)))
return alst
print(auptod(6)) # Michael S. Branicky, Jun 23 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
David A. Corneth, Jun 20 2018
STATUS
approved