A199988 Numbers whose product of digits is 6.
6, 16, 23, 32, 61, 116, 123, 132, 161, 213, 231, 312, 321, 611, 1116, 1123, 1132, 1161, 1213, 1231, 1312, 1321, 1611, 2113, 2131, 2311, 3112, 3121, 3211, 6111, 11116, 11123, 11132, 11161, 11213, 11231, 11312, 11321, 11611, 12113, 12131, 12311, 13112, 13121
Offset: 1
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
f:= proc(d) local b,i,t; b:= (10^d-1)/9; op(sort([seq(b+5*10^i,i=0..d-1),seq(b+10^t[1]+2*10^t[2],t = combinat:-permute([$0..d-1],2))])) end proc: seq(f(i),i=1..5); # Robert Israel, Jan 13 2021
-
Mathematica
Select[Range[20000], Times @@ IntegerDigits[#] == 6 &] (* T. D. Noe, Nov 16 2011 *)
-
Python
from sympy import prod from sympy.utilities.iterables import multiset_permutations def agen(maxdigits): for digs in range(1, maxdigits+1): for mp in multiset_permutations("1"*(digs-1) + "236", digs): if prod(map(int, mp)) == 6: yield int("".join(mp)) print(list(agen(5))) # Michael S. Branicky, Jun 16 2021