The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

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 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A245513 Smallest m such that neither of the two odd numbers that bracket n^m is a prime. 6
 6, 7, 3, 4, 3, 3, 2, 6, 3, 2, 2, 3, 3, 6, 3, 2, 2, 4, 3, 3, 2, 1, 3, 2, 1, 4, 2, 5, 2, 2, 2, 3, 1, 3, 3, 1, 2, 3, 3, 2, 2, 3, 2, 5, 2, 1, 2, 3, 1, 2, 2, 1, 3, 3, 1, 3, 2, 2, 2, 3, 2, 6, 1, 2, 3, 1, 2, 5, 2, 4, 2, 2, 3, 3, 1, 3, 2, 1, 2, 3, 2, 1, 3, 2, 1, 2, 2, 1, 3, 2, 1, 1, 1, 2, 2 (list; graph; refs; listen; history; text; internal format)
 OFFSET 2,1 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)=6, a(3)=7, a(2055)=8. No higher value was found up to 5500000. It is not clear whether a(n) is bounded. Heuristically, Prob(a(n) > m) ~ (2/log n)^m/m! as n -> infinity for fixed m.  The sum over n diverges, so we should expect infinitely many a(n) > m. - Robert Israel, Aug 12 2014 a(215539779) = 9 is a record and there is no higher value up to 4*10^9. a(n) <= 3 for all even n > 2, since n-1 divides n^3-1 and n+1 divides n^3+1. - Jens Kruse Andersen, Aug 14 2014 LINKS Stanislav Sykora, Table of n, a(n) for n = 2..10000 EXAMPLE a(4)=3 because 4^1 and 4^2 are bracketed by the odd numbers (3,5) and (15,17) and each pair contains a prime, but 4^3 is bracketed by (63,65) which are both nonprimes. a(5)=4 because 5^1, 5^2, and 5^3 are bracketed by odd pairs (3,7), (23,27) and (123,127) which all contain at least one prime. But 5^4 is bracketed by odd numbers (623,627) which are both composites. MAPLE f:= proc(n) local m, nm;   for m from 1 do     nm:= n^m;     if n::odd then if not isprime(nm+2) and not isprime(nm-2) then return(m) fi     elif not isprime(nm+1) and not isprime(nm-1) then return(m)     fi   od end proc: seq(f(n), n=2..1000); # Robert Israel, Aug 12 2014 MATHEMATICA a245513Q[n_Integer] := Module[{i},   Catch[For[i = 0, i <= 20, i++,     If[EvenQ[n],      If[! PrimeQ[n^i + 1] && ! PrimeQ[n^i - 1], Throw[i]],      If[! PrimeQ[n^i + 2] && ! PrimeQ[n^i - 2], Throw[i]]      ]]]]; a245513[n_Integer] := a245513Q /@ Range[2, n]; a245513[120] (* Michael De Vlieger, Aug 12 2014 *) 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 Cf. A245509, A245510, A245511, A245512, A245514. Sequence in context: A153628 A154972 A093603 * A105739 A105831 A248650 Adjacent sequences:  A245510 A245511 A245512 * A245514 A245515 A245516 KEYWORD nonn AUTHOR Stanislav Sykora, Jul 24 2014 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 3 12:16 EST 2021. Contains 349462 sequences. (Running on oeis4.)