A133083 A000012 * A133080.
1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1
Offset: 1
Examples
First few rows of the triangle: 1; 2, 1; 2, 1, 1; 2, 1, 2, 1; 2, 1, 2, 1, 1; 2, 1, 2, 1, 2, 1; ...
Links
- G. C. Greubel, Table of n, a(n) for the first 50 rows, flattened
Programs
-
Mathematica
T[n_, k_] := If[k == n, 1, 1 + (1 - (-1)^k)/2 ]; Table[T[n, k], {n, 1, 10}, {k, 1, n}] (* G. C. Greubel, Oct 21 2017 *)
-
PARI
for(n=1,10, for(k=1,n, print1(if(k==n, 1, 1 + (1-(-1)^k)/2), ", "))) \\ G. C. Greubel, Oct 21 2017
Comments