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.

A242553 Least number k such that n^8 + k^8 is prime.

Original entry on oeis.org

1, 1, 10, 1, 6, 5, 12, 13, 16, 3, 24, 7, 2, 3, 8, 9, 4, 17, 4, 7, 2, 3, 20, 7, 8, 19, 10, 3, 10, 19, 14, 17, 32, 11, 8, 25, 6, 25, 40, 7, 10, 43, 16, 5, 68, 7, 30, 5, 8, 19, 58, 17, 26, 17, 2, 11, 10, 3, 4, 49, 6, 71, 22, 15, 14, 47, 30, 9, 2, 19, 6, 19, 6, 5, 28, 13, 2
Offset: 1

Views

Author

Derek Orr, May 17 2014

Keywords

Comments

If a(n) = 1, then n is in A006314.

Examples

			10^8+1^8 = 100000001 is not prime. 10^8+2^8 = 100000256 is not prime. 10^8+3^8 = 100006561 is prime. Thus, a(10) = 3.
		

Crossrefs

Programs

  • Mathematica
    lnk[n_]:=Module[{c=n^8,k=1},While[CompositeQ[c+k^8],k++];k]; Array[lnk,80] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 12 2020 *)
  • PARI
    a(n)=for(k=1,oo,if(ispseudoprime(n^8+k^8),return(k)));
  • Python
    import sympy
    from sympy import isprime
    def a(n):
      for k in range(10**4):
        if isprime(n**8+k**8):
          return k
    n = 1
    while n < 100:
      print(a(n))
      n += 1