login
A340804
Triangle read by rows: T(n, k) = 1 + k*(n - 1) + (2*k - n - 1)*(k mod 2) with 0 < k <= n.
4
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,3
COMMENTS
T(n, k) is the k-th diagonal element of an n X n square matrix M(n) formed by writing the numbers 1, ..., n^2 successively forward and backward along the rows in zig-zag pattern.
It includes exclusively all the odd numbers (A005408). Except the term 1, all the other odd numbers appear a finite number of times.
LINKS
Stefano Spezia, Table of n, a(n) for n = 1..11325 (first 150 rows of the triangle, flattened).
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.
EXAMPLE
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
...
MATHEMATICA
Table[1+k(n-1)+(2k-n-1)Mod[k, 2], {n, 12}, {k, n}]//Flatten
PROG
(PARI) T(n, k) = 1 + k*(n - 1) + (2*k - n - 1)*(k % 2); \\ Michel Marcus, Jan 25 2021
CROSSREFS
Cf. A005408, A317614 (row sums).
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).
Sequence in context: A306780 A382592 A209996 * A129801 A240222 A193702
KEYWORD
nonn,tabl
AUTHOR
Stefano Spezia, Jan 22 2021
STATUS
approved