A079824 Sum of numbers in n-th upward diagonal of triangle in A079823.
1, 2, 7, 12, 25, 37, 62, 84, 125, 160, 221, 272, 357, 427, 540, 632, 777, 894, 1075, 1220, 1441, 1617, 1882, 2092, 2405, 2652, 3017, 3304, 3725, 4055, 4536, 4912, 5457, 5882, 6495, 6972, 7657, 8189, 8950, 9540, 10381, 11032, 11957, 12672, 13685, 14467, 15572
Offset: 1
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (1,3,-3,-3,3,1,-1).
Programs
-
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
-
Maple
A079824aux := proc(n,k) A000124(n)+k ; end proc: A079824 := proc(n) local a,k,n0 ; n0 := n-1 ; a := 0 ; for k from 0 to floor(n0/2) do a := a+A079824aux(n0-k,k) ; end do: a ; end proc: # R. J. Mathar, Aug 23 2012
-
Mathematica
LinearRecurrence[{1,3,-3,-3,3,1,-1},{1,2,7,12,25,37,62},60] (* Harvey P. Dale, May 06 2014 *)
-
Python
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
-
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
Formula
From Philippe Deléham, Feb 16 2004: (Start)
a(2*n) = (n/6)*(7*n^2 + 3*n + 2);
a(2*n-1) = (n/6)*(7*n^2 - 6*n + 5). (End)
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
From Richard Peterson, Aug 19 2020: (Start)
a(2*n) - a(2*n-1) = A000326(n).
a(2*n+1) - a(2*n) = n^2 + (n+1)^2. (End)
a(n) = (15 + 25*n + 15*n^2 + 14*n^3 - 3*(-1)^n*(5 + n*(3 + n)))/96. - Torlach Rush, Aug 14 2022
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
Extensions
More terms from Jason D. W. Taff (jtaff(AT)jburroughs.org), Oct 31 2003
More terms from Philippe Deléham, Feb 16 2004
Typo corrected by Kevin Ryde, Aug 23 2012