login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A245514
Smallest m such that at least one of the two odd numbers which bracket n^m is not a prime.
6
1, 1, 2, 2, 2, 1, 1, 3, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
OFFSET
2,3
COMMENTS
The locution "the two odd numbers which bracket n^m" indicates the pair (n^m-1,n^m+1) for even n and (n^m-2,n^m+2) for odd n.
The initial records in this sequence are a(2)=1, a(4)=2, a(9)=3, a(102795)=4. No higher value was found up to 5500000. It is not clear whether a(n) is bounded.
LINKS
EXAMPLE
a(2)=1 because one of the two odd numbers (1,3) which bracket 2^1 is not a prime. a(5)=2 because 5^1 is bracketed by the odd numbers (3,7) which are both prime, while 5^2 is bracketed by the odd numbers (23,27), one of which is not a prime.
The number c=102795 is the smallest one whose powers c^1, c^2, c^3 are all odd-bracketed by primes, while c^4 is not.
PROG
(PARI) avector(nmax)={my(n, k, d=2, v=vector(nmax)); for(n=2, #v+1, d=3-d; k=1; while(1, if((!isprime(n^k-d))||(!isprime(n^k+d)), v[n-1]=k; break, k++)); ); return(v); }
a=avector(10000) \\ For nmax=6000000 runs out of 1GB memory
CROSSREFS
KEYWORD
nonn
AUTHOR
Stanislav Sykora, Jul 24 2014
STATUS
approved