Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #23 Jun 10 2024 08:50:33
%S -1,-1,-1,-1,2,-1,-1,3,3,-1,-1,4,14,4,-1,-1,5,17,17,5,-1,-1,6,20,41,
%T 20,6,-1,-1,7,23,47,47,23,7,-1,-1,8,26,53,89,53,26,8,-1,-1,9,29,59,99,
%U 99,59,29,9,-1,-1,10,32,65,109,164,109,65,32,10,-1
%N Triangle read by rows: T(n, k) = (n+1)*A000096(k-1) + n if k <= floor(n/2), otherwise T(n, k) = (n+1)*A000096(n-k-1) + n.
%H G. C. Greubel, <a href="/A143199/b143199.txt">Rows n = 0..50 of the triangle, flattened</a>
%F T(n, m) = (n + 1)*(if m <= floor(n/2) then (m - 1)*(m + 2) / 2 else (n - m + 2)*(n - (m + 1)) / 2 fi) + n. - _Georg Fischer_, Oct 28 2023
%F From _G. C. Greubel_, Jun 10 2024: (Start)
%F T(n, k) = n + (n+1)*(k-1)*(k+2)/2 if 0 <= k <= floor(n/2), otherwise T(n, k) = T(n, n-k).
%F Sum_{k=0..n} T(n, k) = (1/48)*(n+1)*(-53 - 5*n + 3*(-1)^n*(n+1) + 2*(n + 1)^3). (End)
%e Triangle begins as:
%e -1;
%e -1, -1;
%e -1, 2, -1;
%e -1, 3, 3, -1;
%e -1, 4, 14, 4, -1;
%e -1, 5, 17, 17, 5, -1;
%e -1, 6, 20, 41, 20, 6, -1;
%e -1, 7, 23, 47, 47, 23, 7, -1;
%e -1, 8, 26, 53, 89, 53, 26, 8, -1;
%e -1, 9, 29, 59, 99, 99, 59, 29, 9, -1;
%e -1, 10, 32, 65, 109, 164, 109, 65, 32, 10, -1;
%p seq(print(seq((n + 1) * (if m <= n/2 then (m - 1) * (m + 2)\
%p / 2 else (n - m + 2) * (n - (m + 1)) / 2 fi) + n, m=0..n)), n=0..10); # _Georg Fischer_, Oct 28 2023
%t T[n_, k_]:= If[k<=Floor[n/2], n +(n+1)*(k-1)*(k+2)/2, T[n,n-k]];
%t Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten
%o (Magma)
%o function T(n,k) // A143199
%o if k le Floor(n/2) then return n + (n+1)*(k-1)*(k+2)/2;
%o else return T(n,n-k);
%o end if;
%o end function;
%o [T(n,k): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Jun 10 2024
%o (SageMath)
%o def A143199(n,k): return n +(n+1)*(k-1)*(k+2)//2 if (k<1+int(n//2)) else A143199(n,n-k)
%o flatten([[A143199(n,k) for k in range(n+1)] for n in range(13)]) # _G. C. Greubel_, Jun 10 2024
%Y Cf. A000096, A132209, A142463.
%K sign,tabl
%O 0,5
%A _Roger L. Bagula_ and _Gary W. Adamson_, Oct 20 2008
%E Definition clarified and offset corrected by _Georg Fischer_, Oct 28 2023