OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
Primes 4 and 5 are 7 and 11, and the interval (8,9,10) contains only squarefree 10, so 4 is in the sequence.
MAPLE
R:= NULL: count:= 0: q:= 2:
for k from 1 while count < 100 do
p:= q; q:= nextprime(q);
if nops(select(numtheory:-issqrfree, [$p+1 .. q-1]))=1 then
R:= R, k; count:= count+1;
fi
od:
R; # Robert Israel, Nov 29 2024
MATHEMATICA
Select[Range[100], Length[Select[Range[Prime[#]+1, Prime[#+1]-1], SquareFreeQ]]==1&]
PROG
(PARI) is(n, p=prime(n))=my(q=nextprime(p+1), s); for(k=p+1, q-1, if(issquarefree(k) && s++>1, return(0))); s==1 \\ Charles R Greathouse IV, Nov 29 2024
CROSSREFS
For composite instead of squarefree we have A029707.
For no squarefree numbers we have A068360.
For prime-power instead of squarefree we have A377287.
For at least one squarefree number we have A377431.
For perfect-power instead of squarefree we have A377434.
A377038 gives k-differences of squarefree numbers.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 29 2024
STATUS
approved