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.

A239417 Numbers n such that n^9-9 is prime.

Original entry on oeis.org

2, 62, 86, 88, 116, 152, 266, 292, 310, 326, 338, 356, 406, 436, 466, 470, 518, 550, 568, 616, 626, 650, 688, 700, 722, 812, 850, 926, 956, 992, 1058, 1076, 1126, 1186, 1252, 1430, 1550, 1570, 1642, 1672, 1682, 1766, 1808, 1852, 1868, 1888, 2138, 2210, 2306
Offset: 1

Views

Author

Derek Orr, Mar 17 2014

Keywords

Comments

Note that all numbers in this sequence are even.

Examples

			2^9-9 = 503 is prime. Thus, 2 is a member of this sequence.
		

Crossrefs

Programs

  • PARI
    is(n)=isprime(n^9-9) \\ Charles R Greathouse IV, Feb 20 2017
  • Python
    import sympy
    from sympy import isprime
    {print(n) for n in range(10**4) if isprime(n**9-9)}
    

A239505 Numbers n such that n^9+9 and n^9-9 are prime.

Original entry on oeis.org

2, 1642, 2870, 2948, 4238, 5480, 5920, 7502, 8210, 8248, 9328, 11572, 13538, 13610, 14818, 14908, 19298, 21022, 21890, 21988, 22340, 23000, 23252, 26282, 26380, 29168, 31660, 32602, 33338, 33650, 36220, 38248, 38422, 43490, 43910, 44948, 45188, 46048
Offset: 1

Views

Author

Derek Orr, Mar 20 2014

Keywords

Comments

All numbers in this sequence are even.
Intersection of A239346 and A239417.

Examples

			2^9+9 = 521 is prime and 2^9-9 = 503 is prime. Thus, 2 is a member of this sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[50000],AllTrue[#^9+{9,-9},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 12 2015 *)
  • Python
    import sympy
    from sympy import isprime
    def TwoBoth(x):
      for k in range(10**6):
        if isprime(k**x+x) and isprime(k**x-x):
          print(k)
    TwoBoth(9)
Showing 1-2 of 2 results.