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.

A242556 Least number k such that k^64 + n^64 is prime.

Original entry on oeis.org

1, 37, 32, 39, 118, 13, 16, 11, 154, 41, 8, 29, 6, 17, 64, 7, 14, 107, 66, 63, 58, 87, 38, 397, 282, 69, 32, 129, 12, 67, 210, 3, 200, 227, 82, 55, 2, 7, 4, 541, 10, 103, 64, 167, 286, 71, 60, 593, 6, 459, 14, 3, 2, 91, 4, 81, 98, 21, 164, 47, 36, 51, 10, 15, 84, 19, 30
Offset: 1

Views

Author

Derek Orr, May 17 2014

Keywords

Comments

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

Crossrefs

Programs

  • Mathematica
    lnk[n_]:=Module[{c=n^64,k=1},While[!PrimeQ[c+k^64],k++];k]; Array[lnk,70] (* Harvey P. Dale, Oct 21 2017 *)
  • PARI
    a(n)=for(k=1,oo,if(ispseudoprime(n^64+k^64),return(k)));
  • Python
    import sympy
    from sympy import isprime
    def a(n):
      for k in range(10**4):
        if isprime(n**64+k**64):
          return k
    n = 1
    while n < 100:
      print(a(n))
      n += 1