login
A363518
Concentric square numbers on the faces of an n X n X n cube.
1
1, 8, 20, 32, 50, 80, 116, 152, 194, 248, 308, 368, 434, 512, 596, 680, 770, 872, 980, 1088, 1202, 1328, 1460, 1592, 1730, 1880, 2036, 2192, 2354, 2528, 2708, 2888, 3074, 3272, 3476, 3680, 3890, 4112, 4340, 4568, 4802, 5048, 5300, 5552, 5810, 6080, 6356, 6632, 6914, 7208, 7508, 7808
OFFSET
1,2
COMMENTS
a(n) is the number of colored cubes in the outer layer of a cube made up of n^3 unit cubes. The cubes are painted in such a way that concentric square numbers are obtained on each face of the n X n X n cube.
FORMULA
a(n) = 6*A194274 - 12*n + 8, where n>1.
From Stefano Spezia, Jun 08 2023: (Start)
G.f.: (1 + 5*x + 5*x^4 + x^5)/((1 - x)^3*(1 + x^2)).
a(n) = 3*a(n-1) - 4*a(n-2) + 4*a(n-3)- 3*a(n-4) + a(n-5) for n > 6. (End)
EXAMPLE
a(3) = 6*8 - 12*1 - 2*8 = 20;
a(5) = 6*17 - 12*3 - 2*8 = 50.
MATHEMATICA
Join[{1}, LinearRecurrence[{3, -4, 4, -3, 1}, {8, 20, 32, 50, 80}, 51]] (* Stefano Spezia, Jun 08 2023 *)
PROG
(Python)
def A363518(n): return 6*((3*n>>2)+(n*(n+2)+1>>1)-(3*n+1>>2))-12*n+8 if n>1 else 1 # Chai Wah Wu, Jul 15 2023
CROSSREFS
Cf. A194274.
Sequence in context: A339273 A017617 A246309 * A038522 A267435 A348093
KEYWORD
nonn,easy
AUTHOR
Nicolay Avilov, Jun 07 2023
STATUS
approved