login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A107689 Primes with digital product = 3. 17

%I #12 Mar 13 2021 15:13:04

%S 3,13,31,113,131,311,11113,11131,11311,113111,131111,311111,11111131,

%T 11111311,11113111,11131111,111111113,111111131,111113111,131111111,

%U 11111111113,11111111131,11113111111,11131111111,31111111111

%N Primes with digital product = 3.

%H Harvey P. Dale, <a href="/A107689/b107689.txt">Table of n, a(n) for n = 1..500</a>

%t Flatten[ Table[ Select[ Sort[ FromDigits /@ Permutations[ Flatten[{3, Table[1, {n}]}]]], PrimeQ[ # ] &], {n, 0, 12}]]

%o (Python)

%o from sympy import isprime

%o def agen():

%o digits = 0

%o while True:

%o for i in range(digits+1):

%o t = int("1"*(digits-i) + "3" + "1"*i)

%o if isprime(t): yield t

%o digits += 1

%o g = agen()

%o print([next(g) for i in range(25)]) # _Michael S. Branicky_, Mar 13 2021

%Y Cf. A004022, A107612, A107690, A107691, A107692, A107693, A107694, A107695, A107696, A107697, A107698.

%Y Subsequence of A034050.

%K base,nonn

%O 1,1

%A _Zak Seidov_ and _Robert G. Wilson v_, May 20 2005

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 16:21 EDT 2024. Contains 371794 sequences. (Running on oeis4.)