|
|
A373198
|
|
Number of squarefree numbers from prime(n) to prime(n+1) - 1.
|
|
15
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
FORMULA
|
|
|
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
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:
For squarefree numbers between powers of two:
For primes between powers of two:
- sum is A293697 (except initial terms)
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|