cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A339427 Number of compositions (ordered partitions) of n into an odd number of powers of 2.

This page as a plain text file.
%I A339427 #5 Dec 03 2020 20:28:27
%S A339427 0,1,1,1,4,4,9,17,26,50,88,150,274,478,841,1497,2634,4650,8234,14518,
%T A339427 25654,45340,80040,141414,249822,441192,779422,1376752,2431772,
%U A339427 4295678,7587761,13402881,23675186,41819442,73869802,130483966,230485902,407130212,719154602
%N A339427 Number of compositions (ordered partitions) of n into an odd number of powers of 2.
%H A339427 <a href="/index/Com#comp">Index entries for sequences related to compositions</a>
%F A339427 G.f.: (1/2) * (1 / (1 - Sum_{k>=0} x^(2^k)) - 1 / (1 + Sum_{k>=0} x^(2^k))).
%F A339427 a(n) = (A023359(n) - A339422(n)) / 2.
%F A339427 a(n) = -Sum_{k=0..n-1} A023359(k) * A339422(n-k).
%e A339427 a(5) = 4 because we have [2, 2, 1], [2, 1, 2], [1, 2, 2] and [1, 1, 1, 1, 1].
%p A339427 b:= proc(n, t) option remember; `if`(n=0, t,
%p A339427       add(b(n-2^i, 1-t), i=0..ilog2(n)))
%p A339427     end:
%p A339427 a:= n-> b(n, 0):
%p A339427 seq(a(n), n=0..42);  # _Alois P. Heinz_, Dec 03 2020
%t A339427 nmax = 38; CoefficientList[Series[(1/2) (1/(1 - Sum[x^(2^k), {k, 0, Floor[Log[2, nmax]] + 1}]) - 1/(1 + Sum[x^(2^k), {k, 0, Floor[Log[2, nmax]] + 1}])), {x, 0, nmax}], x]
%Y A339427 Cf. A000079, A023359, A040039, A166444, A339422, A339426.
%K A339427 nonn
%O A339427 0,5
%A A339427 _Ilya Gutkovskiy_, Dec 03 2020