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.

A217972 Numbers n such that n^8 + 1 and (n + 2)^8 + 1 are both prime.

Original entry on oeis.org

2, 240, 288, 508, 540, 680, 916, 1614, 2328, 2872, 2960, 2988, 3402, 3708, 3770, 4760, 4762, 4810, 5370, 5490, 5776, 5878, 6204, 7276, 7890, 8414, 8652, 9418, 9858, 11218, 11896, 12510, 13328, 13938, 14418, 15846, 16422, 17206, 18152, 18954, 19226, 20640
Offset: 1

Views

Author

Michel Lagneau, Oct 17 2012

Keywords

Examples

			2 is in the sequence because 2^8 + 1 = 257 and 4^8 + 1 = 65537 are both prime.
4 is not in the sequence because although 4^8 + 1 is a prime (as we saw above), 6^8 + 1 is not, being a multiple of 17.
		

Crossrefs

Cf. A006314.

Programs

  • Mathematica
    lst = {}; Do[p = n^8 + 1; q = (n + 2)^8 + 1; If[PrimeQ[p] && PrimeQ[q], AppendTo[lst, n]], {n, 0, 21000}]; lst (* Lagneau *)
    Select[Range[10^5], PrimeQ[#^8 + 1] && PrimeQ[(# + 2)^8 + 1] &] (* Alonso del Arte, Oct 17 2012 *)