login
A373198
Number of squarefree numbers from prime(n) to prime(n+1) - 1.
32
1, 1, 2, 2, 1, 3, 1, 3, 2, 2, 4, 3, 2, 2, 2, 4, 1, 4, 3, 1, 4, 2, 4, 5, 1, 2, 3, 1, 3, 7, 3, 3, 2, 6, 1, 3, 4, 3, 2, 4, 1, 7, 1, 3, 1, 8, 9, 2, 1, 3, 4, 1, 4, 4, 4, 4, 1, 3, 2, 2, 6, 8, 3, 1, 2, 10, 3, 5, 1, 1, 5, 4, 3, 3, 3, 3, 6, 3, 5, 7, 1, 6, 1, 5, 2, 4, 5
OFFSET
1,3
FORMULA
a(n) = A061398(n) + 1.
EXAMPLE
This is the sequence of row-lengths of A005117 treated as a triangle with row-sums A373197:
2
3
5 6
7 10
11
13 14 15
17
19 21 22
23 26
29 30
31 33 34 35
37 38 39
41 42
43 46
47 51
53 55 57 58
MATHEMATICA
Table[Length[Select[Range[Prime[n], Prime[n+1]-1], SquareFreeQ]], {n, 100}]
PROG
(Python)
from math import isqrt
from sympy import prime, nextprime, mobius
def A373198(n):
p = prime(n)
q = nextprime(p)
r = isqrt(p-1)+1
return sum(mobius(k)*((q-1)//k**2) for k in range(r, isqrt(q-1)+1))+sum(mobius(k)*((q-1)//k**2-(p-1)//k**2) for k in range(1, r)) # Chai Wah Wu, Jun 01 2024
CROSSREFS
Counting all numbers (not just squarefree) gives A001223, sum A371201.
For composite instead of squarefree we have A046933.
For squarefree numbers (A005117) between primes:
- sum is A373197
- length is A373198 (this sequence) = A061398 - 1
- min is A000040
- max is A112925, opposite A112926
For squarefree numbers between powers of two:
- sum is A373123
- length is A077643, partial sums A143658
- min is A372683, delta A373125, indices A372540, firsts of A372475
- max is A372889, delta A373126
For primes between powers of two:
- sum is A293697 (except initial terms)
- length is A036378
- min is A104080 or A014210, indices A372684 (firsts of A035100)
- max is A014234, delta A013603
Cf. A372473 (firsts of A372472), A372541 (firsts of A372433).
Sequence in context: A206441 A175245 A167413 * A340985 A259176 A237591
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 29 2024
STATUS
approved