Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A243886
Primes p = prime(n): such that p.n and n.p both are prime, where (.) indicates concatenation.
1
661, 1051, 1999, 2179, 3433, 3593, 3719, 4073, 4591, 4733, 5449, 5503, 6079, 6481, 7109, 7211, 7489, 8293, 8513, 9901, 10273, 10529, 11821, 12721, 14107, 14591, 14879, 15263, 15877, 18149, 19559, 22027, 22129, 22571, 23339, 24527, 25357, 26881, 27337, 34259
OFFSET
1,1
COMMENTS
Intersection of A084671 and A166283.
LINKS
EXAMPLE
661 is in the sequence because 661 = prime(121): Concatenations of [661.121 = 661121] and concatenation of [121.661 = 121661] which are also primes.
1051 is in the sequence because 1051 = prime(177): Concatenation of [1051.177 = 1051177] and concatenation of [177.1051 = 1771051] which are also primes.
MAPLE
with(numtheory): with(StringTools): A243886:= proc() local p, k1, k2; p:=ithprime(n); k1:=parse (cat (p, n)); k2:=parse(cat(n, p)); if isprime(k1)and isprime(k2) then RETURN (p); fi; end: seq(A243886 (), n=1..5000);
MATHEMATICA
Select[Prime [Range[5000]], PrimeQ[FromDigits[Join[IntegerDigits [PrimePi [#]], IntegerDigits [#]]]] && PrimeQ [FromDigits [Join [IntegerDigits[#], IntegerDigits [PrimePi [#]]]]] &]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
K. D. Bajpai, Jun 13 2014
STATUS
approved