The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A368749 a(n) is the smallest prime p such that there are n numbers between p and nextprime(p) which are not prime powers. 2
 2, 5, 13, 19, 31, 53, 359, 89, 241, 139, 509, 113, 839, 293, 2803, 1831, 523, 1069, 11447, 887, 3469, 1129, 1669, 4177, 39581, 2477, 24631, 2971, 16381, 4297, 124601, 5591, 1327, 8467, 22193, 9551, 79493, 30593, 62989, 19333, 410857, 16141, 436913, 15683, 1038337, 81463, 157579 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,1 COMMENTS Conjecture: the sequence is infinite (number of nonprime powers between consecutive primes is arbitrarily large; see A014963). LINKS Table of n, a(n) for n=0..46. EXAMPLE a(2) = 13 because between 13 and 17 there are three composite numbers, only one of which (16) is a prime power, and no previous prime has this property. a(5) = 53 because between 53 and 59 there are 5 composite numbers, none of which are prime powers, and no smaller prime has this property. MATHEMATICA p = q = 2; r = a[_] = 0; Do[q = NextPrime[q]; If[a[#] == 0, a[#] = p; If[# > r, r = #]] &@ Count[Range[p, q - 1], _?(Not@*PrimePowerQ)]; p = q, {i, 2^16}]; {2}~Join~TakeWhile[Array[a, r], # > 0 &] (* Michael De Vlieger, Jan 04 2024 *) PROG (PARI) f(p) = sum(k=p+1, nextprime(p+1)-1, !isprimepower(k)); a(n) = my(p=2); while(f(p) != n, p=nextprime(p+1)); p; \\ Michel Marcus, Jan 04 2024 CROSSREFS Cf. A000040, A000230, A000961, A014963, A024619, A080101, A085970, A093555, A368748. Sequence in context: A077545 A069943 A273462 * A094158 A307244 A191082 Adjacent sequences: A368746 A368747 A368748 * A368750 A368751 A368752 KEYWORD nonn AUTHOR David James Sycamore and Michael De Vlieger, Jan 04 2024 EXTENSIONS More terms from Michel Marcus, Jan 04 2024 STATUS approved

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

Last modified September 15 11:45 EDT 2024. Contains 375938 sequences. (Running on oeis4.)