%I #42 Feb 05 2023 23:06:17
%S 1,11,46,121,252,455,746,1141,1656,2307,3110,4081,5236,6591,8162,9965,
%T 12016,14331,16926,19817,23020,26551,30426,34661,39272,44275,49686,
%U 55521,61796,68527,75730,83421,91616,100331,109582,119385,129756,140711,152266,164437,177240,190691
%N The sum of the numbers on the perimeter of the n X n diamond frame, located at the top of the numerical pyramid containing the positive integers in natural order.
%C The numerical pyramid is constructed from natural numbers as follows: the first line contains the number 1, the second line contains the numbers 2 and 3, the third line contains the next three numbers, and so on.
%H Nicolay Avilov, <a href="/A359096/a359096.jpg">Square frames for a(1) - a(6)</a>
%H Nicolay Avilov, <a href="https://elementy.ru/problems/2371/Piramida_s_ramkoy">Pyramid with frame</a> (in Russian).
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,4,-1).
%F a(n) = (8*n^3 - 12*n^2 + 13*n - 9)/3, where n > 1.
%F G.f.: x*(1 + 7*x + 8*x^2 - x^3 + x^4)/(1 - x)^4. - _Stefano Spezia_, Dec 16 2022
%e For n = 4 we have a numerical pyramid with numbers from 1 to 36 and its diamond frame, and the sum of the numbers that lie along the frame is a(4):
%e .
%e 1
%e / \
%e 2 3
%e / \
%e 4 5 6
%e / \
%e 7 8 9 10
%e \ /
%e 11 12 13 14 15
%e \ /
%e 16 17 18 19 20 21
%e \ /
%e 22 23 24 25 26 27 28
%e .
%e a(4) = 1 + 2 + 3 + 4 + 6 + 7 + 10 + 12 + 14 + 18 + 19 + 25 = 121.
%Y Cf. A000027, A006003.
%K nonn,easy
%O 1,2
%A _Nicolay Avilov_, Dec 16 2022