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.

Showing 1-8 of 8 results.

A158979 a(n) is the smallest number > n such that n^4 + a(n)^4 is prime.

Original entry on oeis.org

2, 3, 4, 5, 8, 7, 10, 9, 10, 13, 16, 13, 14, 15, 22, 17, 20, 23, 24, 29, 38, 29, 26, 41, 26, 27, 28, 33, 34, 37, 32, 37, 34, 35, 52, 37, 38, 39, 46, 41, 50, 53, 44, 47, 58, 55, 50, 49, 60, 61, 62, 61, 56, 55, 58, 59, 68, 61, 62, 73, 66, 77, 64, 67, 84, 71
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Apr 01 2009

Keywords

Comments

For exponent 2 instead of 4 see A089489: Pythagorean triple has a prime hypotenuse.
Corresponding sequences with odd exponent u are impossible: x^u + y^u has factor x+y.
a(2k-1) is even, a(2k) is odd, a(n)-n is odd.
Conjecture: a(n) exists for all n, i.e., the sequence is well-defined and infinite.
Conjecture: a(n)-n = 1 for infinitely many n.
The largest value of a(n)-n for n <= 100 occurs at n = 90: 121-90 = 31.
a(n)-n = 1 for 35 values of n <= 100.

Examples

			1^4 + 2^4 = 17 is prime, so a(1) = 2.
2^4 + 3^4 = 97 is prime, so a(2) = 3.
5^4 + 6^4 = 1921 = 17*113, 5^4 + 7^4 = 3026 = 2*17*89, 5^4 + 8^4 = 4721 is prime, so a(5) = 8.
		

Crossrefs

Cf. A089489.

Programs

  • Magma
    S:=[]; for n in [1..72] do q:=n^4; k:=n+1; while not IsPrime(q+k^4) do k+:=1; end while; Append(~S, k); end for; S; // Klaus Brockhaus, Apr 12 2009
  • Mathematica
    sn[n_]:=Module[{k=n+1,n4=n^4},While[CompositeQ[n4+k^4],k++];k]; Array[sn,80] (* Harvey P. Dale, Aug 09 2023 *)

Extensions

Edited and entries verified by Klaus Brockhaus, Apr 12 2009
Corrected by Harvey P. Dale, Aug 09 2023

A068487 Smallest prime equal to n^2 + m^2 with n

Original entry on oeis.org

5, 13, 73, 41, 61, 157, 113, 233, 181, 269, 317, 313, 569, 421, 709, 617, 613, 853, 761, 929, 1117, 1013, 1429, 1201, 1301, 1637, 1753, 1873, 1741, 1861, 2897, 2113, 2689, 2381, 2521, 3697, 2969, 3469, 3121, 3449, 3617, 3613, 4153, 4337, 4729, 4517, 4513
Offset: 1

Views

Author

Lekraj Beedassy, Mar 11 2002

Keywords

Comments

All terms are congruent to 1 (mod 4). - Carmine Suriano, Mar 30 2011

Crossrefs

Cf. A089489 (values of m).

Programs

  • Maple
    for n from 1 to 100 do m := n+1:while(not isprime(n^2+m^2)) do m := m+1; end do:a[n] := n^2+m^2:end do:q := seq(a[i],i=1..100);
  • Mathematica
    Table[k = n + 1; While[p = n^2 + k^2; ! PrimeQ[p], k++]; p, {n, 100}] (* T. D. Noe, Mar 30 2011 *)

Extensions

More terms from Sascha Kurz, Mar 17 2002

A378898 a(n) is the least k > 0 such that (n+k)^2 + n^2 is prime.

Original entry on oeis.org

1, 1, 5, 1, 1, 5, 1, 5, 1, 3, 3, 1, 7, 1, 7, 3, 1, 5, 1, 3, 5, 1, 7, 1, 1, 5, 5, 5, 1, 1, 13, 1, 7, 1, 1, 13, 3, 7, 1, 3, 3, 1, 5, 5, 7, 3, 1, 5, 25, 1, 5, 5, 5, 5, 3, 5, 11, 5, 5, 1, 3, 3, 17, 7, 1, 5, 13, 27, 1, 1, 13, 1, 27, 5, 19, 9, 3, 5, 1, 9, 19, 1, 5, 1, 1, 9, 1, 15, 7, 1, 3, 3, 5, 5, 7
Offset: 1

