%I #53 Dec 08 2023 09:58:28
%S 1,2,7,12,25,37,62,84,125,160,221,272,357,427,540,632,777,894,1075,
%T 1220,1441,1617,1882,2092,2405,2652,3017,3304,3725,4055,4536,4912,
%U 5457,5882,6495,6972,7657,8189,8950,9540,10381,11032,11957,12672,13685,14467,15572
%N Sum of numbers in n-th upward diagonal of triangle in A079823.
%H G. C. Greubel, <a href="/A079824/b079824.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (1,3,-3,-3,3,1,-1).
%F From _Philippe Deléham_, Feb 16 2004: (Start)
%F a(2*n) = (n/6)*(7*n^2 + 3*n + 2);
%F a(2*n-1) = (n/6)*(7*n^2 - 6*n + 5). (End)
%F G.f.: x*(1+x+2*x^2+2*x^3+x^4) / ( (1+x)^3*(1-x)^4 ). - _R. J. Mathar_, Aug 23 2012
%F From _Richard Peterson_, Aug 19 2020: (Start)
%F a(2*n) - a(2*n-1) = A000326(n).
%F a(2*n+1) - a(2*n) = n^2 + (n+1)^2. (End)
%F a(n) = (15 + 25*n + 15*n^2 + 14*n^3 - 3*(-1)^n*(5 + n*(3 + n)))/96. - _Torlach Rush_, Aug 14 2022
%F E.g.f.: (1/48)*( x*(33 + 27*x + 7*x^2)*cosh(x) + (15 + 21*x + 30*x^2 + 7*x^3)*sinh(x) ). - _G. C. Greubel_, Dec 08 2023
%p A079824aux := proc(n,k)
%p A000124(n)+k ;
%p end proc:
%p A079824 := proc(n)
%p local a,k,n0 ;
%p n0 := n-1 ;
%p a := 0 ;
%p for k from 0 to floor(n0/2) do
%p a := a+A079824aux(n0-k,k) ;
%p end do:
%p a ;
%p end proc: # _R. J. Mathar_, Aug 23 2012
%t LinearRecurrence[{1,3,-3,-3,3,1,-1},{1,2,7,12,25,37,62},60] (* _Harvey P. Dale_, May 06 2014 *)
%o (Python)
%o def a(n): return (15 + 25*n + 15*(n**2) + 14*(n**3) - 3*(((-1)**n))*(5 + n*(3 + n))) // 96 # _Torlach Rush_, Aug 14 2022
%o (Magma) [(15+25*n+15*n^2+14*n^3 -3*(-1)^n*(5+3*n+n^2))/96: n in [1..60]]; // _G. C. Greubel_, Dec 08 2023
%o (SageMath) [(15+25*n+15*n^2+14*n^3 -3*(-1)^n*(5+3*n+n^2))/96 for n in range(1,61)] # _G. C. Greubel_, Dec 08 2023
%Y Cf. A000326, A079823, A185787 and A185788 (bisections).
%K base,easy,nonn
%O 1,2
%A _Amarnath Murthy_, Feb 11 2003
%E More terms from Jason D. W. Taff (jtaff(AT)jburroughs.org), Oct 31 2003
%E More terms from _Philippe Deléham_, Feb 16 2004
%E Typo corrected by _Kevin Ryde_, Aug 23 2012