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.

A243318 Numbers n such that n^10 - n^9 - n^8 - n^7 - n^6 - n^5 - n^4 - n^3 - n^2 - n - 1 is prime.

Original entry on oeis.org

15, 56, 65, 74, 87, 104, 132, 150, 171, 185, 186, 204, 225, 234, 360, 429, 449, 455, 459, 476, 485, 512, 675, 746, 770, 780, 795, 816, 836, 839, 840, 846, 857, 876, 902, 930, 939, 941, 944, 977, 1109, 1152, 1161, 1190, 1262, 1289, 1295, 1316, 1355, 1362, 1374, 1395, 1401, 1425
Offset: 1

Views

Author

Derek Orr, Jun 03 2014

Keywords

Examples

			15^10 - 15^9 - 15^8 - 15^7 - 15^6 - 15^5 - 15^4 - 15^3 - 15^2 - 15 - 1 = 535461077009 is prime. Thus 15 is a member of this sequence.
		

Crossrefs

Cf. A162862.

Programs

  • Magma
    [n: n in [0..2000] | IsPrime(n^10-n^9-n^8-n^7-n^6- n^5-n^4-n^3-n^2-n-1)]; // Vincenzo Librandi, Dec 06 2016
  • Maple
    A243318:=n->`if`(isprime(n^10-add(n^i, i=0..9)), n, NULL): seq(A243318(n), n=1..2*10^3); # Wesley Ivan Hurt, Dec 05 2016
  • Mathematica
    Select[Range[2000], PrimeQ[#^10 - #^9 - #^8 - #^7 - #^6 - #^5 - #^4 - #^3 - #^2 - # - 1] &] (* Vincenzo Librandi, Dec 06 2016 *)
  • PARI
    for(n=1, 10^4, if(ispseudoprime(n^10-sum(i=0, 9, n^i)), print1(n, ", ")))
    
  • Python
    import sympy
    from sympy import isprime
    {print(n, end=', ') for n in range(10**4) if isprime(n**10-n**9-n**8-n**7-n**6-n**5-n**4-n**3-n**2-n-1)}
    
  • Python
    from sympy import isprime
    A243318_list, m = [], [3628800, -16692480, 31651200, -31827600, 18163440, -5826240, 971232, -69720, 1362, -2, -1]
    for n in range(1, 10**5+1):
        for i in range(10):
            m[i+1]+= m[i]
        if isprime(m[-1]):
            A243318_list.append(n) # Chai Wah Wu, Nov 06 2014