|
|
A351520
|
|
Number of numbers <= n that are either squarefree, a divisor of n, or both.
|
|
0
|
|
|
1, 2, 3, 4, 4, 5, 6, 8, 7, 7, 8, 10, 9, 10, 11, 14, 12, 14, 13, 15, 14, 15, 16, 20, 17, 17, 19, 19, 18, 19, 20, 24, 21, 22, 23, 28, 24, 25, 26, 30, 27, 28, 29, 31, 31, 30, 31, 37, 32, 33, 32, 34, 33, 37, 34, 38, 35, 36, 37, 41, 38, 39, 41, 44, 40, 41, 42, 44, 43, 44, 45, 53, 46, 47, 49
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = tau(n) + Sum_{k=1..n} mu(k)^2 - Sum_{d|n} mu(d)^2.
|
|
EXAMPLE
|
a(10) = 7; There are 7 numbers less than or equal to 10 that are either squarefree, a divisor of 10, or both. The numbers are 1,2,3,5,6,7,10.
|
|
MATHEMATICA
|
Module[{nn=80, sf}, sf=Select[Range[nn], SquareFreeQ[#]&]; Table[Length[Union[Select[sf, #<= n&], Divisors[n]]], {n, nn}]] (* Harvey P. Dale, Jul 03 2023 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|