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.

Showing 1-2 of 2 results.

A161864 Numbers n such that n^2 + n + 5 and n^2 + n - 5 are both prime.

Original entry on oeis.org

3, 6, 11, 18, 21, 23, 27, 32, 42, 48, 51, 83, 86, 93, 116, 153, 158, 182, 188, 216, 282, 291, 317, 333, 396, 482, 681, 737, 786, 798, 818, 821, 872, 923, 956, 966, 977, 986, 1007, 1026, 1077, 1082, 1106, 1161, 1287, 1292, 1302, 1337, 1341, 1451, 1467, 1563
Offset: 1

Views

Author

Keywords

Examples

			a(1)=3 as 12+-5 are primes. a(2)=6 as 42+-5 are primes.
		

Crossrefs

Programs

  • Maple
    select(n -> isprime(n^2+n+5) and isprime(n^2+n-5), [$1..2000]); # Robert Israel, Nov 26 2017
  • Mathematica
    q=5;lst5={};Do[p=n^2+n;If[PrimeQ[p-q]&&PrimeQ[p+q],AppendTo[lst5,n]], {n,0,7!}];lst5

Extensions

Definition rephrased by R. J. Mathar, Jun 23 2009

A161866 Numbers k such that k^2+k+7 and k^2+k-7 are both prime.

Original entry on oeis.org

3, 5, 9, 12, 24, 29, 32, 39, 44, 50, 57, 59, 65, 102, 135, 137, 144, 170, 180, 207, 260, 267, 297, 302, 305, 344, 347, 360, 365, 369, 389, 404, 429, 464, 474, 495, 540, 555, 570, 612, 620, 659, 662, 689, 767, 774, 792, 824, 837, 872, 885, 900, 950, 954, 989
Offset: 1

Views

Author

Keywords

Examples

			a(1)=3 as 12+-7 are primes. a(2)=5 as 30+-7 are primes.
		

Crossrefs

Programs

  • Magma
    [k:k in [1..1000]| IsPrime(k^2+k+7) and IsPrime(k^2+k-7)]; // Marius A. Burtea, Feb 17 2020
  • Mathematica
    q=7;lst7={};Do[p=n^2+n;If[PrimeQ[p-q]&&PrimeQ[p+q],AppendTo[lst7,n]], {n,0,7!}];lst7
    Select[Range[1000],AllTrue[#^2+#+{7,-7},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 26 2021 *)

Extensions

Definition rephrased by R. J. Mathar, Jun 23 2009
Showing 1-2 of 2 results.