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.
%I A360222 #28 Oct 04 2024 15:41:36 %S A360222 0,8,20,56,92,152,212,296,380,488,596,728,860,1016,1172,1352,1532, %T A360222 1736,1940,2168,2396,2648,2900,3176,3452,3752,4052,4376,4700,5048, %U A360222 5396,5768,6140,6536,6932,7352,7772,8216,8660,9128,9596,10088,10580,11096,11612,12152 %N A360222 a(n) is the number of permutable pieces in a standard n X n X n Rubik's cube. %H A360222 Paolo Xausa, <a href="/A360222/b360222.txt">Table of n, a(n) for n = 1..10000</a> %H A360222 <a href="/index/Ru#Rubik">Index entries for sequences related to Rubik cube</a> %H A360222 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,-2,1). %F A360222 a(n) = 8 + 12*(n-2) + 6*((n-2)^2 - (n mod 2)) for n > 1, a(1) = 0. %F A360222 G.f.: 4*x^2*(x^3-4*x^2-x-2)/((x+1)*(x-1)^3). %F A360222 a(n) = A005897(n-1) - A010677(n) for n>=2. %F A360222 E.g.f.: 2*(2*(x - 2) + (3*x^2 - 3*x + 4)*cosh(x) + (3*x^2 - 3*x + 1)*sinh(x)). - _Stefano Spezia_, Feb 02 2023 %e A360222 The 2 X 2 X 2 Rubik's cube consists of 8 corner pieces, so a(2) = 8; the 3 X 3 X 3 cube has 8 corner pieces, 12 edge pieces, and 6 non-permutable center pieces, so a(3) = 8 + 12 = 20. %t A360222 A360222[n_] := If[n == 1, 0, 6*((n-2)*n - Mod[n, 2]) + 8]; Array[A360222, 50] (* or *) %t A360222 LinearRecurrence[{2, 0, -2, 1}, {0, 8, 20, 56, 92}, 50] (* _Paolo Xausa_, Oct 04 2024 *) %o A360222 (Python) %o A360222 N = 20 %o A360222 seq = [0] %o A360222 for n in range(2, N+1): %o A360222 seq.append( 8 + 12*(n-2) + 6*((n-2)**2 - (n%2)) ) %Y A360222 Cf. A005897, A010677. %K A360222 nonn,easy %O A360222 1,2 %A A360222 _William Riley Barker_, Jan 30 2023