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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A333194 a(n) = Sum_{k=1..n} (ceiling(n/k) mod 2) * k. 1
1, 2, 4, 4, 8, 8, 11, 11, 19, 16, 21, 21, 30, 30, 37, 29, 45, 45, 51, 51, 66, 56, 67, 67, 88, 83, 96, 84, 105, 105, 112, 112, 144, 130, 147, 135, 159, 159, 178, 162, 197, 197, 208, 208, 241, 209, 232, 232, 277, 270, 290, 270, 309, 309, 324, 308, 357, 335, 364, 364 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..60.

FORMULA

G.f.: (x/(1 - x)) * (1/(1 - x)^2 - Sum_{k>=1} k * x^k / (1 + x^k)).

a(n) = n*(n + 1)/2 - Sum_{k=1..n-1} A000593(k).

a(n) = A000217(n) - A078471(n-1).

MAPLE

b:= n-> add(d, d=select(x-> x::odd, numtheory[divisors](n))):

a:= proc(n) option remember; n+`if`(n<2, 0, a(n-1))-b(n-1) end:

seq(a(n), n=1..60);  # Alois P. Heinz, May 25 2020

MATHEMATICA

Table[Sum[Mod[Ceiling[n/k], 2] k, {k, 1, n}], {n, 1, 60}]

Table[n (n + 1)/2 - Sum[DivisorSum[k, (-1)^(k/# + 1) # &], {k, 1, n - 1}], {n, 1, 60}]

nmax = 60; CoefficientList[Series[x/(1 - x) (1/(1 - x)^2 - Sum[k x^k/(1 + x^k), {k, 1, nmax}]), {x, 0, nmax}], x] // Rest

PROG

(PARI) a(n) = sum(k=1, n, (ceil(n/k) % 2)*k); \\ Michel Marcus, May 26 2020

CROSSREFS

Cf. A000217, A000593, A078471, A120885, A330926, A332490.

Sequence in context: A140513 A265322 A188112 * A166632 A116596 A248692

Adjacent sequences:  A333191 A333192 A333193 * A333195 A333196 A333197

KEYWORD

nonn

AUTHOR

Ilya Gutkovskiy, May 25 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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 14 15:44 EDT 2020. Contains 335729 sequences. (Running on oeis4.)