A061783 Luhn primes: primes p such that p + (p reversed) is also a prime.
229, 239, 241, 257, 269, 271, 277, 281, 439, 443, 463, 467, 479, 499, 613, 641, 653, 661, 673, 677, 683, 691, 811, 823, 839, 863, 881, 20011, 20029, 20047, 20051, 20101, 20161, 20201, 20249, 20269, 20347, 20389, 20399, 20441, 20477, 20479, 20507
Offset: 1
Examples
229 is a term since 229 is a prime and so is 229 + 922 = 1151.
Links
- Harry J. Smith and Chai Wah Wu, Table of n, a(n) for n = 1..50598, giving all terms below 9*10^6 (The first 1000 terms from Harry J. Smith)
- Octavian Cira and Florian Smarandache, Luhn prime numbers, Theory and Applications of Mathematics & Computer Science, Vol. 5, No. 1 (2015), pp. 29-36; preprint, 2014.
- G. L. Honaker, Jr. and Chris Caldwell, eds., 229, Prime Curios!, November 19, 2001.
- Chai Wah Wu, 3010506 terms, 11MB zipped file of all terms below 10^9.
Crossrefs
Programs
-
Magma
[NthPrime(n): n in [1..2400] | IsPrime(s) where s is NthPrime(n)+Seqint(Reverse(Intseq(NthPrime(n))))]; // Bruno Berselli, Aug 05 2013
-
Mathematica
Select[Prime[Range[3000]],PrimeQ[#+FromDigits[Reverse[IntegerDigits[#]]]]&] (* Harvey P. Dale, Nov 27 2010 *)
-
PARI
isok(p) = { isprime(p) && isprime(p + fromdigits(Vecrev(digits(p)))) } \\ Harry J. Smith, Jul 28 2009
-
PARI
select( is_A061783(p)=isprime(A056964(p)) && isprime(p), primes(8713)) \\ A056964(p)=p+fromdigits(Vecrev(digits(p))). There is no term with 4 digits or starting with an odd digit, i.e., no candidate between prime(168) = 997 and prime(2263) = 20011. Using primes up to prime(8713) = 89989 ensures the list of 5-digit terms is complete. - M. F. Hasler, Sep 26 2019
-
Python
from sympy import isprime, prime A061783 = [prime(n) for n in range(1,10**5) if isprime(prime(n)+int(str(prime(n))[::-1]))] # Chai Wah Wu, Aug 14 2014
Extensions
Corrected and extended by Patrick De Geest, May 26 2001
Cross-references added by M. F. Hasler, Sep 26 2019
Comments