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.

A154732 Integers k such that (k^3 + k^2) -+ 1 are primes.

Original entry on oeis.org

2, 5, 9, 11, 12, 26, 44, 47, 62, 69, 71, 89, 125, 140, 147, 179, 219, 254, 264, 285, 294, 312, 317, 326, 341, 344, 384, 407, 461, 495, 659, 680, 714, 740, 837, 845, 861, 866, 867, 957, 989, 1071, 1079, 1152, 1215, 1310, 1437, 1481, 1499, 1511, 1530, 1577
Offset: 1

Views

Author

Keywords

Examples

			2^3 + 2^2 = 12 -+ 1 = 11 and 13 (both prime).
		

Crossrefs

Programs

  • Magma
    [n: n in [1..5*10^3] |IsPrime(n^3+n^2-1) and IsPrime(n^3+n^2+1)]; // Vincenzo Librandi, Dec 26 2015
    
  • Maple
    select(k -> andmap(isprime,[k^3+k^2-1,k^3+k^2+1]), [$1..10000]); # Robert Israel, Jan 07 2025
  • Mathematica
    lst={};Do[k=n^3+n^2;If[PrimeQ[k-1]&&PrimeQ[k+1],AppendTo[lst,n]],{n,8!}];lst
    Select[Range[3000], PrimeQ[#^3 + #^2 - 1] && PrimeQ[#^3 + #^2 + 1] &] (* Vincenzo Librandi, Dec 26 2015 *)
  • PARI
    isok(n) = isprime(n^3+n^2+1) && isprime(n^3+n^2-1); \\ Michel Marcus, Dec 27 2015