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”).

A378111
a(n) is the least prime p such that there are exactly n squarefree numbers strictly between p and the next prime, or -1 if there is no such p.
1
2, 5, 13, 31, 89, 139, 113, 199, 211, 317, 1759, 1381, 1951, 887, 4523, 2179, 2477, 4831, 5351, 4297, 1327, 9973, 14107, 19333, 16141, 20809, 15683, 37907, 28229, 58831, 31907, 19609, 25471, 40289, 114493, 43331, 44293, 34061, 191353, 31397, 107377, 134513, 186481, 448451, 175141, 332317, 188029
OFFSET
0,1
COMMENTS
a(n) = A000040(k) where k is the least number such that A061398(k) = n.
LINKS
David A. Corneth, Table of n, a(n) for n = 0..253 (first 144 terms from Robert Israel)
David A. Corneth, PARI program
EXAMPLE
a(3) = 31 because there are 3 squarefree numbers between 31 and the next prime 37, namely 33, 34 and 35, and 31 is the least prime that works.
MAPLE
V:= Array(0..100): count:= 0: q:= 2:
for k from 1 while count < 101 do
p:= q; q:= nextprime(q);
v:= nops(select(numtheory:-issqrfree, [$p+1 .. q-1]));
if v <= 100 and V[v] = 0 then
V[v]:= p; count:= count+1;
fi
od:
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Nov 29 2024
STATUS
approved