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].

Original entry on oeis.org

0, 1, 5, 16, 40, 92, 193, 401, 812, 1632, 3261, 6526, 13030, 26049, 52013, 103974, 207797, 415496, 830636, 1661086, 3321498, 6642591, 13283920, 26567121, 53131653, 106261922, 212518857, 425034976, 850060303, 1700115399, 3400211408, 6800412866, 13600787296
Offset: 0

Views

Author

Alois P. Heinz, Mar 01 2023

Keywords

Examples

			a(0) = 0 (empty sum).
a(1) = 1 = 1_2.
a(2) = 5 = 2 + 3 = 10_2 + 11_2.
a(3) = 16 = 4 + 5 + 7 = 100_2 + 101_2 + 111_2.
a(4) = 40 = 8 + 6 + 11 + 15 = 1000_2 + 110_2 + 1011_2 + 1111_2.
		

Crossrefs

Antidiagonal sums of A066884 or of A067576.

Programs

  • Maple
    b:= proc(i, j) option remember; uses Bits: local c, l, k;
          if j=1 then 2^i-1
        else c, l:= 0, [Split(b(i, j-1))[], 0];
             for k while l[k]<>1 or l[k+1]<>0 do c:=c+l[k] od;
             Join([1$c, 0$k-c, 1, l[k+2..-1][]])
          fi
        end:
    a:= n-> add(b(j, n-j+1), j=1..n):
    seq(a(n), n=0..32);

Formula

a(n) = Sum_{j=1..n} A066884(j,n-j+1) = Sum_{j=1..n} A067576(j,n-j+1).
Conjecture: a(n) ~ 19 * 2^n / 6. - Vaclav Kotesovec, Mar 04 2023