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.

A361074 Sum of the j-th number with binary weight n-j+1 over all j in [n].

This page as a plain text file.
%I A361074 #21 Mar 07 2023 18:05:15
%S A361074 0,1,5,16,40,92,193,401,812,1632,3261,6526,13030,26049,52013,103974,
%T A361074 207797,415496,830636,1661086,3321498,6642591,13283920,26567121,
%U A361074 53131653,106261922,212518857,425034976,850060303,1700115399,3400211408,6800412866,13600787296
%N A361074 Sum of the j-th number with binary weight n-j+1 over all j in [n].
%H A361074 Alois P. Heinz, <a href="/A361074/b361074.txt">Table of n, a(n) for n = 0..1000</a>
%F A361074 a(n) = Sum_{j=1..n} A066884(j,n-j+1) = Sum_{j=1..n} A067576(j,n-j+1).
%F A361074 Conjecture: a(n) ~ 19 * 2^n / 6. - _Vaclav Kotesovec_, Mar 04 2023
%e A361074 a(0) = 0 (empty sum).
%e A361074 a(1) = 1 = 1_2.
%e A361074 a(2) = 5 = 2 + 3 = 10_2 + 11_2.
%e A361074 a(3) = 16 = 4 + 5 + 7 = 100_2 + 101_2 + 111_2.
%e A361074 a(4) = 40 = 8 + 6 + 11 + 15 = 1000_2 + 110_2 + 1011_2 + 1111_2.
%p A361074 b:= proc(i, j) option remember; uses Bits: local c, l, k;
%p A361074       if j=1 then 2^i-1
%p A361074     else c, l:= 0, [Split(b(i, j-1))[], 0];
%p A361074          for k while l[k]<>1 or l[k+1]<>0 do c:=c+l[k] od;
%p A361074          Join([1$c, 0$k-c, 1, l[k+2..-1][]])
%p A361074       fi
%p A361074     end:
%p A361074 a:= n-> add(b(j, n-j+1), j=1..n):
%p A361074 seq(a(n), n=0..32);
%Y A361074 Antidiagonal sums of A066884 or of A067576.
%Y A361074 Cf. A000120, A057168.
%K A361074 nonn,base
%O A361074 0,3
%A A361074 _Alois P. Heinz_, Mar 01 2023