A177275
Primes which are a concatenation of some permutation of the first 5 primes.
Original entry on oeis.org
112573, 115237, 115327, 211573, 235117, 257311, 327511, 352711, 357211, 372511, 511237, 511327, 511723, 521137, 521173, 572311, 711523, 725113, 735211, 751123
Offset: 1
Ulrich Krug (leuchtfeuer37(AT)gmx.de), May 06 2010
a(1) = 11//2//5//7//3 = 112573 = prime(10668).
a(5) = 2//3//5//11//7 = 235117 = prime(20845).
a(20) = 7//5//11//2//3 = 751123 = prime(60315).
-
catL := proc(L) local a,i,dgs ; a := op(1,L) ; for i from 2 to nops(L) do dgs := max(1, 1+ilog10(op(i,L))) ; a := a*10^dgs+op(i,L) ; end do: a ; end proc:
A177275 := proc() local pL,a,c ; pL := [seq(ithprime(c),c=1..5)] ; a := {} ; for c in combinat[permute](pL) do p := catL(c) ; if isprime(p) then a := a union {p} ; end if; end do: print(sort(a)) ; end proc:
A177275() ; # R. J. Mathar, May 09 2010
A167417
Largest prime concatenation of the first n primes, or 0 if no such prime exists.
Original entry on oeis.org
2, 23, 523, 7523, 751123, 75311213, 7523171311, 753217131911, 75323219131117, 0, 753312923219111713, 75373312923192171311, 7541373132923217111319, 754341373132923192171311, 75474341373132923211171319
Offset: 1
Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Nov 03 2009
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 largest of these is a(4) = 7523.
- 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.
-
from sympy import sieve, isprime
from itertools import permutations
for n in range(1, 14):
sieve.extend_to_no(n)
p = list(map(str, list(sieve._list)))[:n]
mint = 0
for i in permutations(p, len(p)):
t = int(''.join(i))
if t > mint and isprime(t):
mint = t
print(mint, end = ', ') # Gleb Ivanov, Dec 05 2021
Several terms corrected and a(11)-a(15) from
Gleb Ivanov, Dec 05 2021
A167416
Smallest prime concatenation of the first n primes, or 0 if no such prime exists.
Original entry on oeis.org
2, 23, 523, 2357, 112573, 11132357, 1113257317, 111317193257, 11131719223357, 0, 111317192232935317, 11131719223293157373, 1113171922329313377541, 111317192232931337415743, 11131719223293133741474357
Offset: 1
Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Nov 03 2009
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.
- 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.
-
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
Several terms corrected and a(11)-a(15) from
Gleb Ivanov, Dec 04 2021
A135134
Emirps that use all of the prime digits 2,3,5,7 exactly once.
Original entry on oeis.org
3257, 3527, 7253, 7523
Offset: 1
Showing 1-4 of 4 results.
Comments