|
|
A368677
|
|
Number of numbers k less than n and not dividing n such that n-k is squarefree.
|
|
2
|
|
|
0, 0, 1, 1, 3, 2, 4, 4, 5, 5, 6, 5, 8, 7, 8, 9, 11, 10, 12, 10, 12, 12, 14, 13, 16, 15, 16, 14, 17, 16, 18, 18, 18, 19, 20, 19, 23, 22, 23, 22, 26, 23, 27, 25, 27, 28, 29, 28, 30, 31, 30, 29, 32, 31, 33, 32, 33, 33, 35, 32, 37, 36, 37, 38, 39, 37, 40, 38, 40, 40
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
LINKS
|
|
|
FORMULA
|
a(n) = Sum_{k=1..n} mu(n-k)^2 * (ceiling(n/k) - floor(n/k)).
|
|
EXAMPLE
|
a(12) = 5. The numbers less than 12 that do not divide 12 are: {5,7,8,9,10,11} with values of n-k: {7,5,4,3,2,1} (exactly 5 of which are squarefree).
|
|
MATHEMATICA
|
Table[Sum[MoebiusMu[n - k]^2 (Ceiling[n/k] - Floor[n/k]), {k, n}], {n, 100}]
|
|
PROG
|
(PARI) a(n) = sum(k=1, n-1, (n % k) && issquarefree(n-k)); \\ Michel Marcus, Jan 03 2024
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|