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

A238136 Primes p such that p^4-p^3+1 and p^4-p^3-1 are also primes.

Original entry on oeis.org

1429, 5827, 7411, 9601, 12601, 18457, 20011, 20521, 24919, 25999, 28591, 29947, 33211, 33349, 36037, 38149, 41227, 42649, 43579, 45307, 46099, 49999, 52057, 52387, 54319, 59107, 59197, 59629, 67891, 70951, 73477, 74761, 75037, 81157, 92041, 93607, 114889
Offset: 1

Views

Author

K. D. Bajpai, Feb 18 2014

Keywords

Examples

			1429 is in the sequence because 1429, (1429^4-1429^3+1) and (1429^4-1429^3-1) are all primes.
		

Crossrefs

Programs

  • Maple
    KD := proc() local a, b,d; a:=ithprime(n); b:= a^4-a^3+1;d:=a^4-a^3-1; if isprime (b) and isprime(d) then RETURN (a); fi; end: seq(KD(), n=1..20000);
  • Mathematica
    Select[Prime[Range[3000]],PrimeQ[#^4-#^3+1]&&PrimeQ[#^4-#^3-1]&]
    c=0;a=2;Do[k=Prime[n];  If[PrimeQ[k^4-k^3+1] &&PrimeQ[k^4-k^3-1], c=c+1;  Print[c," ",k]],  {n,1,2000000}];
    pQ[n_]:=Module[{c=n^4-n^3},AllTrue[c+{1,-1},PrimeQ]]; Select[Prime[ Range[ 11000]],pQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Oct 19 2014 *)
  • PARI
    s=[]; forprime(p=2, 120000, if(isprime(p^4-p^3+1) && isprime(p^4-p^3-1), s=concat(s, p))); s \\ Colin Barker, Feb 18 2014

A237995 Primes p such that p^4 - p^3 - 1 is also prime.

Original entry on oeis.org

2, 3, 5, 11, 17, 53, 59, 101, 103, 151, 157, 167, 193, 197, 239, 353, 379, 397, 419, 433, 467, 479, 503, 599, 641, 659, 661, 743, 787, 881, 907, 911, 983, 1049, 1109, 1123, 1153, 1201, 1229, 1291, 1307, 1373, 1399, 1429, 1531, 1601, 1621, 1663, 1747, 1753
Offset: 1

Views

Author

K. D. Bajpai, Feb 16 2014

Keywords

Examples

			5 is in the sequence because 5 is prime and 5^4 - 5^3 - 1 = 499 is also prime.
17 is in the sequence because 17 is prime and 17^4 - 17^3 - 1 = 78607 is also prime.
		

Crossrefs

Programs

  • Maple
    KD := proc() local a,b; a:= ithprime(n); b:= a^4-a^3-1;if isprime(b) then RETURN (a); fi; end: seq(KD(), n=1..400);
  • Mathematica
    c = 0; a = 2; Do[k = Prime[n]; If[PrimeQ[k^4 - k^3 - 1], c = c + 1;  Print[c, " ", k]], {n, 100000}]; (* Bajpai *)
    Select[Prime[Range[200]], PrimeQ[#^4 - #^3 - 1] &] (* Alonso del Arte, Feb 17 2014 *)
  • PARI
    s=[]; forprime(p=2, 2000, if(isprime(p^4-p^3-1), s=concat(s, p))); s \\ Colin Barker, Feb 17 2014

A238083 Primes p such that p^4 - p^3 + 1 is also prime.

Original entry on oeis.org

67, 139, 337, 409, 577, 607, 631, 1297, 1321, 1429, 1459, 1549, 1627, 2377, 2557, 2767, 2851, 2917, 3001, 3187, 3319, 3499, 4027, 4099, 4621, 4861, 4969, 5059, 5431, 5449, 5581, 5827, 5857, 6007, 6037, 6379, 6481, 6781, 6997, 7411, 7927, 8089, 8191, 8311
Offset: 1

Views

Author

K. D. Bajpai, Feb 17 2014

Keywords

Examples

			67 is in the sequence because 67 is prime and 67^4 - 67^3 + 1 = 19850359 is also prime.
337 is in the sequence because 337 is prime and 337^4 - 337^3 + 1 = 12859645009 is also prime.
		

Crossrefs

Programs

  • Maple
    KD := proc() local a,b;  a:= ithprime(n);  b:= a^4 - a^3 + 1;  if isprime(b) then RETURN (a); fi; end: seq(KD(), n=1..2000);
  • Mathematica
    c=0; a=2; Do[k=Prime[n];  If[PrimeQ[k^4-k^3+1], c=c+1;  Print[c," ",k]],    {n,1,100000}];
    Select[Prime[Range[1100]],PrimeQ[#^4-#^3+1]&] (* Harvey P. Dale, Jun 11 2025 *)
  • PARI
    isok(p) = isprime(p) && isprime(p^4 - p^3 + 1); \\ Michel Marcus, Feb 27 2014

Extensions

More terms from Michel Marcus, Feb 27 2014
Showing 1-3 of 3 results.