%I #45 Sep 08 2022 08:45:30
%S 1,1,1,1,3,1,1,5,5,1,1,7,9,7,1,1,9,13,13,9,1,1,11,17,19,17,11,1,1,13,
%T 21,25,25,21,13,1,1,15,25,31,33,31,25,15,1,1,17,29,37,41,41,37,29,17,
%U 1,1,19,33,43,49,51,49,43,33,19,1,1,21,37,49,57,61,61,57,49,37,21,1
%N Triangle read by rows: T(n, k) = 1 + 2*(n-k)*(k-1) (1 <= k <= n).
%C Column k, except for the initial k-1 0's, is an arithmetic progression with first term 1 and common difference 2(k-1). Row sums yield A116731. First column of the inverse matrix is A129779.
%C Studied by _Paul Curtz_ circa 1993.
%C From _Rogério Serôdio_, Dec 19 2017: (Start)
%C T(n, k) gives the number of distinct sums of 2(k-1) elements in {1,1,2,2,...,n-1,n-1}. For example, T(6, 2) = the number of distinct sums of 2 elements in {1,1,2,2,3,3,4,4,5,5}, and because each sum from the smallest 1 + 1 = 2 to the largest 5 + 5 = 10 appears, T(6, 2) = 10 - 1 = 9. [In general:
%C 2*Sum_{j=1..(k-1)} (n-j) - (2*(Sum_{j=1..k-1} j) - 1) = 2*(n*(k-1) - 4*(k-1)*k/2 + 1 = 2*(k-1)*(n-k) + 1 = T(n, k). - _Wolfdieter Lang_, Dec 20 2017]
%C T(n, k) is the number of lattice points with abscissa x = 2*(k-1) and even ordinate in the closed region bounded by the parabola y = x*(2*(n-1) - x) and the x axis. [That is, (1/2)*y(2*(k-1)) + 1 = T(n, k). - _Wolfdieter Lang_, Dec 20 2017]
%C Pascal's triangle (A007318, but with apex in the middle) is formed using the rule South = West + East; the rascal triangle A077028 uses the rule South = (West*East + 1)/North; the present triangle uses a similar rule: South = (West*East + 2)/North. See the formula section for this recurrence. (End)
%H G. C. Greubel, <a href="/A130154/b130154.txt">Rows n = 1..100 of triangle, flattened</a>
%F T(n, k) = 1 + 2*(n-k)*(k-1) (1 <= k <= n).
%F G.f.: G(t,z) = t*z*(3*t*z^2 - z - t*z + 1)/((1-t*z)*(1-z))^2.
%F Equals = 2 * A077028 - A000012 as infinite lower triangular matrices. - _Gary W. Adamson_, Oct 23 2007
%F T(n, 1) = 1 and T(n, n) = 1 for n >= 1; T(n, k) = (T(n-1, k-1)*T(n-1, k) + 2)/T(n-2, k-1), for n > 2 and 1 < k < n. See a comment above. - _Rogério Serôdio_, Dec 19 2017
%F G.f. column k (with leading zeros): (x^k/(1-x)^2)*(1 + (2*k-3)*x), k >= 1. See the g.f. of the triangle G(t,z) above: (d/dt)^k G(t,x)/k!|_{t=0}. - _Wolfdieter Lang_, Dec 20 2017
%e The triangle T(n, k) starts:
%e n\k 1 2 3 4 5 6 7 8 9 10 ...
%e 1: 1
%e 2: 1 1
%e 3: 1 3 1
%e 4: 1 5 5 1
%e 5: 1 7 9 7 1
%e 6: 1 9 13 13 9 1
%e 7: 1 11 17 19 17 11 1
%e 8: 1 13 21 25 25 21 13 1
%e 9: 1 15 25 31 33 31 25 15 1
%e 10: 1 17 29 37 41 41 37 29 17 1
%e ... reformatted. - _Wolfdieter Lang_, Dec 19 2017
%p T:=proc(n,k) if k<=n then 2*(n-k)*(k-1)+1 else 0 fi end: for n from 1 to 14 do seq(T(n,k),k=1..n) od; # yields sequence in triangular form
%t Flatten[Table[1+2(n-k)(k-1),{n,0,20},{k,n}]] (* _Harvey P. Dale_, Jul 13 2013 *)
%o (PARI) T(n, k) = 1 + 2*(n-k)*(k-1) \\ _Iain Fox_, Dec 19 2017
%o (PARI) first(n) = my(res = vector(binomial(n+1,2)), i = 1); for(r=1, n, for(k=1, r, res[i] = 1 + 2*(r-k)*(k-1); i++)); res \\ _Iain Fox_, Dec 19 2017
%o (Magma) [1 + 2*(n-k)*(k-1): k in [1..n], n in [1..12]]; // _G. C. Greubel_, Nov 25 2019
%o (Sage) [[1 + 2*(n-k)*(k-1) for k in (1..n)] for n in (1..12)] # _G. C. Greubel_, Nov 25 2019
%o (GAP) Flat(List([1..12], n-> List([1..n], k-> 1 + 2*(n-k)*(k-1) ))); # _G. C. Greubel_, Nov 25 2019
%Y Cf. A116731, A129779. A007318, A077028.
%Y Column sequences (no leading zeros): A000012, A016813, A016921, A017077, A017281, A017533, A131877, A158057, A161705, A215145.
%K nonn,tabl,easy
%O 1,5
%A _Emeric Deutsch_, May 22 2007
%E Edited by _Wolfdieter Lang_, Dec 19 2017
|