cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A382973 a(n) = 4*n^3 - 6*n^2 + 6*n - 2 + (-1)^n.

This page as a plain text file.
%I A382973 #27 Jun 18 2025 18:58:53
%S A382973 1,19,69,183,377,683,1117,1711,2481,3459,4661,6119,7849,9883,12237,
%T A382973 14943,18017,21491,25381,29719,34521,39819,45629,51983,58897,66403,
%U A382973 74517,83271,92681,102779,113581,125119,137409,150483,164357,179063,194617,211051,228381,246639
%N A382973 a(n) = 4*n^3 - 6*n^2 + 6*n - 2 + (-1)^n.
%C A382973 a(n) is the number of 1 X 1 X 1 black cubes in a cube (2*n - 1) X (2*n - 1) X (2*n - 1), which is made up of 1 X 1 X 1 black cubes and 1 X 1 X 1 white cubes. In this case, any 1 X 1 X 1 cube is either completely black or completely white. The black and white cubes are arranged as follows: if the central cube has coordinates (0, 0, 0), then all cubes with coordinates (0, y, z), (x, 0, z) and (x, y, 0) are black. Then the cubes adjacent to the black ones are painted white so that a triangular layer with all white cubes is obtained. There will be eight such layers. In the next step, all cubes adjacent to the white ones are painted black so that a triangular layer of black cubes is formed, and so on, alternating layers of black cubes and layers of white cubes until all the cubes are painted (see the link "Illustration of coloring a cube").
%H A382973 Nicolay Avilov, <a href="/A382973/a382973.jpg">Illustration of a cube coloring</a>.
%H A382973 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (3,-2,-2,3,-1).
%F A382973 a(n) = (2n - 1)^3 - 8*A011934(n-1).
%F A382973 G.f.: x*(1 + 16*x + 14*x^2 + 16*x^3 + x^4)/((1 - x)^4*(1 + x)). - _Stefano Spezia_, Jun 12 2025
%e A382973 a(2) = 3^3 - 8*1 = 19;
%e A382973 a(3) = 5^3 - 8*7 = 69.
%t A382973 LinearRecurrence[{3, -2, -2, 3, -1}, {1, 19, 69, 183, 377}, 20] (* _Hugo Pfoertner_, Jun 12 2025 *)
%Y A382973 Cf. A000578, A011934.
%K A382973 nonn,easy
%O A382973 1,2
%A A382973 _Nicolay Avilov_, Jun 02 2025