login
A351704
Sums of the ascending diagonals of the triangle A162609.
0
1, 1, 2, 3, 7, 10, 20, 26, 45, 55, 86, 101, 147, 168, 232, 260, 345, 381, 490, 535, 671, 726, 892, 958, 1157, 1235, 1470, 1561, 1835, 1940, 2256, 2376, 2737, 2873, 3282, 3435, 3895, 4066, 4580, 4770, 5341, 5551, 6182, 6413, 7107, 7360, 8120, 8396, 9225, 9525, 10426, 10751, 11727, 12078, 13132, 13510, 14645
OFFSET
0,3
COMMENTS
Each term is the sum of an ascending diagonal of the triangle A162609.
FORMULA
a(n) = (n^3 + 2*n + 12)/12, for even n.
a(n) = (2*n^3 - 3*n^2 + 10*n + 15)/24, for odd n.
EXAMPLE
a(4) = (64 + 8 + 12)/12 = 7
a(5) = (250 - 75 + 50 + 15)/24 = 10.
PROG
(C) // Calculates and prints out the triangle and terms of ascending diagonals (on first line). To get more terms increment j.
#include <stdio.h>
int main()
{
int n, j=8, k, C, F1, F2, s;
F1=1; F2=1;
printf("%d ", F1);
printf("%d ", F2);
for (s=0; s<=j; s++)
{
F1=F1 + 2*s*s + 2*s + 1;
F2=F2 + 2*s*s + 3*s + 2;
printf("%d ", F1);
printf("%d ", F2);
}
printf("\n");
return 0;
}
CROSSREFS
Cf. A162609.
Sequence in context: A355726 A356364 A173132 * A320675 A336414 A095010
KEYWORD
nonn
AUTHOR
Eddie Gutierrez, May 05 2022
STATUS
approved