login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Sums of the ascending diagonals of the triangle A162609.
0

%I #53 May 14 2022 04:55:51

%S 1,1,2,3,7,10,20,26,45,55,86,101,147,168,232,260,345,381,490,535,671,

%T 726,892,958,1157,1235,1470,1561,1835,1940,2256,2376,2737,2873,3282,

%U 3435,3895,4066,4580,4770,5341,5551,6182,6413,7107,7360,8120,8396,9225,9525,10426,10751,11727,12078,13132,13510,14645

%N Sums of the ascending diagonals of the triangle A162609.

%C Each term is the sum of an ascending diagonal of the triangle A162609.

%H Eddie Gutierrez, <a href="http://www.oddwheel.com/octawheel8b.html">The Wheel Octagon Triangle - Ascending Diagonals (Part VIIIb)</a>

%F a(n) = (n^3 + 2*n + 12)/12, for even n.

%F a(n) = (2*n^3 - 3*n^2 + 10*n + 15)/24, for odd n.

%e a(4) = (64 + 8 + 12)/12 = 7

%e a(5) = (250 - 75 + 50 + 15)/24 = 10.

%o (C) // Calculates and prints out the triangle and terms of ascending diagonals (on first line). To get more terms increment j.

%o #include <stdio.h>

%o int main()

%o {

%o int n, j=8, k, C, F1, F2,s;

%o F1=1; F2=1;

%o printf("%d ", F1);

%o printf("%d ", F2);

%o for (s=0;s<=j;s++)

%o {

%o F1=F1 + 2*s*s + 2*s + 1;

%o F2=F2 + 2*s*s + 3*s + 2;

%o printf("%d ", F1);

%o printf("%d ", F2);

%o }

%o printf("\n");

%o return 0;

%o }

%Y Cf. A162609.

%K nonn

%O 0,3

%A _Eddie Gutierrez_, May 05 2022