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.

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

Original entry on oeis.org

30, 29, 40, 33, 34, 131, 50, 9, 44, 11, 38, 13, 18, 97, 166, 221, 200, 37, 82, 61, 176, 23, 102, 65, 94, 151, 352, 87, 38, 37, 38, 39, 46, 37, 48, 137, 54, 55, 68, 43, 60, 55, 146, 51, 106, 87, 82, 65, 134, 53, 106, 103, 90, 71, 96, 71, 148, 91, 94, 139, 74, 69, 94, 75, 86, 169, 100
Offset: 1

Views

Author

Derek Orr, Jul 08 2014

Keywords

Comments

a(n) = n+1 iff n is in A174156.

Examples

			34^32 + 35^32 = 35884563485651241417769982593434627193100364196481 is not prime. 34^2 + 36^32 = 2^32*(17^32+18^32) is not prime. 34^32 + 37^32 = 162384303092765940334383766635859112907663593431937 is prime. Thus a(34) = 37.
		

Crossrefs

Programs

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