OFFSET
1,1
COMMENTS
All terms are even and not divisible by 3. - Robert Israel, Apr 09 2019
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
14 is a term because 691 (the reverse of 14^2=196) and 196+691=887 are two prime numbers.
MAPLE
revdigs:= proc(n) local L, i;
L:= convert(n, base, 10);
add(L[-i]*10^(i-1), i=1..nops(L))
end proc:
filter:= proc(k) local v; v:= revdigs(k^2); isprime(v) and isprime(v+k^2) end proc:
select(filter, [seq(seq(6*i+j, j=[2, 4]), i=0..10000)]); # Robert Israel, Apr 09 2019
MATHEMATICA
Select[Range[50000], PrimeQ[IntegerReverse[#^2]] && PrimeQ[#^2 + IntegerReverse[#^2]] &]
PROG
(PARI) isok(k) = my(kk=fromdigits(Vecrev(digits(k^2)))); isprime(kk) && isprime(k^2+kk); \\ Michel Marcus, Apr 01 2019
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert Price, Mar 31 2019
STATUS
approved