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!)
A339422 G.f.: 1 / (1 + Sum_{k>=0} x^(2^k)). 3
1, -1, 0, 1, -2, 2, 0, -3, 4, -2, -2, 6, -6, 0, 8, -11, 4, 10, -20, 14, 10, -36, 38, -2, -54, 84, -46, -56, 152, -144, -8, 221, -316, 146, 244, -570, 482, 120, -876, 1110, -350, -1108, 2138, -1520, -896, 3548, -3914, 566, 4906, -8068, 4714, 4864, -14080, 13652, 466, -20656 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,5

COMMENTS

The difference between the number of compositions (ordered partitions) of n into an even number of powers of 2 and the number of compositions (ordered partitions) of n into an odd number of powers of 2.

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..5000

FORMULA

G.f. A(x) satisfies: A(x) = A(x^2) / (1 + x * A(x^2)).

a(0) = 1; a(n) = -Sum_{k=1..n} A209229(k) * a(n-k).

MAPLE

b:= proc(n, t) option remember; `if`(n=0, t,

      add(b(n-2^i, -t), i=0..ilog2(n)))

    end:

a:= n-> b(n, 1):

seq(a(n), n=0..60);  # Alois P. Heinz, Dec 03 2020

MATHEMATICA

nmax = 55; CoefficientList[Series[1/(1 + Sum[x^(2^k), {k, 0, Floor[Log[2, nmax]] + 1}]), {x, 0, nmax}], x]

a[0] = 1; a[n_] := a[n] = -Sum[If[IntegerQ[Log[2, k]], 1, 0] a[n - k], {k, 1, n}]; Table[a[n], {n, 0, 55}]

CROSSREFS

Cf. A000079, A023359, A104977, A209229.

Sequence in context: A336889 A278482 A324657 * A094053 A294598 A077264

Adjacent sequences:  A339419 A339420 A339421 * A339423 A339424 A339425

KEYWORD

sign

AUTHOR

Ilya Gutkovskiy, Dec 03 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 31 22:27 EDT 2021. Contains 346377 sequences. (Running on oeis4.)