A034595 Concatenation of 'nextprime(a(n)) and a(n)' and 'a(n) and nextprime(a(n))' are both prime.
27, 51, 63, 123, 199, 217, 219, 233, 257, 341, 353, 357, 417, 423, 429, 473, 501, 519, 523, 551, 579, 597, 609, 653, 657, 667, 669, 687, 703, 717, 777, 783, 801, 873, 891, 971, 987, 1017, 1043, 1139, 1157, 1161, 1271, 1337, 1343, 1389, 1671, 1973, 2019
Offset: 1
Examples
a(n)=353 -> nextprime(a(n)) is 359 so '353359' and '359353' are both prime.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
bpQ[n_]:=Module[{np=NextPrime[n]},AllTrue[{n*10^IntegerLength[np]+ np, np* 10^IntegerLength[ n]+n}, PrimeQ]]; Select[Range[2100],bpQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 19 2016 *)
Extensions
Offset changed by Andrew Howroyd, Aug 13 2024