[go: up one dir, main page]

login
A079824
Sum of numbers in n-th upward diagonal of triangle in A079823.
7
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,2
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
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 *)
PROG
(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
(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
(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
CROSSREFS
Cf. A000326, A079823, A185787 and A185788 (bisections).
Sequence in context: A288656 A180804 A122264 * A059329 A242201 A350093
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy, Feb 11 2003
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
STATUS
approved