login
A365486
a(n) is equal to the number of black 1 X 1 X 1 cubes in a certain coloring of the n X n X n cube (see comments for precise definition).
1
1, 8, 7, 32, 57, 112, 159, 256, 353, 504, 647, 864, 1081, 1376, 1663, 2048, 2433, 2920, 3399, 4000, 4601, 5328, 6047, 6912, 7777, 8792, 9799, 10976, 12153, 13504, 14847, 16384, 17921, 19656, 21383, 23328, 25273, 27440, 29599, 32000, 34401, 37048, 39687
OFFSET
1,2
COMMENTS
The coloring of the n X n X n cube is carried out as follows. First, the cubes of the central cross are painted black. For odd cubes, the ends of the central cross are 1 X 1 squares; for even cubes, the ends of the central cross are 2 X 2 squares. Then all the cubes adjacent to black are painted white so that a layer is obtained with all white cubes. At the next step, all cubes adjacent to white are painted black so that a layer of black cubes is obtained, and so on, until all the cubes of the n X n X n cube are painted.
FORMULA
Let r = n (mod 4), then a(n) = (n^3)/2 if r = 0; (n^3 - 3*n)/2 +2 if r = 1; (n^3)/2 + 4 if r = 2; (n^3 - 3*n)/2 - 2 if r = 3.
G.f.: x*(1 + 6*x - 9*x^2 + 20*x^3 + 7*x^4 - 2*x^5 + x^6)/((-1 + x)^4*(1 + x)^2*(1 + x^2)). - Thomas Scheuerle, Sep 06 2023
EXAMPLE
a(3) = 7;
a(5) = 13 + 44 = 57;
a(9) = 25 +236 + 92 = 353.
MATHEMATICA
LinearRecurrence[{2, 0, -2, 2, -2, 0, 2, -1}, {1, 8, 7, 32, 57, 112, 159, 256}, 50] (* Amiram Eldar, Sep 05 2023 *)
PROG
(PARI) Vec(x*(1 + 6*x - 9*x^2 + 20*x^3 + 7*x^4 - 2*x^5 + x^6)/((-1 + x)^4*(1 + x)^2*(1 + x^2)) + O(x^50)) \\ Thomas Scheuerle, Sep 06 2023
CROSSREFS
Cf. A266725.
Sequence in context: A303311 A267093 A090099 * A138809 A286460 A317231
KEYWORD
nonn,easy
AUTHOR
Nicolay Avilov, Sep 05 2023
STATUS
approved