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!)
A157712 Smallest prime made up of 0's and prime(n) 1's (or 0 when no such prime exists). 2
11, 0, 101111, 11110111, 101111111111, 101101111111111, 101111111111111111, 1111111111111111111, 11111111111111111111111, 111110111111111111111111111111, 11111101111111111111111111111111 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Smallest prime with digit sum A000040(n) and using only 0's and 1's. Subsequence of A157709.
LINKS
PROG
(Python)
from __future__ import division
from itertools import combinations
from sympy import prime, isprime
def A157712(n):
if n == 1:
return 11
if n == 2:
return 0
p = prime(n)
l = p
while True:
for i in combinations(range(l), l-p):
s = ['1']*l
for x in i:
s[x] = '0'
q = int(''.join(s))
if isprime(q):
return q
l += 1 # Chai Wah Wu, Nov 05 2015
CROSSREFS
Cf. A054750.
Sequence in context: A073865 A036931 A165399 * A266379 A158215 A294254
KEYWORD
nonn,base
AUTHOR
Lekraj Beedassy, Mar 04 2009
EXTENSIONS
Extended by Ray Chandler, Mar 06 2009
STATUS
approved

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 May 6 02:22 EDT 2024. Contains 372290 sequences. (Running on oeis4.)