OFFSET
1,1
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)
LINKS
EXAMPLE
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
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Stanislav Sykora, Jul 24 2014
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
STATUS
approved