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.

Showing 1-2 of 2 results.

A104567 Triangle read by rows: T(i,j) = i-j+1 if j is odd; T(i,j) = 2(i-j+1) if j is even (1 <= j <= i).

Original entry on oeis.org

1, 2, 2, 3, 4, 1, 4, 6, 2, 2, 5, 8, 3, 4, 1, 6, 10, 4, 6, 2, 2, 7, 12, 5, 8, 3, 4, 1, 8, 14, 6, 10, 4, 6, 2, 2, 9, 16, 7, 12, 5, 8, 3, 4, 1, 10, 18, 8, 14, 6, 10, 4, 6, 2, 2, 11, 20, 9, 16, 7, 12, 5, 8, 3, 4, 1, 12, 22, 10, 18, 8, 14, 6, 10, 4, 6, 2, 2, 13, 24, 11, 20, 9, 16, 7, 12, 5, 8, 3, 4, 1, 14
Offset: 1

Views

Author

Gary W. Adamson, Mar 16 2005

Keywords

Comments

T(i,j) is the (i,j)-entry (1<=j<=i) of the product R*H of the infinite lower triangular matrices R = [1; 1,1; 1,1,1; 1,1,1,1; ...] and H = [1; 1,2; 1,2,1; 1 2,1,2; ...]. Row sums yield A006578. H*R yields A104566. - Emeric Deutsch, Mar 24 2005

Examples

			The first few rows are:
  1;
  2, 2;
  3, 4, 1;
  4, 6, 2, 2;
		

Crossrefs

Programs

  • Maple
    T:=proc(i,j) if j>i then 0 elif j mod 2 = 1 then i-j+1 elif j mod 2 = 0 then 2*(i-j+1) else fi end: for i from 1 to 14 do seq(T(i,j),j=1..i) od; # yields sequence in triangular form # Emeric Deutsch, Mar 24 2005
  • Mathematica
    Table[If[OddQ[j],i-j+1,2(i-j+1)],{i,20},{j,i}]//Flatten (* Harvey P. Dale, Sep 03 2018 *)

Formula

T(i,j) = i-j+1 if j is odd; T(i,j) = 2(i-j+1) if j is even (1 <= j <= i). - Emeric Deutsch, Mar 24 2005

Extensions

More terms from Emeric Deutsch, Mar 24 2005

A104568 Triangle of numbers that are 0 or 1 mod 3.

Original entry on oeis.org

1, 3, 1, 4, 3, 1, 6, 4, 3, 1, 7, 6, 4, 3, 1, 9, 7, 6, 4, 3, 1, 10, 9, 7, 6, 4, 3, 1, 12, 10, 9, 7, 6, 4, 3, 1, 13, 12, 10, 9, 7, 6, 4, 3, 1, 15, 13, 12, 10, 9, 7, 6, 4, 3, 1, 16, 15, 13, 12, 10, 9, 7, 6, 4, 3, 1, 18, 16, 15, 13, 12, 10, 9, 7, 6, 4, 3, 1, 19, 18, 16, 15, 13, 12, 10, 9, 7, 6, 4, 3, 1
Offset: 0

Views

Author

Gary W. Adamson, Mar 16 2005

Keywords

Comments

The matrix operations (J * R), (R * J) are commutative since J * R = R * J.
Row sums = A006578.
Rows and columns of the triangle are all 0 or 1 mod 3 terms: A032766.
A104567 row sums also = A006578.
A006578(2n-1) = A001082(2n).

Examples

			The first few rows are:
  1;
  3, 1;
  4, 3, 1;
  6, 4, 3, 1;
  7, 6, 4, 3, 1;
  9, 7, 6, 4, 3, 1;
  ...
		

Crossrefs

Programs

  • Maple
    it:=array(1..1000): i:=1: for n from 1 to 1000 do if n mod 3 <> 2 then it[i]:=n; i:=i+1 fi: od: for j from 1 to 25 do for k from j to 1 by -1 do printf(`%d,`,it[k]) od: od: # James Sellers, Apr 09 2005

Formula

All columns (with offset); and all rows (starting from the right) are 0 or 1 mod 3 (A032766). Extract the triangle from the product J * R; J = [1; 2, 1; 1, 2, 1; 2, 1, 2, 1; ...]; R = [1; 1, 1; 1, 1, 1; ...] (infinite lower triangular matrices, with the rest zeros).

Extensions

More terms from James Sellers, Apr 09 2005
Showing 1-2 of 2 results.