login
A245759
Primes p such that concatenation of p with its digit sum is also prime.
3
61, 83, 137, 139, 197, 199, 223, 241, 281, 313, 337, 353, 373, 397, 421, 449, 557, 577, 647, 719, 773, 809, 881, 937, 953, 971, 991, 1033, 1039, 1091, 1093, 1097, 1129, 1187, 1217, 1277, 1291, 1297, 1303, 1321, 1361, 1381, 1523, 1543, 1567, 1657, 1693, 1723, 1907
OFFSET
1,1
LINKS
EXAMPLE
61 is in the sequence because it is prime and the concatenation[ 61 with (6 + 1)] = 617 is also prime.
197 is in the sequence because it is prime and the concatenation[ 197 with (1 + 9 + 7)] = 19717 is also prime.
MAPLE
with(StringTools): A245759 := 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(d) then RETURN (a); fi; end: seq(A245759 (), m=1..1000);
PROG
(PARI)
for(n=1, 10^3, p=prime(n); if(isprime(eval(concat(Str(p), Str(sumdigits(p))))), print1(p, ", "))) \\ Derek Orr, Jul 31 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
K. D. Bajpai, Jul 31 2014
STATUS
approved