[go: up one dir, main page]

login
A356288 revision #24

A356288
Sum of numbers in n-th upward diagonal of triangle the sum of {1;2,3;4,5,6;7,8,9,10;...} and {1;2,3;3,4,5;4,5,6,7;...}.
1
2, 4, 13, 20, 40, 55, 90, 116, 170, 210, 287, 344, 448, 525, 660, 760, 930, 1056, 1265, 1420, 1672, 1859, 2158, 2380, 2730, 2990, 3395, 3696, 4160, 4505, 5032, 5424, 6018, 6460, 7125, 7620, 8360, 8911, 9730, 10340, 11242, 11914, 12903, 13640, 14720, 15525, 16700
OFFSET
1,1
FORMULA
a(n) = (n * ceiling(n/2)) + ((15 + 25*n + 15*n^2 + 14*n^3 - 3*(((-1)^n))*(5 + n*(3 + n))) / 96).
a(n) = A079824(n) + A093005(n).
EXAMPLE
2 = A079824(1) + A093005(1) = 1 + 1.
4 = A079824(2) + A093005(2) = 2 + 2.
13 = A079824(3) + A093005(3) = 7 + 6.
20 = A079824(4) + A093005(4) = 12 + 8.
PROG
(Python)
import math
def a(n): return (n * math.ceil(n/2)) + (15 + 25*n + 15*(n**2) + 14*(n**3) - 3*(((-1)**n))*(5 + n*(3 + n))) // 96
CROSSREFS
Sequence in context: A018761 A276118 A179114 * A082015 A362263 A360397
KEYWORD
nonn,changed
AUTHOR
Torlach Rush, Aug 02 2022
STATUS
proposed