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.

A108403 Numbers n such that n^2-6 and n^2+6 are both prime.

Original entry on oeis.org

5, 25, 65, 145, 355, 605, 985, 1075, 1295, 1465, 1565, 1675, 1915, 2345, 2425, 2585, 2755, 3005, 3155, 3785, 4595, 4625, 4975, 5225, 5465, 5665, 5905, 5915, 6115, 6295, 6305, 6415, 6485, 7235, 7775, 8185, 9065, 9275, 9415, 9755, 9835, 10145, 10195
Offset: 1

Views

Author

John L. Drost, Jul 04 2005

Keywords

Comments

All members of the sequence are divisible by 5 as if n is 1 or 4 mod 5 then n^2-6 is divisible by 5 and if n is 2 or 3 mod 5 then n^2+6 is divisible by 5.

Examples

			a(2)=25 since 25^2 - 6 = 619 and 25^2 + 6 = 631 are both prime.
		

Crossrefs

Cf. A087681 (with n instead of n^2), A108701 (with 2 instead of 6).

Programs

  • Magma
    [n: n in [2..100000] | IsPrime(n^2-6) and IsPrime(n^2+6)] // Vincenzo Librandi, Nov 13 2010
  • Mathematica
    pQ[n_]:=Module[{n2=n^2},And@@PrimeQ[{n2-6,n2+6}]]; Select[5Range[2100], pQ]  (* Harvey P. Dale, Nov 06 2011 *)