login
A246428
Primes p such that concatenation of the digit sum of p with p is also prime.
3
11, 19, 23, 29, 31, 41, 43, 53, 59, 61, 67, 89, 97, 113, 149, 151, 163, 173, 181, 211, 229, 233, 271, 293, 317, 331, 337, 347, 349, 353, 359, 379, 389, 419, 431, 433, 443, 449, 463, 467, 479, 521, 547, 563, 577, 599, 613, 619, 631, 653, 673, 683, 691, 739, 751
OFFSET
1,1
LINKS
EXAMPLE
23 is in the sequence because it is prime; concatenation[(2 + 3) with 23 = 523, which is also prime.
59 is in the sequence because it is prime; concatenation[(5 + 9) with 59 = 1459, which is also prime.
MAPLE
with(StringTools): A246428 := proc() local a, b, d, e; a:=ithprime(m); b:=add( i, i = convert((a), base, 10))(a); d:=parse(cat(a, b)); e:= parse(cat(b, a)); if isprime(e) then RETURN (a); fi; end:
seq(A246428 (), m=1..300);
MATHEMATICA
a245758[n_Integer] := Cases[Map[If[PrimeQ[FromDigits[Flatten[Append[List[Total[ IntegerDigits[ Prime[#]]]], IntegerDigits[Prime[#]]]]]] == True, Prime[#]]]], [#], False] &, Range[n]], _Integer]; a245758[135] (* Michael De Vlieger, Aug 07 2014 *)
Select[Prime[Range[200]], PrimeQ[FromDigits[Flatten[Join[{ IntegerDigits[ Total[ IntegerDigits[#]]], IntegerDigits[#]}]]]]&] (* Harvey P. Dale, Jan 12 2015 *)
PROG
(PARI)
for(n=1, 10^3, p=prime(n); if(isprime(eval(concat(Str(sumdigits(p)), Str(p)))), print1(p, ", "))) \\ Derek Orr, Jul 31 2014
(Python)
from sympy import prime, isprime
A246428 = [int(n) for n in (str(prime(x)) for x in range(1, 10**3))
..........if isprime(int(str(sum([int(d) for d in n]))+n))]
# Chai Wah Wu, Aug 27 2014
CROSSREFS
Sequence in context: A374520 A335478 A136435 * A121658 A320867 A165947
KEYWORD
nonn,base
AUTHOR
K. D. Bajpai, Jul 31 2014
STATUS
approved