[go: up one dir, main page]

login
A061399
Number of nonsquarefree integers between primes prime(n) and prime(n+1).
26
0, 1, 0, 2, 1, 1, 1, 1, 4, 0, 2, 1, 0, 2, 4, 2, 1, 2, 1, 1, 2, 2, 2, 3, 3, 0, 1, 1, 1, 7, 1, 3, 0, 4, 1, 3, 2, 1, 4, 2, 1, 3, 1, 1, 1, 4, 3, 2, 1, 1, 2, 1, 6, 2, 2, 2, 1, 3, 2, 0, 4, 6, 1, 1, 2, 4, 3, 5, 1, 3, 1, 4, 3, 3, 1, 3, 2, 1, 3, 3, 1, 4, 1, 1, 2, 2, 3, 2, 0, 1, 5, 3, 2, 3, 1, 3, 4, 1, 9, 1, 5, 2, 3, 0, 3
OFFSET
1,4
LINKS
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
Sequence in context: A204929 A362490 A118210 * A161856 A122944 A107688
KEYWORD
nonn
AUTHOR
Labos Elemer, Jun 07 2001
STATUS
approved