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.

A244950 Least number k > n such that k^128 + n^128 is prime.

Original entry on oeis.org

120, 113, 106, 259, 304, 85, 212, 135, 158, 47, 62, 985, 84, 47, 518, 485, 178, 169, 106, 27, 88, 139, 632, 47, 44, 643, 194, 209, 606, 1529, 32, 113, 1094, 139, 754, 647, 38, 45, 262, 69, 94, 631, 90, 527, 326, 195, 54, 277, 232, 187, 554, 189, 78, 799, 216, 131, 1132, 173
Offset: 1

Views

Author

Derek Orr, Jul 08 2014

Keywords

Comments

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

Examples

			The n-value for which n^128 + 1 is prime (sequence A056994) is n = 120 (where n > 1 by definition). Thus a(1) = 120.
		

Crossrefs

Programs

  • Mathematica
    lnk[n_]:=Module[{k=n+1,n128=n^128},While[!PrimeQ[n128+k^128],k++];k]; Array[lnk,60] (* Harvey P. Dale, Apr 22 2018 *)
  • PARI
    a(n)=for(k=n+1,10^4,if(isprime(k^128+n^128),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**128+n**128):
                return k
    for n in range(1, 100):
        print(a(n), end=', ')