# Nxn rubik's cube - how many orientations?

1. Nov 19, 2008

### DyslexicHobo

I'm sitting here with my new 5x5x5 rubik's cube, and I was just wondering how many possible orientations there were. I THOUGHT:
-Each corner has 3 orientations and 8 positions
-Each middle side has 2 orientations and 12 positions
-Each outer side has 2 orientations and 24 positions
-etc etc for each piece
-multiply each possible position and orientation together

However, I know that certain orientations are not physically possible to achieve. For example, you can't have a solved cube with only one corner with a different orientation. I'm not sure how to exclude these when trying to account for all physically possible orientations.

So my question: what is the total number of different ways a nxnxn rubik's cube can be presented assuming that with normal rotations of a rubik's cube, it can be solved. I tried generalizing it by looking at a 1x1x1 cube and 2x2x2 cube, but I'm still really lost.

2. Nov 19, 2008

### CRGreathouse

It's a complicated question. I think the answer is http://www.research.att.com/~njas/sequences/A075152 [Broken](5) = 282870942277741856536180333107150328293127731985672134721536000000000000000.

(The offset seems to be wrong -- maybe I should email Dr. Sloane on this one!)

Last edited by a moderator: May 3, 2017
3. Nov 19, 2008

### DyslexicHobo

Yeah, I saw that number when browsing around google. That's an interesting function though. Looks even more difficult for even numbered cubes.

Code (Text):
f := proc(n) local A, B, C, D, E, F, G;
if n mod 2 = 1 then
A := (n-1)/2; F := 0; B := 1; C := 1; D := 0; E := (n+1)*(n-3)/4; G := (n-1)*(n-3)/4;

else A := n/2; F := 1; B := 1; C := 0; D := 0; E := n*(n-2)/4; G := (n-2)^2/4; fi; (2^A*((8!/2)*3^7)^B*((12!/2)*2^11)^C*((4^6)/2)^D*(24!/2)^E)/(24^F*((24^6)/2)^G);

end;

I don't really understand the syntax, let alone the mathematics behind it, but thanks for the link. I guess it's a more complicated process than I thought.

4. Nov 19, 2008

### CRGreathouse

Here's a fairly straightforward translation into Pari:
Code (Text):
cube(n)={
local(A, C, E, F, G);
A = n >> 1;
if(n%2,
F = 0; C = 1; E = (n+1)*(n-3)/4; G = (n-1)*(n-3)/4;
,
F = 1; C = 0; E = n*(n-2)/4; G = (n-2)^2/4;
);
(2^A*((8!/2)*3^7)*((12!/2)*2^11)^C*(24!/2)^E)/(24^F*((24^6)/2)^G)
}
The first indented block sets up variables for n odd, the second for n even. The final result is the line starting "(2^A".