A358994 The sum of the numbers that are inside the contour of an n-story Christmas tree drawn at the top of the numerical pyramid containing the positive integers in natural order.
21, 151, 561, 1503, 3310, 6396, 11256, 18466, 28683, 42645, 61171, 85161, 115596, 153538, 200130, 256596, 324241, 404451, 498693, 608515, 735546, 881496, 1048156, 1237398, 1451175, 1691521, 1960551, 2260461, 2593528, 2962110, 3368646, 3815656, 4305741, 4841583, 5425945
Offset: 1
Examples
a(1) = 1 + 2 + 3 + 4 + 5 + 6 = 21; a(2) = a(1) + (8 + 9 + 12 + 13 + 14 + 17 +18 + 19 + 20) = 151.
Links
- Nicolay Avilov, Problem 2128 (in Russian).
- Nicolay Avilov, Explanatory drawing
- Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
Programs
-
Magma
[n*(27*n^3 + 66*n^2 + 49*n + 26)/8 : n in [1..60]]; // Wesley Ivan Hurt, Jun 14 2025
-
Python
def a(n): return n*(27*n**3 + 66*n**2 + 49*n + 26) // 8 print([a(n) for n in range(1, 36)]) # Michael S. Branicky, Dec 25 2022
Formula
a(n) = n*(27*n^3 + 66*n^2 + 49*n + 26) / 8.
G.f.: x*(21 + 46*x + 16*x^2 - 2*x^3)/(1 - x)^5. - Stefano Spezia, Dec 25 2022
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5). - Wesley Ivan Hurt, Jun 14 2025
Comments