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.

A367076 Irregular triangle read by rows: T(n,k) (0 <= n, 0 <= k < 2^n). T(n,k) = -Sum_{i=0..k} A365968(n,i).

Original entry on oeis.org

0, 1, 0, 3, 4, 3, 0, 6, 10, 12, 12, 12, 10, 6, 0, 10, 18, 24, 28, 32, 34, 34, 32, 34, 34, 32, 28, 24, 18, 10, 0, 15, 28, 39, 48, 57, 64, 69, 72, 79, 84, 87, 88, 89, 88, 85, 80, 85, 88, 89, 88, 87, 84, 79, 72, 69, 64, 57, 48, 39, 28, 15, 0, 21, 40, 57, 72, 87
Offset: 0

Views

Author

John Tyler Rascoe, Nov 05 2023

Keywords

Examples

			Triangle begins:
    k=0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
n=0:  0;
n=1:  1,  0;
n=2:  3,  4,  3,  0;
n=3:  6, 10, 12, 12, 12, 10,  6,  0;
n=4; 10, 18, 24, 28, 32, 34, 34, 32, 34, 34, 32, 28, 24, 18, 10,  0;
		

Crossrefs

Cf. A000217 (column k=0), A028552 (column k=1), A192021 (row sums).

Programs

  • Mathematica
    nmax=10; row[n_]:=Join[CoefficientList[Series[1/(1-x)*Sum[ i/(1+x^2^(i-1))*Product[1+x^2^j,{j,0,i-2}],{i,n}],{x,0,2^n-1}],x],{0}]; Array[row,6,0] (* Stefano Spezia, Dec 23 2023 *)
  • Python
    def row_gen(n):
        x = 0
        for k in range(2**n):
            b = bin(k)[2:].zfill(n)
            x += sum((-1)**(int(b[n-i])+1)*i for i in range(1,n+1))
            yield(-x)
    def A367076_row_n(n): return(list(row_gen(n)))

Formula

T(n,k) = Sum_{i=0..n} abs(k + 1 - (2^i) * round((k+1)/2^i)) * i.
G.f. for n-th row: 1/(1-x) * Sum_{i=1..n} (i/(1+x^2^(i-1)) * Product_{j=0..i-2} 1 + x^2^j).