cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A225575 #33 Sep 08 2022 08:46:05
%S A225575 199,233,257,353,523,653,971,1973,2333,3259,3637,3761,4283,4993,5927,
%T A225575 6353,6529,6563,7907,8831,9293,9851,10711,10861,11731,13037,13177,
%U A225575 13681,15241,16381,16693,16931,18341,18899,19577,21787,23857,24071,28621,31657,32911
%N 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.
%C A225575 This sequence was suggested by Puzzle 687 at Prime Puzzles (see Links).
%C A225575 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
%C A225575 In general, q-p == 0 (mod 6). - _Zak Seidov_, May 11 2013
%H A225575 Marius A. Burtea, <a href="/A225575/b225575.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..250 from Paolo P. Lava)
%H A225575 Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_687.htm">Puzzle 687: 17769643</a>, The Prime Puzzles & Problems Connection.
%e A225575 The prime following 199 is 211 and both 199211 and 211199 are prime.
%p A225575 a:=NULL;
%p A225575 for i from 1 to 2000 do
%p A225575   p:=ithprime(i);
%p A225575   q:=nextprime(p);
%p A225575   s:=convert(p,string);
%p A225575   t:=convert(q,string);
%p A225575   if isprime(parse(cat(s,t))) and isprime(parse(cat(t,s))) then a:=a,p; fi;
%p A225575 od:
%p A225575 a;
%t A225575 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 *)
%o A225575 (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
%Y A225575 Cf. A030459.
%K A225575 nonn,base
%O A225575 1,1
%A A225575 _W. Edwin Clark_, May 10 2013