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.

A173180 Numbers k such that k^5-k^4-k^3-k^2-k-1 is prime.

Original entry on oeis.org

4, 6, 8, 14, 18, 20, 24, 26, 28, 32, 40, 42, 50, 58, 62, 68, 72, 100, 104, 120, 122, 140, 150, 174, 184, 192, 210, 234, 240, 260, 266, 278, 288, 300, 306, 326, 346, 366, 404, 432, 444, 460, 464, 466, 470, 484, 488, 512, 516, 526, 538, 556, 562, 564, 570, 584
Offset: 1

Views

Author

Keywords

Comments

All terms are even. - Robert Israel, Apr 11 2019

Crossrefs

Programs

  • Maple
    filter:= k -> isprime( k^5-k^4-k^3-k^2-k-1):
    select(filter, 2*[$1..500]); # Robert Israel, Apr 11 2019
  • Mathematica
    f[n_]:=n^5-n^4-n^3-n^2-n-1;Select[Range[7! ],PrimeQ[f[ #1]]&]
    Select[Range[2,600,2],PrimeQ[#^5-Total[#^Range[0,4]]]&] (* Harvey P. Dale, Sep 26 2023 *)

Formula

{k: A125083(k) in A000040}. [R. J. Mathar, Feb 13 2010]

A240084 Primes p such that p^4-p^3-p^2-p-1 is prime.

Original entry on oeis.org

3, 11, 17, 41, 59, 71, 101, 113, 179, 233, 293, 347, 389, 449, 461, 503, 521, 617, 641, 683, 797, 953, 1319, 1439, 1487, 1493, 1823, 1877, 1973, 2087, 2339, 2351, 2633, 2663, 2789, 2801, 2909, 2927, 2957, 2963, 2999, 3011, 3167, 3467, 3527, 3677, 3851, 3881, 3923
Offset: 1

Views

Author

Derek Orr, Mar 31 2014

Keywords

Examples

			3^4-3^3-3^2-3-1 = 41 is prime. Thus, 3 is a member of this sequence.
		

Crossrefs

Cf. A173179.

Programs

  • Mathematica
    Select[Prime[Range[600]],PrimeQ[#^4-#^3-#^2-#-1]&] (* Harvey P. Dale, Nov 23 2024 *)
  • PARI
    s=[]; forprime(p=2, 4000, if(isprime(p^4-p^3-p^2-p-1), s=concat(s, p))); s \\ Colin Barker, Apr 01 2014
  • Python
    import sympy
    from sympy import isprime
    {print(p) for p in range(10**4) if isprime(p**4-p**3-p**2-p-1) and isprime(p)}
    
Showing 1-2 of 2 results.