The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A332682 a(n) = Sum_{k=1..n} (-1)^(k+1) * ceiling(n/k). 3
 1, 1, 2, 3, 3, 4, 5, 6, 5, 7, 8, 9, 8, 9, 10, 13, 11, 12, 13, 14, 13, 16, 17, 18, 15, 17, 18, 21, 20, 21, 22, 23, 20, 23, 24, 27, 25, 26, 27, 30, 27, 28, 29, 30, 29, 34, 35, 36, 31, 33, 34, 37, 36, 37, 38, 41, 38, 41, 42, 43, 40, 41, 42, 47, 43, 46, 47, 48, 47, 50 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 LINKS 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 Cf. A006590, A048272, A059851, A275495, A325937. Sequence in context: A300587 A075699 A112330 * A304183 A157222 A320033 Adjacent sequences:  A332679 A332680 A332681 * A332683 A332684 A332685 KEYWORD nonn AUTHOR Ilya Gutkovskiy, Feb 19 2020 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 28 05:44 EDT 2021. Contains 347703 sequences. (Running on oeis4.)