A128221 A128174 * A127701.
1, 1, 2, 1, 1, 3, 1, 2, 1, 4, 1, 1, 3, 1, 5, 1, 2, 1, 4, 1, 6, 1, 1, 3, 1, 5, 1, 7, 1, 2, 1, 4, 1, 6, 1, 8, 1, 1, 3, 1, 5, 1, 7, 1, 9, 1, 2, 1, 4, 1, 6, 1, 8, 1, 10, 1, 1, 3, 1, 5, 1, 7, 1, 9, 1, 11, 1, 2, 1, 4, 1, 6, 1, 8, 1, 10, 1, 12, 1, 1, 3, 1, 5, 1, 7, 1, 9, 1, 11, 1, 13
Offset: 1
Examples
From _Boris Putievskiy_, Jan 30 2013: (Start) The start of the sequence as a table: 1, 1, 1, 1, 1, 1, 1, ... 2, 1, 2, 1, 2, 1, 2, ... 3, 1, 3, 1, 3, 1, 3, ... 4, 1, 4, 1, 4, 1, 4, ... 5, 1, 5, 1, 5, 1, 5, ... 6, 1, 6, 1, 6, 1, 6, ... 7, 1, 7, 1, 7, 1, 7, ... ... (End) First few rows of the triangle are: 1; 1, 2; 1, 1, 3; 1, 2, 1, 4; 1, 1, 3, 1, 5; 1, 2, 1, 4, 1, 6; 1, 1, 3, 1, 5, 1, 7; ...
Links
- Robert G. Wilson v, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
a128221[n_, k_] := If[EvenQ[n-k], k, 1]/;1<=k<=n a128221[r_] := Table[a128221[n, k], {n, 1, r}, {k, 1, n}] TableForm[a128221[7]] (* triangle *) Flatten[a128221[10]] (* data *) (* Hartmut F. W. Hoft, Mar 08 2017 *) t[r_, c_] := If[ OddQ@ c, r, 1]; Table[t[k, n - k + 1], {n, 13}, {k, n}] // Flatten (* Robert G. Wilson v, Mar 09 2017 *)
Formula
A128174 * A127701 as infinite lower triangular matrices. By columns, k-th column = k, 1, k, ...; k=1,2,3,...
From Boris Putievskiy, Jan 30 2013: (Start)
As table T(n,k) = (1+(-1)^k)/2 - (-1+(-1)^k)*n/2.
As linear sequence a(n) = (1+(-1)^A004736(n))/2 - (-1+(-1)^A004736(n))*A002260(n)/2. a(n) = (1+(-1)^j)/2 - (-1+(-1)^j)*i/2,
where i = n-t*(t+1)/2, j = (t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2). (End)
Extensions
More terms from Robert G. Wilson v, Mar 09 2017
Comments