# Formula for Calculating Positions of a NxNxN Cube?



## goodatthis (Jun 23, 2014)

Is there any sort of finite formula that you can simply plug in for N, with an being the order of a cube? I looked online and found something like that, but it had things that had to do with computer programming and modulus, which I can't really say I understand. Is there a more simple approach, like (and I'm completely utterly making this up, and it probably wouldn't even make sense) 
((3LogBASE(N)(8!))*(LogBASE(N)(12!))*((N-1)^2))/(64N^3)

And if there's a good website that I just haven't found yet, link to that would be great.


----------



## GlowingSausage (Jun 23, 2014)

There is one somewhere on this forum.
I'll go look for it.
BRB

edit: here's the thread (I'll get more specific soon):
http://www.speedsolving.com/forum/s...alculating-Permutations-on-nxnxn-Rubik-s-cube

edit2: this post helped me a few weeks/months ago (page 2):


cmowla said:


> Yeah, you've got to know the syntax.
> 
> Here is Chris' formula which takes into account orientations as well.
> Here is his adjusted formula that ignores orientations (that is, if I understood the changes he said to be made).
> ...


----------



## vcuber13 (Jun 23, 2014)

This is what you are looking for. Chris deduced it.


----------



## GlowingSausage (Jun 23, 2014)

clicky

erase the 1000s and enter your number of choice 

edit: or copy and past this and replace the #####s with your number

