login
A225575
Primes p such that if q is the next prime after p then the concatenation of p with q and the concatenation of q with p are both primes.
1
199, 233, 257, 353, 523, 653, 971, 1973, 2333, 3259, 3637, 3761, 4283, 4993, 5927, 6353, 6529, 6563, 7907, 8831, 9293, 9851, 10711, 10861, 11731, 13037, 13177, 13681, 15241, 16381, 16693, 16931, 18341, 18899, 19577, 21787, 23857, 24071, 28621, 31657, 32911
OFFSET
1,1
COMMENTS
This sequence was suggested by Puzzle 687 at Prime Puzzles (see Links).
If q = p + 2 (that is, p is the lesser of a twin prime, A001359), then p is not in the sequence. - Alonso del Arte, May 10 2013
In general, q-p == 0 (mod 6). - Zak Seidov, May 11 2013
LINKS
Marius A. Burtea, Table of n, a(n) for n = 1..10000 (terms 1..250 from Paolo P. Lava)
Carlos Rivera, Puzzle 687: 17769643, The Prime Puzzles & Problems Connection.
EXAMPLE
The prime following 199 is 211 and both 199211 and 211199 are prime.
MAPLE
a:=NULL;
for i from 1 to 2000 do
p:=ithprime(i);
q:=nextprime(p);
s:=convert(p, string);
t:=convert(q, string);
if isprime(parse(cat(s, t))) and isprime(parse(cat(t, s))) then a:=a, p; fi;
od:
a;
MATHEMATICA
concatQ[{a_, b_}]:=Module[{idna=IntegerDigits[a], idnb=IntegerDigits[b]}, AllTrue[ FromDigits/@ {Join[idna, idnb], Join[idnb, idna]}, PrimeQ]]; Transpose[Select[ Partition[ Prime[Range[2000]], 2, 1], concatQ]][[1]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jul 16 2015 *)
PROG
(Magma) conc:=func<a, b|a*10^(#Intseq(b))+b>; [p:p in PrimesUpTo(17000)| IsPrime(conc(p, (NextPrime(p)))) and IsPrime(conc(NextPrime(p), p))]; // Marius A. Burtea, Jan 25 2020
CROSSREFS
Cf. A030459.
Sequence in context: A109561 A031930 A160342 * A252667 A156840 A227517
KEYWORD
nonn,base
AUTHOR
W. Edwin Clark, May 10 2013
STATUS
approved