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.

A174402 Primes such that applying "reverse and add" twice produces two more primes.

Original entry on oeis.org

271, 281, 21491, 21991, 22091, 22481, 23081, 23971, 24071, 25951, 26681, 26981, 27271, 27431, 27691, 27791, 28031, 28661, 28921, 28961, 29021, 29191, 29251, 29411, 29671, 2129891, 2131991, 2141791, 2141891, 2151791, 2157091, 2161591, 2179391, 2191291
Offset: 1

Views

Author

Harvey P. Dale, Nov 27 2010

Keywords

Comments

Some observations:
1. For all terms, the first digit is 2, last digit is 1, number of digits is odd: 3,5,7,...
2. The sequence is infinite. Number of 3-digit terms is 2, number of 5-digit terms is 23, number of 7-digit terms is 585, number of 9-digit terms is 26611.
3. Applying "reverse and add" a third time always produces composites. - Zak Seidov, Dec 09 2013

Examples

			21491 is included because (1) it is prime, and (2) 21491 + 19412 = 40903 which is prime, and (3) 40903 + 30904 = 71807 which also is prime.
		

Crossrefs

Cf. A061783.

Programs

  • Mathematica
    Transpose[Select[Table[{Prime[i],And@@PrimeQ/@NestList[#+FromDigits[ Reverse[ IntegerDigits[#]]]&,Prime[i],2]},{i,500000}],#[[2]] == True&]][[1]]
    tmpQ[p_]:=AllTrue[Rest[NestList[#+IntegerReverse[#]&,p,2]],PrimeQ]; Select[Prime[Range[163000]],tmpQ] (* Harvey P. Dale, Feb 05 2025 *)