OFFSET
1,1
LINKS
EXAMPLE
k = 137 and x = 7 + 37 + 137 = 181, y = 137 + 13 + 1 = 151, both primes.
MAPLE
with(numtheory): P:= proc(q) local a, b, c, k, m, n; for m from 1 to q do n:=ithprime(m);
a:=n; b:=0; for k from 1 to ilog10(n)+1 do b:=b+(a mod 10^k); od; a:=n; c:=0;
for k from 0 to ilog10(n) do c:=c+trunc(a/10^k); od;
if isprime(b) and isprime(c) then print(n); fi; od; end: P(10^9);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paolo P. Lava, Jan 13 2017
STATUS
approved