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-1 of 1 results.

A160859 Primes p such that p^3 + p^2 - 1 and p^3 + p^2 + 1 are prime.

Original entry on oeis.org

2, 5, 11, 47, 71, 89, 179, 317, 461, 659, 1481, 1499, 1511, 2141, 2441, 2549, 2777, 2879, 2909, 3221, 3659, 3677, 3701, 4229, 4337, 4691, 5669, 5807, 7517, 8147, 8867, 9029, 9311, 10271, 13907, 14327, 14747, 15107, 15269, 16217, 16301, 16937, 17627
Offset: 1

Views

Author

Keywords

Comments

2^3 + 2^2 - 1 = 11, 2^3 + 2^2 + 1 = 13

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];a=p^2;b=p^3;c=b+a;If[PrimeQ[c-1]&&PrimeQ[c+1],AppendTo[lst,p]],{n,2*7!}];lst
    ppQ[n_]:=Module[{c=n^3+n^2},And@@PrimeQ[c+{1,-1}]]; Select[Prime[Range[ 2100]],ppQ] (* Harvey P. Dale, Jan 18 2013 *)

Extensions

Edited by Charles R Greathouse IV, Nov 11 2009
Showing 1-1 of 1 results.