A340804 Triangle read by rows: T(n, k) = 1 + k*(n - 1) + (2*k - n - 1)*(k mod 2) with 0 < k <= n.
1, 1, 3, 1, 5, 9, 1, 7, 11, 13, 1, 9, 13, 17, 25, 1, 11, 15, 21, 29, 31, 1, 13, 17, 25, 33, 37, 49, 1, 15, 19, 29, 37, 43, 55, 57, 1, 17, 21, 33, 41, 49, 61, 65, 81, 1, 19, 23, 37, 45, 55, 67, 73, 89, 91, 1, 21, 25, 41, 49, 61, 73, 81, 97, 101, 121, 1, 23, 27, 45, 53, 67, 79, 89, 105, 111, 131, 133
Offset: 1
Examples
1 1, 3 1, 5, 9, 1, 7, 11, 13 1, 9, 13, 17, 25 1, 11, 15, 21, 29, 31 1, 13, 17, 25, 33, 37, 49 ...
Links
- Stefano Spezia, Table of n, a(n) for n = 1..11325 (first 150 rows of the triangle, flattened).
Crossrefs
Cf. A000012 (1st column), A006010 (sum of the first n rows), A060747 (2nd column), A074147 (antidiagonals of M matrices), A241016 (row sums of M matrices), A317617 (column sums of M matrices), A322277 (permanent of M matrices), A323723 (subdiagonal sum of M matrices), A323724 (superdiagonal sum of M matrices).
Programs
-
Mathematica
Table[1+k(n-1)+(2k-n-1)Mod[k,2],{n,12},{k,n}]//Flatten
-
PARI
T(n, k) = 1 + k*(n - 1) + (2*k - n - 1)*(k % 2); \\ Michel Marcus, Jan 25 2021
Formula
O.g.f.: (1 + y - 3*y^2 + y^3 + x*(-1 - y + 5*y^2 + y^3))/((-1 + x)^2*(-1 + y)^2*(1+y)^2).
E.g.f.: exp(x - y)*(1 + x + 2*y + exp(2*y)*(1 + x*(-1 + 2*y)))/2.
Comments