A080906 Primes with an even number of digits such that the first half of the digits and the second half of the digits are both primes.
23, 37, 53, 73, 1103, 1117, 1123, 1129, 1153, 1171, 1303, 1307, 1319, 1361, 1367, 1373, 1723, 1741, 1747, 1753, 1759, 1783, 1789, 1907, 1913, 1931, 1973, 1979, 1997, 2311, 2341, 2347, 2371, 2383, 2389, 2903, 2917, 2953, 2971, 3119, 3137
Offset: 1
Examples
23 is a member because 2 and 3 are both primes.
References
- P. Giannopoulos, The brainteasers (unpublished)
Links
- Robert G. Wilson v, Table of n, for n = 1..10000. [From _Robert G. Wilson v_, Dec 07 2008]
Crossrefs
Cf. A000040. - Robert G. Wilson v, Dec 07 2008
Programs
-
Mathematica
f[n_] := Block[{c = 0, lp = PrimePi[10^n] - PrimePi[10^(n - 1)], lq = PrimePi[10^n], lst = {}, pq, p = Prime@ Range[PrimePi[10^(n - 1)] + 1, PrimePi[10^n]], q = Prime@ Range[1, PrimePi[10^n]]}, Do[pq = p[[i]]*10^n + q[[j]]; If[PrimeQ@ pq, AppendTo[lst, pq]; c++ ], {i, lp}, {j, lq}]; lst]; Array[f, 2] // Flatten (* Robert G. Wilson v, Dec 07 2008 *) pQ[n_]:=Module[{idn=IntegerDigits[n],len},len=Length[idn];EvenQ[len] && PrimeQ[FromDigits[Take[idn,len/2]]]&&PrimeQ[FromDigits[Take[idn, -len/2]]]]; Select[Prime[Range[500]],pQ] (* Harvey P. Dale, Nov 08 2011 *)
-
PARI
t=1; forprime( p=2,99, if( p>t, t*=10); forprime( q=3,t, isprime(p*t+q) & print1(p*t+q,", "))) \\ M. F. Hasler
Extensions
Corrected by Zak Seidov, Robert Israel, Farideh Firoozbakht and M. F. Hasler, Dec 06 2008 and Dec 07 2008
Edited by N. J. A. Sloane, Dec 07 2008
Comments