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.

A358745 a(n) is the least prime p that is the first of three consecutive primes p, q, r such that p^i + q^i - r^i is prime for i from 1 to n but not n+1.

Original entry on oeis.org

2, 7, 41, 13, 4799, 45631, 332576273, 157108359787, 4001045161
Offset: 0

Views

Author

J. M. Bergot and Robert Israel, Nov 29 2022

Keywords

Comments

For any prime x, if p == r (mod x) and q <> x, or q == r (mod x) and p <> x, p^i + q^i - r^i is not divisible by x. Thus there is no modular obstruction to the sequence being infinite.
If a(9) exists, then it exceeds 8*10^12. - Lucas A. Brown, Mar 08 2024

Examples

			a(3) = 13 because 13, 17, 19 are consecutive primes with 13 + 17 - 19 = 11, 13^2 + 17^2 - 19^2 = 97 and 13^3 + 17^3 - 19^3 = 251 are prime but 13^4 + 17^4 - 19^4 = -18239 is not, and no prime less than 13 works.
		

Crossrefs

Programs

  • Maple
    V:= Array(0..5):
    q:= 2: r:= 3: count:= 0:
    while count < 6 do
      p:= q; q:= r; r:= nextprime(r);
      for i from 1 while isprime(p^i+q^i-r^i) do od:
      if V[i-1] = 0 then V[i-1]:= p; count:= count+1 fi;
    od:
    convert(V,list);
  • PARI
    a(n) = my(p=2, q=nextprime(p+1)); forprime(r=nextprime(q+1), oo, my(c=0); for(k=1, oo, if(isprime(p^k + q^k - r^k), c+=1, break)); if(c==n, return(p)); p = q; q = r); \\ Daniel Suteu, Jan 04 2023

Extensions

a(6) from Michael S. Branicky, Nov 29 2022
a(7) from Daniel Suteu, Jan 04 2023