login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A345034 a(n) = Sum_{k=1..n} (-2)^(floor(n/k) - 1). 4
1, -1, 6, -8, 17, -27, 70, -136, 255, -491, 1046, -2082, 4063, -8131, 16476, -32882, 65423, -130845, 262372, -524818, 1048149, -2096045, 4195412, -8390820, 16775029, -33550477, 67113210, -134225588, 268427597, -536854983, 1073757754, -2147517076 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
G.f.: (1/(1 - x)) * Sum_{k>=1} x^k * (1 - x^k)/(1 + 2*x^k).
MATHEMATICA
a[n_] := Sum[(-2)^(Floor[n/k] - 1), {k, 1, n}]; Array[a, 30] (* Amiram Eldar, Jun 06 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, (-2)^(n\k-1));
(PARI) my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, x^k*(1-x^k)/(1+2*x^k))/(1-x))
CROSSREFS
Column k=2 of A345033.
Sequence in context: A025081 A162951 A032411 * A058098 A112158 A270046
KEYWORD
sign
AUTHOR
Seiichi Manyama, Jun 06 2021
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 14 09:01 EDT 2024. Contains 374318 sequences. (Running on oeis4.)