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.

A135839 Triangle read by rows: starting with A128174, replace left border with (1, 1, 1, ...).

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Dec 01 2007

Keywords

Comments

Row sums = (1, 2, 2, 3, 3, 4, 4, 5, 5, ...).

Examples

			First few rows of the triangle are:
  1;
  1, 1;
  1, 0, 1;
  1, 1, 0, 1;
  1, 0, 1, 0, 1;
  1, 1, 0, 1, 0, 1;
  1, 0, 1, 0, 1, 0, 1;
  ...
		

Programs

  • Mathematica
    T[1, 1] := 1; T[n_, 1] := 1; T[n_, n_] := 1; T[n_, k_] := (1 - (-1)^(n - k + 1))/2; Table[T[n, k], {n, 1, 10}, {k, 1, n}]//Flatten (* G. C. Greubel, Dec 05 2016 *)
    Flatten[Table[Join[{1},PadLeft[{},n,{0,1}]],{n,0,20}]] (* Harvey P. Dale, Feb 26 2024 *)

Formula

Given A128174, replace left border with (1, 1, 1, ...). Triangle read by rows, odd rows = n terms of (1, 0, 1, ...); even rows = n terms of (1, 1, 0, 1, 0, 1, ...). By columns, leftmost column = (1, 1, 1, ...); all others = (1, 0, 1, 0, 1, ...).
T(n,1) = T(n,n) = 1, T(n,k) = (1 - (-1)^(n-k-1))/2. - G. C. Greubel,Dec 05 2016

Extensions

Definition corrected by Zhuorui He, Jul 21 2025