OFFSET
1,4
LINKS
Harry J. Smith, Table of n, a(n) for n=1..1000
EXAMPLE
Between 113 and 127 the 7 numbers which are not squarefree are {116,117,120,121,124,125,126}, so a(30)=7.
MATHEMATICA
Count[Range[#[[1]]+1, #[[2]]-1], _?(!SquareFreeQ[#]&)]&/@Partition[Prime[Range[120]], 2, 1] (* Harvey P. Dale, Mar 31 2024 *)
PROG
(PARI) { n=0; q=2; forprime (p=3, prime(1001), a=0; for (i=q+1, p-1, a+=!issquarefree(i)); write("b061399.txt", n++, " ", a); q=p ) } \\ Harry J. Smith, Jul 22 2009
(Python)
from sympy import mobius, prime
def A061399(n): return sum(not mobius(m) for m in range(prime(n)+1, prime(n+1))) # Chai Wah Wu, Jul 20 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jun 07 2001
STATUS
approved