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

A061399
Number of nonsquarefree integers between primes prime(n) and prime(n+1).
51
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.
From Gus Wiseman, Dec 07 2024: (Start)
The a(n) nonsquarefree numbers for n = 1..15:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
----------------------------------------------------------
. 4 . 8 12 16 18 20 24 . 32 40 . 44 48
9 25 36 45 49
27 50
28 52
(End)
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
(PARI) a(n) = my(p=prime(n)); sum(k=p, nextprime(p+1), ! issquarefree(k)); \\ Michel Marcus, Dec 09 2024
(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
Zeros are A068361.
First differences of A378086, restriction of A057627 to the primes.
Other classes (instead of nonsquarefree):
- For composite we have A046933, first differences of A065890.
- For squarefree see A061398, A068360, A071403, A373197, A373198, A377431.
- For prime power we have A080101.
- For non prime power we have A368748, see A378616.
- For perfect power we have A377432, zeros A377436.
- For non perfect power we have A377433, A029707.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers, differences A076259.
A013929 lists the nonsquarefree numbers, differences A078147.
A120327 gives the least nonsquarefree number >= n.
Sequence in context: A204929 A362490 A118210 * A161856 A122944 A107688
KEYWORD
nonn
AUTHOR
Labos Elemer, Jun 07 2001
STATUS
approved