((24*2^10*12!)^Mod[#####, 2] 7!3^6 24!^Floor[(#####^2 - 2 #####)/4])/4!^(6 Floor[(##### - 2)^2/4])

example (for 7x7x7):
((24*2^10*12!)^Mod[*7*, 2] 7!3^6 24!^Floor[(*7*^2 - 2 *7*)/4])/4!^(6 Floor[(*7* - 2)^2/4])


----------



## cmhardw (Jun 23, 2014)

goodatthis said:


> Is there any sort of finite formula that you can simply plug in for N, with an being the order of a cube? I looked online and found something like that, but it had things that had to do with computer programming and modulus, which I can't really say I understand. Is there a more simple approach, like ...



The formula I listed on my site uses the floor function and the mod function to combine the following two formulas into one:

Number of combinations to the N x N x N cube when N is even and N>0:
\( \frac{7!*3^6*(24!)^{\frac{n^2-2n}{4}}}{(4!)^{6\left(\frac{(n-2)^2}{4}\right)}} \)

and

Number of combinations to the N x N x N cube when N is odd and N>1:
\( \frac{(8!*3^7*12!*2^{10})*(24!)^{\frac{n^2-2n-3}{4}}}{(4!)^{6\left(\frac{n^2-4n+3}{4}\right)}} \)

--edit--
If you're familiar with the floor and ceiling functions, then for n an integer you can replace n (mod 2) with:
\( \lceil\frac{n}{2}-\lfloor\frac{n}{2}\rfloor\rceil \)


----------



## Christopher Mowla (Jun 23, 2014)

There's always this which only has integers and _n_ and works for both odd and even _n_ (_n_>1).







(I bet Chris can guess how I found this!)

EDIT:
The number of K4 OLLs formula is more complicated, obviously, but it looks kind of "similar" to the above (when in this form):


----------



## cmhardw (Jun 23, 2014)

cmowla said:


> There's always this which only has integers and _n_ and works for both odd and even _n_ (_n_>1).
> 
> 
> 
> ...



I can guess how you derived that  Very cool! I like how you handled the even and odd cube sizes with the (-1)^n terms to adjust the exponents when necessary. Without having looked into this much I am surprised that the 3 factor does not have a (-1)^n term in its exponent. I'm not doubting your formula, I'm just pleasantly surprised at how the cubie-verse works out sometimes 



cmowla said:


> EDIT:
> The number of K4 OLLs formula is more complicated, obviously, but it looks kind of "similar" to the above (when in this form):



Again, I really like how you handled the odd/even issue using only (-1)^n. Neat!


----------



## Christopher Mowla (Jun 23, 2014)

I was surprised that the 3 factor didn't have (-1)^n too!

I made this number of positions formula from my trig function one, here. (For those who haven't seen, the derivative to that function is in the next post). I ran it through Mathematica as Factor[Simplify[my trig formula]], and it gave me:









Of course, \( \cos \left( n\pi \right)=\left( -1 \right)^{n} \) and \( \text{cos}^{2}\left( \frac{n\pi }{2} \right)=\frac{1+\left( -1 \right)^{n}}{2} \) for integers _n_. I just made those substitutions and rearranged everything algebraically.



I took a similar approach to achieve the number of OLLs formula from the one in the link in my signature, as it's equivalent (for the integers) to:


----------



## 10461394944000 (Jun 23, 2014)

cmowla said:


>



that 96577 seems pretty out of place there, weird.


----------



## Christopher Mowla (Jun 23, 2014)

10461394944000 said:


> that 96577 seems pretty out of place there, weird.


It may seem so, but 96577 = (13)(17)(19)(23).

So the number of positions formula can be written as a product of exponents of all prime numbers between 1 and 23 (inclusive).

That is, the number of positions formula can be written as:


















In addition, I just got that the derivative can be written as:




So we simply multiply the number of positions formula by this factor to get the rate of change.

EDIT:
Chris, now I know you're being modest! You have taken on some impressive feats yourself.


----------



## goodatthis (Jun 23, 2014)

Boy, I thought that my measly Algbera 2/Trig class was complicated, I feel like such a nub now haha.


----------



## cmhardw (Jun 23, 2014)

goodatthis said:


> Boy, I thought that my measly Algbera 2/Trig class was complicated, I feel like such a nub now haha.



When I read cmowla's posts I feel like a nub too 

I first tried to understand Richard Carr's formula for the number of combinations to the N x N x N cube in my sophomore year in college. Once I figured out what he was doing I then spent about a month or two, also in sophomore year college, to derive the formulas for the supercube as well as the super-supercube. It helps to have studied some combinatorics, as well as Proof by Induction. Combinatorics helps to derive a formula, and Proof by Induction helps you see if the formula you wrote actually does what you think it should do.


----------



## Bunyanderman (Jun 23, 2014)

Is their a more simple formula for 2x2?


----------



## cmhardw (Jun 23, 2014)

Bunyanderman said:


> Is their a more simple formula for 2x2?





cmhardw said:


> Number of combinations to the N x N x N cube when N is even and N>0:
> \( \frac{7!*3^6*(24!)^{\frac{n^2-2n}{4}}}{(4!)^{6\left(\frac{(n-2)^2}{4}\right)}} \)



Let n=2
\( \frac{7!*3^6*(24!)^{\frac{2^2-2*2}{4}}}{(4!)^{6\left(\frac{(2-2)^2}{4}\right)}} \)

\( \frac{7!*3^6*(24!)^{0}}{(4!)^{6\left(0\right)}} \)

\( 7!*3^6 \)


----------



## 10461394944000 (Jun 23, 2014)

cmowla said:


> It may seem so, but 96577 = (13)(17)(19)(23).



o that makes more sense. I had mathematica open so I tried to factor it but I probably typed 965*5*7 instead (which is prime)



Bunyanderman said:


> Is their a more simple formula for 2x2?



is "3674160" not simple enough?


----------



## G2013 (Oct 6, 2014)

Bump?
Suddenly I got interested in combinations, and I wanted to know if my logic is right:

Combinations of the [R, U] group:
Corners: 6!/2 permutations and 3^5 orientations
Edges: 7!/2 permutations and 1^6 orientations
(6!/2*3^5)*(7!/2)=220449600

Is that correct?


----------



## Stefan (Oct 6, 2014)

No.


----------



## Carrot (Oct 6, 2014)

G2013 said:


> Bump?
> Suddenly I got interested in combinations, and I wanted to know if my logic is right:
> 
> Combinations of the [R, U] group:
> ...



That is not correct. (The corner permutation needs to be 6!/(2*3) )

EDIT: Stefan just ninjaed me like a ninja..


----------



## Stefan (Oct 6, 2014)

Why steal his chance to find the flaw on his own?


----------



## G2013 (Oct 7, 2014)

Well, at least he didn't explain it, so I'll have to try to understand 6!/(2*3)
If I don't get it, could someone explain it?

The /2 is because permutation parity, right?
And the /3 is because... I don't get it. I know that an A perm is not possible, but that's just a J (perm parity) and a U perm... I thinked for some minutes but I can't get it... Why two thirds of the permutations aren't possible? Because... no idea. I'll think some more

Well, I wrote that above while I was thinking for a reason, but after 20 minutes I give up.


----------



## cmhardw (Oct 7, 2014)

G2013 said:


> Well, at least he didn't explain it, so I'll have to try to understand 6!/(2*3)
> If I don't get it, could someone explain it?



Hint: scramble in [U,R] then correctly permute the DFR and DBR corners. Look at the permutation of all the U layer corners. Do it again, scramble in [U, R] then permute DFR and DBR then look at the permutation of the U layer corners. Do it again. Notice a pattern? If not, do it again - and again. Notice a pattern?


----------



## Stefan (Oct 7, 2014)

I like Chris's hint 
(And I wasn't all that serious about Oscar, although I do like people trying stuff on their own and try to support that.)



G2013 said:


> The /2 is because permutation parity, right?



So you covered permutation parity twice? Or why did you /2 for edge permutation as well?


----------



## Carrot (Oct 7, 2014)

Stefan said:


> I like Chris's hint
> (And I wasn't all that serious about Oscar, although I do like people trying stuff on their own and try to support that.)



(Hence why I didn't explain why it should be that  He still needs some reasoning of his own to see why it holds)


----------



## G2013 (Oct 7, 2014)

cmhardw said:


> Hint: scramble in [U,R] then correctly permute the DFR and DBR corners. Look at the permutation of all the U layer corners. Do it again, scramble in [U, R] then permute DFR and DBR then look at the permutation of the U layer corners. Do it again. Notice a pattern? If not, do it again - and again. Notice a pattern?


I scramble with [U, R] then solve the corners you indicated. All the top corners are permuted correctly.
I do it again, now every corner is it its place but with a U2
Again, them are solved with a U' turn applied.
I continue with this (the only thing I see) and they go U, U2, U2, U2, U, U2... I stopped here

I don't see any other "pattern", although the one I saw is not a pattern :S
I see that all corners solve after solving 2 other corners.
Nothing more ...



Stefan said:


> So you covered permutation parity twice? Or why did you /2 for edge permutation as well?


I started with this thing of combinations just yesterday.
My logic was: A pair of edges can't be switched unless 2 corners are.
With R and U, you can never switch 2 corners.
So, as far as I know, when that happens you have to divide by 2, but I don't know the reason. I divided both corners and edges.
It must be wrong, because if it wasn't you wont have posted that.

But I observed that if 2 edges are switched, the corners are with a U or U' move applied... I didn't see more than that


----------



## cmhardw (Oct 7, 2014)

G2013 said:


> I scramble with [U, R] then solve the corners you indicated. All the top corners are permuted correctly.
> I do it again, now every corner is it its place but with a U2
> Again, them are solved with a U' turn applied.
> I continue with this (the only thing I see) and they go U, U2, U2, U2, U, U2... I stopped here
> ...



When you are permuting the corners, you have 6 possible places for where to place the DFR corner. After that you have 5 possible places for where to place the DBR corner. It's certainly possible that while doing that you end up correctly permuting both corners. When both DFR and DBR end up correctly permuted, how many different possible ways are there to permute the remaining U layer corners, based on your experiment?



G2013 said:


> I started with this thing of combinations just yesterday.
> My logic was: A pair of edges can't be switched unless 2 corners are.
> With R and U, you can never switch 2 corners.
> So, as far as I know, when that happens you have to divide by 2, but I don't know the reason. I divided both corners and edges.
> ...



That's a great place to start 

What is the minimal effect on corners on regular 3x3x3 when you swap just two edges? How is this different from [R,U] only?

Start by answering the question:
Ignoring all information about corners, is it possible to permute all 7 edges on the [R,U] bandaged 3x3x3 to any of the, theoretical, 7! permutations?
-If yes, then what happens when trying to permute corners if the edges have even permutation parity? What happens when trying to permute corners if edges have odd permutation parity?
-If no, then must the edges always have either even or odd permutation parity? Whichever parity the edge permutation has, how does this affect corners when you try to permute them?


----------



## G2013 (Oct 7, 2014)

cmhardw said:


> That's a great place to start
> 
> What is the minimal effect on corners on regular 3x3x3 when you swap just two edges? How is this different from [R,U] only?
> 
> ...



..


----------



## cmhardw (Oct 7, 2014)

G2013,

Definitely read Ryan's Cube Laws page as a start.

The basic idea is that the permutation parity of the corners must match the permutation parity of the edges. Put more simply: if you swap two corners on a solved cube, then you must also swap two edges is the idea. The idea extends beyond just "swap two corners" and "swap two edges".

A 4-cycle of corners is an odd permutation. So for example, you said in [U,R] that if you swap two edges you must 4-cycle the corners as if you had done U or U'. This means that the permutation parity of the corners is odd, and also the permutation parity of the edges is odd.

Think of permutation parity as the number of two swaps necessary to solve the cube, where swapping the locations of two pieces is a two-swap. The number of two-swaps necessary to solve your cube will either be an even or an odd number. If it's even, you have "even permutation parity" and if it's odd you have "odd permutation parity".

Combine this info with the previous posts and tell us where you're at. We are trying to help you by the way, but realize that if you figure out a concept on your own with only some help, it will stick forever. If you are told a concept, you may forget it in a week.


----------



## G2013 (Oct 8, 2014)

Well...

2 edges are switched = 1 switch
4 corners are wrong permutated, in a 4-cycle = 3 switches

3*1=3
Maybe that is the /3?

Or it is 3+1=4, even parity

?

I'm too dumb for this things


----------



## cmhardw (Oct 8, 2014)

Here are two methods:

Method 1:


Spoiler



When permuting the corners, they can have 6*5*4 possible permutations. The first corner can be placed into one of six possible locations, the next corner in 5 locations. All 4 of the remaining corners now only have 4 possible permutations. Think of your experiment with solving DFR and DBR. The U layer only ever had 4 possible permutations of the corners.

Now that corners are permuted they can be flipped in 3^5 ways.

Lastly we permute the edges. They have 7!/2 permutations. The reason it's not 7! is because of the Cube Law that the overall corner permutation parity must match the overall edge permutation parity. This is a law for the 3x3x3, so any subset of the 3x3x3 that does not include cube rotations (x, y, z) turns inherits this law as well.

Since the corners have a permutation parity (either even or odd) then half of the 6! edge permutations are impossible, because they have the opposite permutation parity.

There is no concept of edge flip, so we're done with edges.

The overall count is (6*5*4)*3^5*7!/2



Method 2:


Spoiler



Let's permute the edges into their 7! possible permutations. There is no concept of edge flip, so now we're done with edges.

When permuting the corners there are 6*5*4 ways to place the corners. This is because after permuting 2 corners, the last 4 corners can only have 4 possible permutations. Remember your experiment with solving DFR and DBR. However, since the edges are already permuted, and now have a permutation parity (either even or odd) then half the corner permutations are not possible because they have the opposite permutation parity of the edges. Think cube laws again (see my Method 1 spoiler for more explanation of this).

So the corners only have (6*5*4)/2 or 6*5*2 permutations. The corners have 3^5 orientations possible.

Putting it all together we get:
7!*(6*5*4)/2*3^5


----------



## G2013 (Oct 8, 2014)

Ahhh ok, I see.
But what I don't understand is (in the second method): why do you say "Let's permute the edges into their 6! possible permutations.", if the first one can go into 7, the second into 6, etc. resulting 7! ?

I understood the /3 as: Instead of 6*5*4*3*2*1 for corners you use 6*5*4, that is 6!/2*3. So the 3 is actually there to match the number.

----------------------------------------------------------------------

And if I wanted [M,U], I can think of:

Edges: 6!
Corners: 4/2, actually 2, and *3^5
Centers: Have 4 positions but 2 are not possible in some cases, so 2.
Resulting: 6!*2*3^5*2=699840

Am I right?


----------



## cmhardw (Oct 8, 2014)

G2013 said:


> Ahhh ok, I see.
> But what I don't understand is (in the second method): why do you say "Let's permute the edges into their 6! possible permutations.", if the first one can go into 7, the second into 6, etc. resulting 7! ?
> 
> I understood the /3 as: Instead of 6*5*4*3*2*1 for corners you use 6*5*4, that is 6!/2*3. So the 3 is actually there to match the number.
> ...



You're right, I often make mistakes when posting.

There are 7 edges so the calculations should be:

(6*5*4)*7!/2*3^5

or

7!*(6*5*4)/2*3^5


----------



## cmhardw (Oct 8, 2014)

G2013 said:


> And if I wanted [M,U], I can think of:
> 
> Edges: 6!
> Corners: 4/2, actually 2, and *3^5
> ...



Corners cannot be mis-oriented in [M,U]. Otherwise it looks good.


----------



## Jakube (Oct 8, 2014)

G2013 said:


> And if I wanted [M,U], I can think of:
> 
> Edges: 6!
> Corners: 4/2, actually 2, and *3^5
> ...



First of the corner orientation is always solved. The edge orientation isn't. So it should be 2^5 instead of 3^5. 
And you canceled a 2 too often. 

If you have any of the 6! edge permutations, each corner permutation (out of the 4) is possible. Once you fixed the edges and corners, there are only 2 center cases. 

Therefore 6!*2^5*4*2 = 184320


----------



## tseitsei (Oct 8, 2014)

G2013 said:


> And if I wanted [M,U], I can think of:
> 
> Edges: 6!
> Corners: 4/2, actually 2, and *3^5
> ...



I think you forgot edge orientation... I'm not an expert tough...


so I would say you still have to multiply that by 2^5

Also there is no corner orientation here so delete that.

Also I think you divided by 2 too many times. One should be enough (again not sure tough). I think you must divide only EITHER for corners OR centers... Because doing M changes parity (4cycle of centers and 4 cycle of centers) and also doing U changes parity (4 cycle of corners and 4 cycle of edges). So doing both M and U "changes" parity 2 times so it doesn't really change parity...

EDIT: Ninja'd. But looks like I was correct


----------



## Randomno (Oct 8, 2014)

What about for cuboids other than 1x1x2/1x1x3/1x1x4/etc.?


----------



## G2013 (Oct 8, 2014)

Jakube said:


> First of the corner orientation is always solved. The edge orientation isn't. So it should be 2^5 instead of 3^5.
> And you canceled a 2 too often.
> 
> If you have any of the 6! edge permutations, each corner permutation (out of the 4) is possible. Once you fixed the edges and corners, there are only 2 center cases.
> ...



You are telling me that if I have any of the 6! permutations, each corner permutation is possible. Alright, then:
If I have 2 edges switched, then all corners can be solved.
But that is not real
So there must be a mistake in what you had said (written)...


----------



## cmhardw (Oct 8, 2014)

G2013 said:


> You are telling me that if I have any of the 6! permutations, each corner permutation is possible. Alright, then:
> If I have 2 edges switched, then all corners can be solved.
> But that is not real
> So there must be a mistake in what you had said (written)...



M' U2 M U2 M'

This leaves 2 edges swapped and all 4 corners solved.


----------



## G2013 (Oct 8, 2014)

But centers in a third position, if we count the 2 "possible" ones


----------



## Jakube (Oct 8, 2014)

You can see it this way: there are 4 different cases to consider:

1) No parity at all:

Edge Permutation: 6! / 2
Corner Permutation: 2 (solved and U2)
Center Permutation: 2 (solved and M2)

2) Edge-Corner parity:

Edge Permutation: 6! / 2
Corner Permutation: 2 (U and U')
Center Permutation: 2 (solved and M2)

3) Edge-Center parity:

Edge Permutation: 6! / 2
Corner Permutation: 2 (solved and U2)
Center Permutation: 2 (M and M')

4) Corner-Center parity:

Edge Permutation: 6! / 2
Corner Permutation: 2 (U and U')
Center Permutation: 2 (M and M')

I ignored edge orientation in all cases, it's always 2^5. 

Each of these 4 cases have the same amount of combinations, therefore there are 2^5*4*(6!/2*2*2) combinations


edit:

Or you can just say: there are 4*4*6!*2^6 possibilities, divide /2 because of edge orientation and /2 because of of parity.


----------



## cmhardw (Oct 8, 2014)

There are 4 possible states considering the permutation parity of center, corners, and edges.

1) All orbits have even parity
2) Centers have even parity, corners and edges have odd parity
3) Corners have even parity, centers and edges have odd parity
4) Edges have even parity, corners and centers have odd parity

If 2 edges are swapped and the corners are solved then edges have odd parity while corners have even parity. This means that edges and centers have odd parity and is case number 3.

I would count all possible [M, U] cases as:

(6!*2^5)*4*2

(6!*2^5) is me permuting edges first, then flipping them.

4 is permuting the corners into any of their 4 states.

2 is because I have only 2 choices of center state. Knowing the parity of edges and corners will uniquely determine the parity of the centers. No matter what, there are 2 center states that have the correct parity.

I may have missed something, but I'm pretty sure this is sound.

--edit--

Ninja'd by Jakube


----------



## G2013 (Oct 8, 2014)

Those are really clear explanations!
Basically, you have to check how many types of pieces are in what you are calculating, determine parities, check permutations and orientations, and do the math.
So megaminx:
Edges: 30
Corners: 20

Corners can be permutated in 20!/2 ways, because you can't switch 2 of them; it must be 3, and orientated in 3^19
Edges can be permutated in 30!/2 ways, for the same reason as corners, and orientated in 2^29

The parity thing can be:
All even => even+even=even, OK
All odd => odd+odd=even, OK

So:

Edges: (30!/2)*2^29
Corners: (20!/2)*3^19

Total: (30!/2)*2^29*(20!*3^19)/2

I hope it is right


----------



## Christopher Mowla (Oct 9, 2014)

G2013 said:


> I hope it is right


Yes, it is.


----------



## cmhardw (Oct 9, 2014)

G2013 said:


> The parity thing can be:
> All even => even+even=even, OK
> All odd => odd+odd=even, OK
> 
> ...



G2013, your calculation is correct but your parity analysis is not (sort of).

You correctly observed that you cannot swap just two corners or just two edges on minx, but then you say:



G2013 said:


> The parity thing can be:
> All even => even+even=even, OK
> All odd => odd+odd=even, OK



Here you say that the corners and edges can have odd parity, as long as they both have odd parity.

Which one is the correct one (they say contradictory things)?

Before you answer, remember that your numerical calculation is correct 

Good job on these calculations, by the way! This kind of cube math is fun, isn't it?


----------



## G2013 (Oct 9, 2014)

The all even is the only correct, because you can switch: 0 corners, 3 corners, 5 corners, etc. So that is 0 swaps, 2 swaps, 4 swaps, respectively.

And thanks for all!


----------



## cmhardw (Oct 9, 2014)

G2013 said:


> The all even is the only correct, because you can switch: 0 corners, 3 corners, 5 corners, etc. So that is 0 swaps, 2 swaps, 4 swaps, respectively.
> 
> And thanks for all!



Yep


----------



## Carrot (Oct 9, 2014)

G2013 said:


> And if I wanted [M,U], I can think of:
> 
> Edges: 6!
> Corners: 4/2, actually 2, and *3^5
> ...



No.


----------



## G2013 (Oct 9, 2014)

I guess that your answer came a bit late


----------



## Herbert Kociemba (Dec 8, 2016)

The closed formulas for the number of positions of the nxnxn are quite nasty and not very intuitive. The following recursive formulas are short and elegant (in my opinion) and give more insight in the construction process.

usual nxnxn:
a(1)=1;
a(2)=7!*3^6 //2x2x2
a(3)=8!*3^7*12!*2^11/2 //3x3x3
a(n)=a(n-2)*24!*(24!/24^6)^(n-3), n>3

subercube nxnxn:
a(1)=1;
a(2)=7!*3^6 //2x2x2
a(3)=8!*3^7*12!*2^11/2*4^6/2 //3x3x3
a(n)=a(n-2)*24!*(24!/2)^(n-3), n>3

a(1), a(2) and a(3) are just the number of positions for the 1x1x1, 2x2x2 and 3x3x3 and need no explanation except eventually the factor 4^6/2 which gives the number of possible orientations of the centers of the supercube 3x3x3.
The following picture demonstrates for example the case n=9.


Spoiler: From 7x7x7 to 9x9x9






We take the 7x7x7 cube which has a(n-2)=a(7) positions. When we insert six slices as depicted we get a 9x9x9 and the additional pieces form exactly 7 orbits: one edge orbit (24! positions) and n-3 = 6 center orbits (each with 24!/4!^6 positions for the usual nxnxn and with 24!/2 positions for the supercube). Multiplying all together gives the formula for a(n). That's all.

Edit: Typo in a(2) for the usual case corrected.


----------



## goodatthis (Feb 18, 2017)

Christopher Mowla said:


> It may seem so, but 96577 = (13)(17)(19)(23).
> 
> So the number of positions formula can be written as a product of exponents of all prime numbers between 1 and 23 (inclusive).
> 
> ...


I'm curious as to the applications of doing calculus with these formulas, are there any particular reasons why one would want to compute the derivative of these formulas?


----------



## shadowslice e (Feb 18, 2017)

goodatthis said:


> I'm curious as to the applications of doing calculus with these formulas, are there any particular reasons why one would want to compute the derivative of these formulas?


Well, you'll just be finding how fast the number of positions grows per extra layer and I don't really see many applications for that.


----------



## Herbert Kociemba (Jul 4, 2022)

Even if this thread is quite old I think it is worth to share a very short formula for the number of positions for nxnxn in Mathematica I created recently.

f[1]=1; f[n_]:=7!3^6(6*24!!)^(s=Mod[n, 2])24!^(r=(n-s)/2-1)(24!/4!^6)^(r(r+s))

Mod[n,2] is 0 for even and 1 for odd n. !! is the double factorial.


----------



## qwr (Jul 11, 2022)

A075152 - OEIS





goodatthis said:


> I'm curious as to the applications of doing calculus with these formulas, are there any particular reasons why one would want to compute the derivative of these formulas?


My thought is that it might be used for generating functions, which give more insight to recursive formulas.


----------



## Herbert Kociemba (Jul 15, 2022)

In my opinion the derivative is absolutely useless here. I also see no sense to mimic the Mod function by a Sin or Cos function as I have seen in some posts before.
A handy generating function would be nice but I don’t think it exists. Even for much simpler sequences like 2^(n^2) https://oeis.org/A002416 there does not seem to exist one. 
For generating functions in general and how to create them I recommend the free to download book generatingfunctionology from H. S. Wilf.


----------

