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.

A242554 Least number k such that n^16 + k^16 is prime.

Original entry on oeis.org

1, 1, 4, 3, 6, 5, 6, 7, 22, 13, 16, 5, 8, 5, 14, 11, 10, 7, 16, 31, 8, 9, 10, 11, 38, 29, 10, 9, 22, 61, 20, 5, 4, 3, 16, 11, 6, 25, 28, 7, 6, 17, 16, 1, 46, 9, 58, 61, 22, 41, 92, 3, 14, 19, 14, 23, 56, 37, 20, 109, 6, 121, 10, 39, 4, 67, 34, 11, 26, 9, 30, 11, 12, 1
Offset: 1

Views

Author

Derek Orr, May 17 2014

Keywords

Comments

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

Examples

			4^16+1^16 = 4294967297 is not prime. 4^16+2^16 = 4295032832 is not prime. 4^16+3^16 = 4338014017 is prime. Thus, a(4) = 3.
		

Crossrefs

Programs

  • PARI
    a(n)=for(k=1,oo,if(ispseudoprime(n^16+k^16),return(k)));
  • Python
    import sympy
    from sympy import isprime
    def a(n):
      for k in range(10**4):
        if isprime(n**16+k**16):
          return k
    n = 1
    while n < 100:
      print(a(n))
      n += 1