A129765 Triangle, (1, 1, 2, 2, 2, ...) in every column.
1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1
Offset: 1
Examples
First few rows of the triangle: 1; 1, 1; 2, 1, 1; 2, 2, 1, 1; 2, 2, 2, 1, 1; ...
Programs
-
Maple
A129765 := proc(n,m) if abs(n-m)<2 then 1 ; else 2 ; end if ; end proc: for n from 1 to 18 do for m from 1 to n do printf("%d,", A129765(n,m)) ; od ; od ; # R. J. Mathar, Jun 08 2007
-
Mathematica
Table[PadLeft[{1,1},n,2],{n,20}]//Flatten (* Harvey P. Dale, May 20 2019 *)
Formula
Triangle, (1, 1, 2, 2, 2, ...) in every column. By rows, (1; 1, 1; 2, 1, 1; ...), continuing with (n-2) 2's followed by two 1's. Inverse of A000012 as an infinite lower triangular matrix (all 1's and the rest zeros), signed by columns: (+ - - + + - -, ...).
Extensions
More terms from R. J. Mathar, Jun 08 2007
Comments