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.

A245510 Records in A245509: smallest m > 1 such that the first odd number greater than m^k is prime for every 0 < k < n, but not for k = n.

Original entry on oeis.org

7, 5, 2, 105, 3, 909, 4995825, 28212939, 4836335472639, 223671748721751
Offset: 1

Views

Author

Stanislav Sykora, Jul 24 2014

Keywords

Comments

For more comments and a program, see A245509. a(9), if it exists, certainly exceeds 1050000000. It is not clear whether this sequence is infinite, nor whether a(n) is defined for every n.
For n > 3, a(n) is always odd, because A245509(i) can exceed 3 only when i is odd. Therefore to find more terms, it suffices to find odd bases m such that m+2, m^2+2, m^3+2, m^4+2, ..., m^N+2 is a long list of primes. - Jeppe Stig Nielsen, Sep 09 2022
From Jon E. Schoenfield, Sep 09 2022: (Start)
For any term m beyond a(8) that exists, each of the following holds:
m = p - 2, where p is a prime (so m is odd);
m == 0 (mod 3);
m == {-1, 0, 1} (mod 5);
m == {-1, 0, 1} (mod 11);
consequently, m mod 330 is one of 9 values: {21, 45, 99, 111, 165, 219, 231, 285, 309}.
(End)

Examples

			a(4) = 105 because 105 is the smallest m such that the first odd numbers after m^k are prime for k = 1,2,3, but composite for k = 4.
909+2, 909^2+2, 909^3+2, 909^4+2 and 909^5+2 are five primes, but 909^6+2 is composite, and 909 is minimal with this property. Therefore, a(6)=909 (and A245509(909)=6). - _Jeppe Stig Nielsen_, Sep 09 2022
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{d = If[ OddQ@ n, 2, 1], m = 1, t}, While[t = n^m + d; EvenQ@ t || PrimeQ@ t, m++]; m]; t = Table[0, {25}]; k = 2; While[k < 29000000, a = f@ k; If[ t[[a]] == 0, t[[a]] = k; Print[{a, k}]]; k++]; t (* Robert G. Wilson v, Aug 04 2014 *)
  • PARI
    a(n) = for(k=1, oo, c=0; for(i=1, n-1, if(isprime(k^i+(k%2)+1), c++)); if(c==n-1&&!isprime(k^n+(k%2)+1), return(k)))
    n=1; while(n<10, print1(a(n),", "); n++) \\ Derek Orr, Jul 27 2014
    
  • PARI
    upto(n)=v=vector(n);forstep(m=3,+oo,2,k=1;while(ispseudoprime(m^k+2),k++);if(k<=n&&v[k]==0,v[k]=m-(k==3)*7;print(v);vecprod(v)!=0&&return(v))) \\ Jeppe Stig Nielsen, Sep 09 2022

Extensions

a(4) and example corrected by Derek Orr, Jul 27 2014
a(8) from Robert G. Wilson v, Aug 04 2014
a(9) from Kellen Shenton, Sep 14 2022
a(10) from Kellen Shenton, Sep 16 2022