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.

A301738 a(n) is the least A for which there exists B with 0 < B < A so that (A^(2^n) + B^(2^n))/2 is prime.

Original entry on oeis.org

3, 3, 3, 5, 3, 3, 3, 49, 7, 35, 67, 75, 157, 107, 71, 137, 275, 531
Offset: 0

Views

Author

Jeppe Stig Nielsen, Mar 26 2018

Keywords

Comments

Both A and B will be odd, with gcd(A, B) = 1. B values can be seen in link section.
If we require B=1, we get A275530. Therefore a(n) <= A275530(n).

Examples

			a(10)=67 corresponds to the prime number (67^1024 + 57^1024)/2, the smallest prime number of the form (A^1024 + B^1024)/2 (or more precisely, it minimizes A).
		

Crossrefs

Programs

  • Mathematica
    Table[a=1; While[Or@@PrimeQ[Table[(a^(2^n)+b^(2^n))/2,{b,a++}]]==False];a,{n,0,9}] (* Giorgos Kalogeropoulos, Mar 31 2021 *)
  • PARI
    for(n=0, 30, forstep(a=3, +oo, 2, forstep(b=1, a-2, 2, if(ispseudoprime((a^(2^n)+b^(2^n))/2), print1(a, ", "); next(3)))))
    
  • Python
    from sympy import isprime
    def a(n):
      A, p, Ap = 3, 2**n, 3**(2**n)
      while True:
        if any(isprime((Ap + B**p)//2) for B in range(1, A, 2)): return A
        A += 2; Ap = A**p
    print([a(n) for n in range(10)]) # Michael S. Branicky, Mar 03 2021

Extensions

a(16)=275 with B=53, calculated by Kellen Shenton, added by Jeppe Stig Nielsen, Nov 10 2020
a(17)=531 with B=25, by Kellen Shenton, added by Jeppe Stig Nielsen, Mar 30 2021