OFFSET
1,3
FORMULA
G.f.: (x/(1 - x)) * (1 + Sum_{k>=2} x^k / (1 + x^k)).
G.f.: (x/(1 - x)) * (1 + Sum_{k>=1} (-1)^(k+1) * x^(2*k) / (1 - x^k)).
a(n) = (n mod 2) + Sum_{k=1..n-1} A048272(k).
MATHEMATICA
Table[Sum[(-1)^(k + 1) Ceiling[n/k], {k, 1, n}], {n, 1, 70}]
nmax = 70; CoefficientList[Series[(x/(1 - x)) (1 + Sum[x^k/(1 + x^k), {k, 2, nmax}]), {x, 0, nmax}], x] // Rest
PROG
(PARI) a(n) = sum(k=1, n, (-1)^(k+1)*ceil(n/k)); \\ Michel Marcus, Feb 21 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 19 2020
STATUS
approved