The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A167416 Smallest prime concatenation of the first n primes, or 0 if no such prime exists. 2
2, 23, 523, 2357, 112573, 11132357, 1113257317, 111317193257, 11131719223357, 0, 111317192232935317, 11131719223293157373, 1113171922329313377541, 111317192232931337415743, 11131719223293133741474357 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(10) doesn't exist, because the sum of digits of the first 10 primes (2+3+5+7+(1+1)+(1+3)+(1+7)+(1+9)+(2+3)+(2+9)) = 57 is a multiple of 3.
REFERENCES
Richard E. Crandall and Carl Pomerance, Prime Numbers, Springer 2005.
Paulo Ribenboim, The New Book of Prime Number Records, Springer 1996.
A. Weil, Number theory: an approach through history, Birkhäuser 1984.
LINKS
EXAMPLE
The only prime concatenations of the first n primes for n = 1..3 are a(1)=2, a(2)=23, and a(3)=523.
For n=4, the only prime concatenations of 2, 3, 5, and 7 are 2357, 2753, 3257, 3527, 5237, 5273, 7253, 7523; the smallest of these is a(4) = 2357.
PROG
(Python)
from sympy import sieve, isprime
from itertools import permutations
for n in range(1, 20):
sieve.extend_to_no(n)
p = list(map(str, list(sieve._list)))[:n]
mint = 10**1000
for i in permutations(p, len(p)):
t = int(''.join(i))
if t < mint and isprime(t):
mint = t
if mint == 10**1000:
print(0, end = ', ')
else:
print(mint, end = ', ') # Gleb Ivanov, Dec 04 2021
CROSSREFS
Sequence in context: A360239 A054260 A053160 * A053066 A167417 A053161
KEYWORD
nonn,base
AUTHOR
Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Nov 03 2009
EXTENSIONS
Keyword:full added by R. J. Mathar, Nov 11 2009
Edited by Charles R Greathouse IV, Apr 28 2010
Several terms corrected and a(11)-a(15) from Gleb Ivanov, Dec 04 2021
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 June 6 00:30 EDT 2024. Contains 373110 sequences. (Running on oeis4.)