Views

Author

Robert Israel, Dec 11 2024

Keywords

Examples

			a(3) = 5 because (3+5)^2 + 3^2 = 73 is prime, and no smaller number works.
		

Crossrefs

Cf. A027861 (a(n) = 1), A089489, A378945, A378946.

Programs

  • Maple
    f:= proc(n) local k;
      for k from n+1 by 2 do
        if igcd(k,n) = 1 and isprime(k^2 + n^2) then return k-n fi
      od
    end proc;
    map(f, [$1..100]);
  • PARI
    a(n) = my(k=1); while (!isprime((n+k)^2 + n^2), k++); k; \\ Michel Marcus, Dec 11 2024

Formula

a(n) = A089489(n) - n.

A244932 Least number k > n such that k^8 + n^8 is prime.

Original entry on oeis.org

2, 13, 10, 17, 6, 37, 12, 13, 16, 27, 24, 71, 16, 31, 64, 43, 18, 43, 26, 23, 32, 29, 24, 79, 32, 53, 34, 61, 92, 47, 40, 33, 34, 57, 36, 47, 40, 53, 40, 79, 44, 43, 68, 91, 68, 57, 66, 61, 60, 53, 58, 83, 60, 91, 94, 61, 82, 61, 70, 101, 82, 71, 68, 145, 82, 67, 76, 69, 100
Offset: 1

Views

Author

Derek Orr, Jul 08 2014

Keywords

Comments

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

Examples

			13^8 + 14^8 = 2291519777 is not prime, 13^8 + 15^8 = 3378621346 is not prime. 13^8 + 16^8 = 5110698017 is prime. Thus a(13) = 16.
		

Crossrefs

Programs

  • PARI
    a(n)=for(k=n+1,10^4,if(isprime(k^8+n^8),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**8+n**8):
          return k
    n = 1
    while n < 100:
      print(a(n),end=', ')
      n += 1
    

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

Original entry on oeis.org

2, 85, 4, 33, 6, 7, 8, 13, 22, 13, 16, 41, 28, 15, 22, 19, 24, 23, 54, 31, 22, 27, 56, 61, 38, 29, 40, 37, 34, 61, 32, 35, 82, 35, 46, 43, 40, 49, 58, 67, 42, 55, 58, 49, 46, 61, 58, 61, 68, 73, 92, 63, 94, 77, 166, 57, 82, 63, 72, 109, 76, 121, 82, 79, 86, 67, 72, 77, 82, 71, 98
Offset: 1

Views

Author

Derek Orr, Jul 08 2014

Keywords

Comments

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

Examples

			10^16 + 11^16 = 55949729863572161 is not prime. 10^16 + 12^16 = 2^16*(5^16+6^16) is not prime. 10^16 + 13^16 = 675416609183179841 is prime. Thus a(10) = 13.
		

Crossrefs

Programs

  • PARI
    a(n)=for(k=n+1,10^4,if(isprime(k^16+n^16),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**16+n**16):
          return k
    n = 1
    while n < 100:
      print(a(n),end=', ')
      n += 1
    

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
    

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

Original entry on oeis.org

102, 37, 32, 39, 118, 13, 16, 11, 154, 41, 94, 29, 158, 17, 64, 291, 70, 107, 66, 63, 58, 87, 38, 397, 282, 69, 32, 129, 142, 67, 210, 87, 200, 227, 82, 55, 70, 137, 388, 541, 140, 103, 64, 167, 286, 71, 60, 593, 262, 459, 62, 69, 92, 91, 128, 81, 98, 149, 164, 107, 192, 103
Offset: 1

Views

Author

Derek Orr, Jul 08 2014

Keywords

Comments

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

Examples

			8^64 + 11^64 = 4457915690803004131256192897205630962697827851093882159977969339137 is prime. Since 8^64 + 10^64 and 8^64 + 9^64 are both composite, a(8) = 11.
		

Crossrefs

Programs

  • PARI
    a(n)=for(k=n+1,10^4,if(isprime(k^64+n^64),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**64+n**64):
          return k
    n = 1
    while n < 100:
      print(a(n),end=', ')
      n += 1
    

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=', ')
    
Showing 1-8 of 8 results.