OFFSET
1,1
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..9400
EXAMPLE
23 is in the sequence because it is prime; concatenation(2 + 3, 23) = 523 is also prime.
59 is in the sequence because it is prime; concatenation(5 + 9, 59) = 1459 is also prime.
MAPLE
MATHEMATICA
a246428[n_Integer] := Cases[Map[If[PrimeQ[FromDigits[Flatten[Append[List[Total[ IntegerDigits[ Prime[#]]]], IntegerDigits[Prime[#]]]]]] == True, Prime[#], False] &, Range[n]], _Integer]; a246428[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
KEYWORD
nonn,base
AUTHOR
K. D. Bajpai, Jul 31 2014
STATUS
approved
