cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A359097 Number of distinct primes of type k + reverse(k) when k is a (2n - 1)-digit number.

Original entry on oeis.org

1, 25, 304, 3909, 58299, 907721
Offset: 1

Views

Author

Jean-Marc Rebert, Dec 16 2022

Keywords

Examples

			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.
		

Crossrefs

Programs

  • 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