login
A359097
Number of distinct primes of type k + reverse(k) when k is a (2n - 1)-digit number.
0
1, 25, 304, 3909, 58299, 907721
OFFSET
1,2
EXAMPLE
1 + reverse(1) = 2 is prime and for no other 1-digit number k, k + reverse(k) = 2k is prime, thus a(2*1-1) = a(1) = 1.
PROG
(PARI)
R(k)=fromdigits(Vecrev(digits(k)))
a(n)=my(m=2*n-1, u=Set([]), mmin=10^(m-1), mmax=10^m-1, card=0); for(m=mmin, mmax, y=m+R(m); if(isprime(y)&&!setsearch(u, y), u=Set(concat(u, y)); card++)); card
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Jean-Marc Rebert, Dec 16 2022
STATUS
approved