OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10199 (all terms with <= 136 digits; terms 1..1000 from Harvey P. Dale)
MATHEMATICA
Union[ Flatten[ Table[ Select[ Sort[ FromDigits /@ Join[ Permutations[ Flatten[{6, Table[1, {n}]}]], Permutations[ Flatten[{2, 3, Table[ 1, {n - 1}]}] ]]], PrimeQ[ # ] &], {n, 0, 7}]]]
Select[Prime[Range[750000]], Times@@IntegerDigits[#]==6&] (* Harvey P. Dale, May 29 2016 *)
PROG
(Python)
from sympy import prod, isprime
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:
t = int("".join(mp))
if isprime(t): yield t
print(list(agen(8))) # Michael S. Branicky, Jun 16 2021
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Zak Seidov and Robert G. Wilson v, May 20 2005
STATUS
approved