OFFSET
1,1
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..3160
EXAMPLE
61 is in the sequence because it is prime; concatenation[61 with (6 + 1)] = 617 is prime and concatenation[(6 + 1) with 61] = 761 is also prime.
337 is in the sequence because it is prime; concatenation[337 with (3 + 3 + 7)] = 33713 is prime and concatenation[(3 + 3 + 7) with 337] = 13337 is also prime.
MAPLE
MATHEMATICA
cdsQ[n_]:=Module[{ds=Total[IntegerDigits[n]]}, AllTrue[ {n*10^IntegerLength[ ds]+ ds, ds*10^IntegerLength[ n]+n}, PrimeQ]]; Select[Prime[Range[1100]], cdsQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 23 2016 *)
PROG
(PARI)
for(n=1, 10^4, p=prime(n); d=Str(sumdigits(p)); if(isprime(eval(concat(Str(p), d)))&&isprime(eval(concat(d, Str(p)))), print1(p, ", "))) \\ Derek Orr, Jul 31 2014
(Python)
from sympy import prime, isprime
A245763 = [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)) and
..........isprime(int(n+str(sum([int(d) for d in n]))))]
# Chai Wah Wu, Aug 27 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
K. D. Bajpai, Jul 31 2014
STATUS
approved