login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A107692 Primes whose product of digits is 6. 12
23, 61, 1123, 1213, 1231, 1321, 2113, 2131, 2311, 3121, 11161, 11213, 11321, 12113, 13121, 16111, 31121, 111611, 611111, 1111213, 1112113, 1112131, 1131121, 1211311, 2111311, 3112111, 11111161, 11112113, 11211131, 11231111, 11312111 (list; graph; refs; listen; history; text; internal format)
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

Cf. A004022, A107612, A107689, A107690, A107691, A107693, A107694, A107695.

Cf. A107696, A107697, A107698.

Sequence in context: A069798 A067194 A232235 * A089823 A304896 A316578

Adjacent sequences:  A107689 A107690 A107691 * A107693 A107694 A107695

KEYWORD

base,nonn

AUTHOR

Zak Seidov and Robert G. Wilson v, May 20 2005

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 1 22:36 EDT 2021. Contains 346408 sequences. (Running on oeis4.)