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.

A357534 Number of compositions (ordered partitions) of n into two or more powers of 2.

This page as a plain text file.
%I A357534 #12 Dec 26 2022 11:39:47
%S A357534 0,0,1,3,5,10,18,31,55,98,174,306,542,956,1690,2983,5271,9310,16448,
%T A357534 29050,51318,90644,160118,282826,499590,882468,1558798,2753448,
%U A357534 4863696,8591212,15175514,26805983,47350055,83639030,147739848,260967362,460972286,814260544,1438308328
%N A357534 Number of compositions (ordered partitions) of n into two or more powers of 2.
%F A357534 a(n) = A023359(n) - A209229(n) for n > 0.
%p A357534 b:= proc(n) option remember;
%p A357534       `if`(n=0, 1, add(b(n-2^i), i=0..ilog2(n)))
%p A357534     end:
%p A357534 a:= n-> b(n)-`if`(2^ilog2(n)=n, 1, 0):
%p A357534 seq(a(n), n=0..50);  # _Alois P. Heinz_, Oct 02 2022
%t A357534 b[n_] := b[n] = If[n == 0, 1, Sum[b[n - 2^i], {i, 0, Floor@ Log2[n]}]];
%t A357534 a[n_] :=  b[n] - If[2^Floor@Log2[n] == n, 1, 0];
%t A357534 Table[a[n], {n, 0, 50}] (* _Jean-François Alcover_, Dec 26 2022, after _Alois P. Heinz_ *)
%Y A357534 Cf. A023359, A093659, A209229, A357476.
%K A357534 nonn
%O A357534 0,4
%A A357534 _Ilya Gutkovskiy_, Oct 02 2022