A337940 Triangle read by rows: T(n, k) = T(n+2) - T(n-k), with the triangular numbers T = A000217, for n >= 1, k = 1, 2, ..., n.
6, 9, 10, 12, 14, 15, 15, 18, 20, 21, 18, 22, 25, 27, 28, 21, 26, 30, 33, 35, 36, 24, 30, 35, 39, 42, 44, 45, 27, 34, 40, 45, 49, 52, 54, 55, 30, 38, 45, 51, 56, 60, 63, 65, 66, 33, 42, 50, 57, 63, 68, 72, 75, 77, 78, 36, 46, 55, 63, 70, 76, 81, 85, 88, 90, 91
Offset: 1
Examples
The triangle T(n, k) begins: n \ k 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ... 1: 6 2: 9 10 3: 12 14 15 4: 15 18 20 21 5: 18 22 25 27 28 6: 21 26 30 33 35 36 7: 24 30 35 39 42 44 45 8: 27 34 40 45 49 52 54 55 9: 30 38 45 51 56 60 63 65 66 10: 33 42 50 57 63 68 72 75 77 78 11: 36 46 55 63 70 76 81 85 88 90 91 12: 39 50 60 69 77 84 90 95 99 102 104 105 13: 42 54 65 75 84 92 99 105 110 114 117 119 120 14: 45 58 70 81 91 100 108 115 121 126 130 133 135 136 15: 48 62 75 87 98 108 117 125 132 138 143 147 150 152 153 ... N = 15 appears precisely twice from the sums 4+5+6 = A(4, 1) = T(4, 1), and (1+2+3)+4+5 = A(1, 3) = T(3, 3), i.e., with a sum of 3 and 5 consecutive positive integers. N = 42 appears three times from the sums 13+14+15 = A(13, 1) = T(13, 1), 9+10+11 +12 = A(9, 2) = T(10, 2), 3+4+5+6+7+8+9 = A(3, 5) = T(7, 5); i.e., 42 can be written as a sum of 3, 4 and 7 consecutive positive integers.
Crossrefs
Programs
-
Mathematica
Flatten[Table[((n+2)*(n+3)-(n-k)*(n-k+1))/2,{n,11},{k,n}]] (* Stefano Spezia, Nov 24 2020 *)
Formula
T(n, k) = ((n+2)*(n+3) - (n-k)*(n-k+1))/2, for n >= 1 and k = 1, 2, ..., n (see the name).
T(n, k) = (k+2)*(2*n-k+3)/2 (factorized).
G.f. columns k = 2*j+1, for j >= 0: Go(j, x) = x^(2*j+1)*(2*j+3)*(j+2 - (j+1)*x)/(1-x)^2,
G.f. columns k = 2*j, for j >= 1: Ge(j, x) = x^(2*j)*(j+1)*(2*j+3 - (2*j+1)*x)/(1-x)^2.
G.f. row polynomials: G(z,x) = z*x*(1 + z*x)^3*{3*(2-z) - (8-3*z)*(z*x) + (3-z)*(z*x)^2}/((1 - z)^2*(1 - (z*x)^2)^3).
G.f. diagonals d >= 1: GD(d, x) = ((d+1)*3 - (5*d+3)*x + (2*d+1)*x^2)/(1-x)^3.
G.f. of GD(d, x): GGD(z,x) = (6-8*x+3*x^2 - (3-3*x+x^2)*z)/((1-x)^3*(1-z)^2).
Comments