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.

A242555 Least number k such that k^32 + n^32 is prime.

Original entry on oeis.org

1, 29, 40, 33, 34, 131, 50, 9, 8, 11, 10, 13, 12, 97, 166, 221, 200, 13, 10, 61, 176, 23, 22, 65, 94, 151, 352, 87, 2, 1, 38, 39, 4, 5, 48, 137, 18, 11, 4, 3, 60, 55, 40, 9, 106, 33, 10, 29, 134, 7, 44, 33, 50, 1, 38, 5, 148, 37, 2, 41, 10, 11, 94, 75, 4, 5, 100, 5, 22
Offset: 1

Views

Author

Derek Orr, May 17 2014

Keywords

Comments

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

Crossrefs

Programs

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