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.

A083651 Triangular array, read by rows: T(n,k) = k-th bit in binary representation of n (0<=k<=n).

Original entry on oeis.org

0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Reinhard Zumkeller, May 01 2003

Keywords

Comments

n = Sum(T(n,k)*2^k: 0<=k<=n);
T(n, A070939(n))=1 for n>0, T(n,k)=0 for k>A070939(n);
T(n,0)=A000035(n); T(n,n)=0;
A021913(0)=T(0,0), A021913(n)=T(n,1) for n>0.

Examples

			The triangle starts
0
1 0
0 1 0
1 1 0 0
0 0 1 0 0
1 0 1 0 0 0
0 1 1 0 0 0 0
1 1 1 0 0 0 0 0
0 0 0 1 0 0 0 0 0
1 0 0 1 0 0 0 0 0 0
0 1 0 1 0 0 0 0 0 0 0
1 1 0 1 0 0 0 0 0 0 0 0
0 0 1 1 0 0 0 0 0 0 0 0 0
1 0 1 1 0 0 0 0 0 0 0 0 0 0
0 1 1 1 0 0 0 0 0 0 0 0 0 0 0
		

Crossrefs

Cf. A000035 (column k=0), A133872 (k=1), A131078 (k=2), A000120 (row sums).

Programs

  • Maple
    A083651 := proc(n,k)
        floor(n/2^k) ;
        modp(%,2) ;
    end proc:  # R. J. Mathar, Apr 21 2021
  • Mathematica
    row[n_] := row[n] = PadRight[Reverse[IntegerDigits[n, 2]], n+1];
    T[n_, k_] := row[n][[k+1]];
    Table[T[n, k], {n, 0, 14}, {k, 0, n}] // Flatten