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.

A319140 Total number of binary digits in all partitions of n into distinct parts.

This page as a plain text file.
%I A319140 #28 Aug 15 2021 21:04:30
%S A319140 1,2,5,6,11,17,23,30,44,60,76,102,128,166,214,264,327,413,502,618,759,
%T A319140 917,1105,1335,1598,1907,2279,2702,3191,3776,4436,5198,6101,7113,8292,
%U A319140 9653,11188,12951,14984,17277,19889,22881,26248,30073,34439,39320,44850
%N A319140 Total number of binary digits in all partitions of n into distinct parts.
%H A319140 Alois P. Heinz, <a href="/A319140/b319140.txt">Table of n, a(n) for n = 1..5000</a>
%e A319140 For n = 4 there are 2 partitions into distinct parts in binary they are: 100, 11+1, for a total of 6 binary parts.
%p A319140 h:= proc(n) option remember; 1+ilog2(n) end:
%p A319140 b:= proc(n, i) option remember; `if`(n=0, [1, 0],
%p A319140       `if`(n>i*(i+1)/2, 0, b(n, i-1)+(p-> p+h(i)
%p A319140        *[0, p[1]])(b(n-i, min(n-i, i-1)))))
%p A319140     end:
%p A319140 a:= n-> b(n$2)[2]:
%p A319140 seq(a(n), n=1..60);  # _Alois P. Heinz_, Sep 27 2018
%t A319140 h[n_] := h[n] = 1+Log[2, n] // Floor;
%t A319140 b[n_, i_] := b[n, i] = If[n == 0, {1, 0}, If[n > i*(i+1)/2, 0, b[n, i-1] + Function[p, p + h[i]*{0, p[[1]]}][b[n-i, Min[n-i, i-1]]]]];
%t A319140 a[n_] := b[n, n][[2]];
%t A319140 a /@ Range[1; 60] (* _Jean-François Alcover_, Sep 28 2019, after _Alois P. Heinz_ *)
%o A319140 (PARI) seq(n)={[subst(deriv(p,y), y, 1) | p<-Vec(-1 + prod(k=1, n, 1 + x^k*y^(logint(k,2)+1) + O(x*x^n)))]} \\ _Andrew Howroyd_, Sep 17 2018
%Y A319140 Cf. A000009, A070939, A318756, A319142, A347060.
%K A319140 nonn,base
%O A319140 1,2
%A A319140 _David S. Newman_, Sep 11 2018