# Number of Cubies problem



## Igora (Jul 30, 2010)

I've been working out an equation for the number of cubies in a regular cube (not helicopter, skewb etc.) so far I've got c=6x^2-8x+4 where x is the number of cubies on one side of the cube, for instance in a 7x7x7 x=7. The only problem with this equation is that it doesn't work for a 1x1x1 cube. Any thoughts on one that would?


----------



## brunson (Jul 30, 2010)

I don't think it works for 2, either.


Spoiler



x^3 - (x-2)^3 works a bit better. That's how many blocks if the cube was solid, minus the number of cubies that would fit inside it if it were hollow.

(But it still doesn't work for 1)


----------



## cmhardw (Jul 30, 2010)

Igora said:


> I've been working out an equation for the number of cubies in a regular cube (not helicopter, skewb etc.) so far I've got c=6x^2-8x+4 where x is the number of cubies on one side of the cube, for instance in a 7x7x7 x=7. The only problem with this equation is that it doesn't work for a 1x1x1 cube. Any thoughts on one that would?



With x=3 your formula gives:
6*9 - 8*3 + 4 = 34

So it does not work for the 3x3x3 either.

Hint: You are on the right track, keep going with the corrections. For example, you know the 6*x^2 is an overcount, and counts more pieces than are actually on the cube. Take a look at your method for fixing this overcount (i.e. the other terms in your formula).

Chris


----------



## JeffDelucia (Jul 30, 2010)

If I understand what your asking this should work



Spoiler



c=x^3-(x-2)^3


----------



## cmhardw (Jul 30, 2010)

JeffDelucia said:


> If I understand what your asking this should work
> 
> 
> 
> ...



Yep  Though usually people write the simplified form for this.

Chris


----------



## JeffDelucia (Jul 30, 2010)

cmhardw said:


> JeffDelucia said:
> 
> 
> > If I understand what your asking this should work
> ...



1x1 doesn't work though...


----------



## uberCuber (Jul 30, 2010)

JeffDelucia said:


> cmhardw said:
> 
> 
> > JeffDelucia said:
> ...



do you need a formula to tell you how many cubies are in a 1x1?? >_>


----------



## cmhardw (Jul 30, 2010)

uberCuber said:


> JeffDelucia said:
> 
> 
> > 1x1 doesn't work though...
> ...



The 1x1x1 case fails on most formulas involving the n x n x n cube. Usually we just say that for the formula n > 1 must be true. It might be possible to come up with one single explicit formula that includes the 1 x 1 x 1 case correctly, but I don't know of one. That's not to say that it hasn't been done though.

Chris


----------



## hawkmp4 (Jul 31, 2010)

uberCuber said:


> JeffDelucia said:
> 
> 
> > cmhardw said:
> ...


No, but having an equation that works more generally is...well...nicer.


----------



## Igora (Jul 31, 2010)

oops, I accidentaly posted the wrong one :fp, the one I meant to post is c=6x^2-12x+8 rather than 6x^2-8x+4


----------



## hawkmp4 (Jul 31, 2010)

Are we counting centres as cubies? I wouldn't think so...in which case x^3-(x-2)^3 would over count.
Hm...this is more complicated than I thought...I originally thought to just subtract 6 for centres...but that will only work for odd x.

Well, regardless, for odd x, x not equal to one, x^3-(x-2)^3-6 should work. I will have to think about the even case...


----------



## Igora (Jul 31, 2010)

hawkmp4 said:


> Are we counting centres as cubies? I wouldn't think so...in which case x^3-(x-2)^3 would over count.
> Hm...this is more complicated than I thought...I originally thought to just subtract 6 for centres...but that will only work for odd x.
> 
> Well, regardless, for odd x, x not equal to one, x^3-(x-2)^3-6 should work. I will have to think about the even case...



Well, I count them as cubies, but if you don't, the even's case would be simply x^3-(x-2)^3 without the added -6.


----------



## hawkmp4 (Jul 31, 2010)

Igora said:


> hawkmp4 said:
> 
> 
> > Are we counting centres as cubies? I wouldn't think so...in which case x^3-(x-2)^3 would over count.
> ...



Yes, that's clear. I was hoping to come up with an explicit equation that works for all x. Well. For all natural numbers.


----------



## Lucas Garron (Jul 31, 2010)

cmhardw said:


> It might be possible to come up with one single explicit formula that includes the 1 x 1 x 1 case correctly, but I don't know of one.



Getting such a formula is trivial, of course, by adjusting for n=1.

Now, why is there no polynomial that'll work for all positive integers?


----------



## cmhardw (Jul 31, 2010)

Lucas Garron said:


> cmhardw said:
> 
> 
> > It might be possible to come up with one single explicit formula that includes the 1 x 1 x 1 case correctly, but I don't know of one.
> ...



I don't really know to be honest. I've been trying to think of how to use the floor, ceiling, or mod functions to accomplish one formula that mimics the "standard" one, and also allows for the n=1 case.

Other than your idea of making a piecewise function defining the n=1 case, I don't know why a single polynomial solution won't work.

We know that the polynomial
\( P(n)=6n^2-12n+8 \)

works perfectly for \( n>1 \). P(n) fails for n=1, so we must assume there exists another polynomial Q(n) such that Q(n) = P(n) for all natural numbers n>1, but \( Q(1) \not= P(1) \) must be true. In fact, P(1)=2 and Q(1) we want to be equal to 1.

My higher math is apparently not very sound, because it is not immediately apparent to me why Q(n) does not exist.

Chris


----------



## hawkmp4 (Jul 31, 2010)

Lucas Garron said:


> cmhardw said:
> 
> 
> > It might be possible to come up with one single explicit formula that includes the 1 x 1 x 1 case correctly, but I don't know of one.
> ...



I can easily see why there is no quadratic that works. But I suppose that's rather trivial. I'm with Chris, I don't see why a polynomial couldn't exist.


----------



## Lucas Garron (Jul 31, 2010)

cmhardw said:


> I don't really know to be honest. I've been trying to think of how to use the floor, ceiling, or mod functions to accomplish one formula that mimics the "standard" one, and also allows for the n=1 case.



There's always the standard absolute value cheat:
x^3 - (x - 2)^3 + (x - Abs[x - 2] - 2)/2



hawkmp4 said:


> I can easily see why there is no quadratic that works. But I suppose that's rather trivial. I'm with Chris, I don't see why a polynomial couldn't exist.



No finite polynomial will work for the same reason no quadratic will work:

Take R = P-Q. R must be 0 at every positive integer >1. The only finite polynomial with this property is 0. What Chris said, really.
(You can't "hack" a polynomial at specific parts while preserving infinitely many other values.)


----------



## hawkmp4 (Jul 31, 2010)

Lucas Garron said:


> cmhardw said:
> 
> 
> > I don't really know to be honest. I've been trying to think of how to use the floor, ceiling, or mod functions to accomplish one formula that mimics the "standard" one, and also allows for the n=1 case.
> ...


That was what I was thinking, but I had absolutely no idea how to explain it mathematically. Thanks!


----------



## meichenl (Jul 31, 2010)

We could write a recursion relation. 

For \( n=0 \) we need \( 0 \) cubies, so

\( S_0 = 0 \).

Imagine taking an \( n-1 * n-1 \) cube and adding cubies to make it into an \( n * n \) cube.

\( S_n = S_{n-1} + ... \)

You'd have to add a layer of cubies around the outside. Add an \( n * n \) face to R with the extra cubies hanging above U and B. Then add an \( (n-1) * (n-1) \) block to U. Finally add \( (n-1) * n \) to B. That comes to \( 3n^2 - 3n + 1 \) cubies added. 

\( S_n = S_{n-1} + 3n^2 - 3n + 1 ... \)

But some old cubies got covered up completely. This happened to stuff in the URB corner of the smaller cube and its vicinity. What got covered up was basically an \( n-2 * n-2 \) cube.

\( S_n = S_{n-1} + 3n^2 - 3n + 1 - S_{n-2}... \)

Part of that \( S_{n-2} \) cube had already been covered, though, so we have to add back in a cube of size \( S_{n-3} \)

\( S_n = S_{n-1} + 3n^2 - 3n + 1 - S_{n-2} + S_{n-3}... \)

et cetera

\( S_n = S_{n-1} + 3n^2 - 3n + 1 - S_{n-2} + S_{n-3} - S_{n-4} + S_{n-5}... S_1 \)

If we plug in the same thing evaluated for \( S_{n-1} \), that whole long alternating summation cancels out, and we have

\( S_n = 3n^2 - 3n + 1 + 3(n-1)^2 - 3(n-1) + 1 \)

which is the same equation mentioned earlier.

It doesn't work for \( S_1 \), though, because \( S_0 \) is simply assigned the value \( 0 \). We cannot make the substitution
\( S_0 = 0^2 + -3*0 + 1 + ... \) because the recursion only applies to higher \( n \). 

Instead we just have \( S_1 = 3*1^2 - 3*1 + 1 + S_0 = 1 \).


----------



## mrCage (Jul 31, 2010)

Why use the number of cubies on a single face as the variable x, and not simply the cube dimension?

Per


----------



## keemy (Jul 31, 2010)

http://www.research.att.com/~njas/sequences/A005897

heh neato (except we have b[x]=a[x-1])


----------



## cmhardw (Jul 31, 2010)

Lucas Garron said:


> cmhardw said:
> 
> 
> > I don't really know to be honest. I've been trying to think of how to use the floor, ceiling, or mod functions to accomplish one formula that mimics the "standard" one, and also allows for the n=1 case.
> ...



That's a neat trick!



Lucas Garron said:


> hawkmp4 said:
> 
> 
> > I can easily see why there is no quadratic that works. But I suppose that's rather trivial. I'm with Chris, I don't see why a polynomial couldn't exist.
> ...



Would it be possible to make a non-elementary function that does this? Are there other ways about it? Can you use a Fourier Series, or an infinite polynomial? Or perhaps something akin to the Gamma function?

Chris


----------



## Lucas Garron (Jul 31, 2010)

cmhardw said:


> x^3 - (x - 2)^3 + (x - Abs[x - 2] - 2)/2



That's a neat trick![/QUOTE]
Actually, that's a bit ugly. I like x^3 - ( Abs[x - 3/2] - 1/2 )^3 more.



cmhardw said:


> Would it be possible to make a non-elementary function that does this? Are there other ways about it? Can you use a Fourier Series, or an infinite polynomial? Or perhaps something akin to the Gamma function?


Maybe, but what's the point? Our definition simply degenerates at x=1.


----------



## Igora (Aug 1, 2010)

> Yes, that's clear. I was hoping to come up with an explicit equation that works for all x. Well. For all natural numbers.



Well, if center pieces aren't counted as cubies, than the 1x1 cube would have 0 cubies, because is it odd, and each color is the "center" of its side.


----------



## Igora (Sep 30, 2010)

Actually after doing some research, I've found that using
x^3-(x-2)^3-(3sin(pi(x-0.5))+3)
will get rid of the center pieces of the odd numbered cubes, however this doesn't fix the 1x1x1 cube issue.


----------



## Igora (Oct 10, 2010)

Lucas Garron said:


> Maybe, but what's the point? Our definition simply degenerates at x=1.



Well, I've been working on this for a few hours, and came up with this:

C= 6x^2-12x+8-3sin(pi(x-0.5))-3+2.5(|x-2|-(x-2))-5(|x-1|-(x-1))

it works with 1, 0, and all the rest of the natural numbers.


----------



## Radcuber (Oct 10, 2010)

number of cubies = y(Y x Y x Y cube)^3-6. I don't know if I understood the problem correctly lol.
EDIT: Cos I'm a dumbass I realized this didn't work for a 1x1x1 cube. Nor a 2x2x2 cube. Man, I am dumb.


----------



## hawkmp4 (Oct 10, 2010)

Igora said:


> Actually after doing some research, I've found that using
> x^3-(x-2)^3-(3sin(pi(x-0.5))+3)
> will get rid of the center pieces of the odd numbered cubes, however this doesn't fix the 1x1x1 cube issue.


\( n^3-(n-2)^3-6(n\bmod{2}) \) is a much more elegant solution for n>1.


Radcuber said:


> number of cubies = y(Y x Y x Y cube)^3-6. I don't know if I understood the problem correctly lol.
> EDIT: Cos I'm a dumbass I realized this didn't work for a 1x1x1 cube. Nor a 2x2x2 cube. Man, I am dumb.


Nor any even n cube.


----------



## Radcuber (Oct 10, 2010)

hawkmp4 said:


> \( n^3-(n-2)^3-6(n\mod2) \) is a much more elegant solution for n>1.
> 
> Nor any even n cube.


 
True.


----------



## ThumbsxUpx (Oct 10, 2010)

Well, with me and my un-mature 13 year old mind, this obviously isn't 7th Grade math...:fp


----------



## cincyaviation (Oct 10, 2010)

(x-2)12 + [(x-2)^2]6 + 8
Pretty sure this works for anything but 1x1x1
EDIT: I never checked it though, just off the top of my head.


----------



## Rinfiyks (Dec 11, 2010)

cmhardw said:


> I've been trying to think of how to use the floor, ceiling, or mod functions to accomplish one formula that mimics the "standard" one, and also allows for the n=1 case.



\( x^3 - (x - 2)^3 - \lfloor\frac{1}{x}\rfloor \)

Edit: This hack also works for x = 1, however it also gives 0 for x < 1. Covers everything 

\( \dfrac{\lfloor \dfrac{3\times 4^x}{4+4^x}\rfloor}{2}(x^3 - (x - 2)^3) \)


----------



## Carrot (Sep 30, 2011)

BUMP! =D

\( n^3 - (n - 2)^3 - \left ( 1 - \left \lceil \frac{n - 1}{n} \right \rceil \right ) \) WolframAlpha

Or in simplified form:

\( 6(n-2)^2 - 12(n - 2) + 7 + \left \lceil \frac{n - 1}{n} \right \rceil \) WolframAlpha

Just trying to learn LaTeX  so I thought it would be nice trying to write this "hack" for this problem.

EDIT:.... lol same as rinfiyks -.-'


----------



## Christopher Mowla (Oct 9, 2011)

cmhardw said:


> My higher math is apparently not very sound, because it is not immediately apparent to me why Q(n) does not exist.
> 
> Chris​


I have finally made time to work on this problem, and I have found an elementary function which is infinitely differentiable. Hence we can make a Taylor series from it and then write it in compact form as an infinite series. 
(Some one do at least part of the work and do this! I did the hard part!). 

First note that I handled even cubes separately from odd cubes. 
Therefore:
The formula is the sum of all terms (both for even cubes and odd cubes).
We multiply each even cube term by \( \cos ^{2}\left( \frac{n\pi }{2} \right) \)
We multiply each odd cube term by \( \sin ^{2}\left( \frac{n\pi }{2} \right) \)

The "mystery function" I came up with is too large for the 400 character limit in latex!






_I found this by experimenting with my Ti-89 Titanium Calculator.
_ 
So what does it output?
1) Obviously it's zero for all even cubes because it is multiplied by \( \sin ^{2}\left( \frac{n\pi }{2} \right) \).
2) It is the value of \( t \) for all odd cubes except _n_=1 (the 1x1x1 cube).
3) \( \frac{t}{s}\left( s-5 \right) \) for the 1x1x1 cube.

So by basic algebra, when you want to assign a certain value for _n_=1 (let's call it _x_), and you know which value you want for _t_, then you must have \( s=\frac{5t}{t-x} \).​ 


Thus the formula for the number of cubies for the nxnxn, n from 1 to infinity is the sum of all of the following:

[1] The number of fixed center pieces on odd cubes AND the single value of 1 for the 1x1x1 is:
\( g\left( n,6,6 \right)=\left\{ 1,6,6,6,... \right\}\text{ for }n=1\text{ to }k,\text{ where }n\text{ is odd}\text{.} \).

[2] The number of corners on odd cubes (and a value of zero on the 1x1x1) is:
\( g\left( n,5,8 \right)=\left\{ 0,8,8,8,... \right\}\text{ for }n=1\text{ to }k,\text{ where }n\text{ is odd}\text{.} \).

[3] The number of corners on even cubes is simply:
\( \text{8cos}^{2}\left( \frac{n\pi }{2} \right) \).

[4] The number of middle edges on odd cubes (and a value of zero on the 1x1x1) is:
\( g\left( n,5,12 \right)=\left\{ 0,12,12,12,... \right\}\text{ for }n=1\text{ to }k,\text{ where }n\text{ is odd} \).

[5] The total number of non fixed (NF) center pieces on odd cubes is 24*the number of NF center orbits.
\( 24\left( \frac{\left( n-1 \right)\left( n-3 \right)}{4} \right)\sin ^{2}\left( \frac{n\pi }{2} \right)=6\left( n-1 \right)\left( n-3 \right)\sin ^{2}\left( \frac{n\pi }{2} \right) \).

[6] The total number of NF center pieces on even cubes is 24*the number of NF center orbits:
\( \text{24}\left( \frac{n-2}{2} \right)^{2}\cos ^{2}\left( \frac{n\pi }{2} \right)=24\frac{\left( n-2 \right)^{2}}{4}\cos ^{2}\left( \frac{n\pi }{2} \right)=6\left( n-2 \right)^{2}\cos ^{2}\left( \frac{n\pi }{2} \right) \).

[7] The total number of wings on odd cubes is:
\( g\left( n,5,\text{ 24}\left( \frac{n-3}{2} \right) \right)=g\left( n,5,12\left( n-3 \right) \right)\text{ for }n=1\text{ to }k,\text{ where }n\text{ is odd} \).

[8] The total number of wings on even cubes is simply:
\( \text{24}\left( \frac{n-2}{2} \right)\cos ^{2}\left( \frac{n\pi }{2} \right)=12\left( n-2 \right)\cos ^{2}\left( \frac{n\pi }{2} \right) \)

So \( f\left( n \right)=\left[ \text{odd cubes total} \right]+\left[ \text{even cubes total} \right] \).

That is,
\( f\left( n \right)=g\left( n,6,6 \right)+g\left( n,5,8 \right)+g\left( n,5,12 \right) \)\( \,+g\left( n,5,12\left( n-2 \right) \right)+6\left( n-1 \right)\left( n-3 \right)\sin ^{2}\left( \frac{n\pi }{2} \right) \)\( +\text{8cos}^{2}\left( \frac{n\pi }{2} \right)+6\left( n-2 \right)^{2}\cos ^{2}\left( \frac{n\pi }{2} \right)+12\left( n-2 \right)\cos ^{2}\left( \frac{n\pi }{2} \right) \).


----------



## Christopher Mowla (Oct 9, 2011)

LOL, this can be so much simpler.

Clearly \( f\left( n \right)=g\left( n,s,t \right)-t\sin ^{2}\left( \frac{n\pi }{2} \right)+t \), so we merely need to substitute \( 6n^{2}-12n+8=t \) and therefore, \( \frac{5t}{t-1}=\frac{10\left( 3n^{2}-6n+4 \right)}{6n^{2}-12n+7}=s \) (because we want the value for the 1x1x1 to be 1) to get:

[Formula Link][Values link]
\( f\left( n \right)=\frac{\left( n-3 \right)\left( 6n^{2}-12n+7 \right)}{2}\,\, \)\( \ cos ^{2}\left( \left( z\left( \cos \left( z\frac{\pi }{16} \right)+\sin \left( z\frac{\pi }{16} \right) \right)+8\sin ^{2}\left( z\frac{\pi }{16} \right) \right)\frac{\pi }{32} \right) \)\( \ sin ^{2}\left( \frac{n\pi }{2} \right)+6n^{2}-12n+8 \)\( ,\text{where }z=\left( n-1 \right)\left( n-3 \right) \).​ 

Look at the graph!


----------



## qqwref (Oct 9, 2011)

cmowla, while I appreciate how much work you've put into this, it's really the wrong approach and you're not going to get any meaningful answers by doing it this way. The use of tons of weird/nested sines and cosines just confuses the problem; although you might be creating a function that behaves well enough on the integers, there's a ton of noise in between, and any derivatives you create will give values that depend far more on your very specific function than on the integer values you are trying to express.

As Lucas pointed out earlier, what we really want is to note that Q(n) = P(n) - KroneckerDelta(n,1), and then find a "prettier" function that is equivalent to the Kronecker delta at all positive integer values. Although this is doable, I'm not really sure what the point is.

EDIT: Also, cmowla, you've got a problem: write your f(n) - P(n), and you'll see it has oddly large values for certain sporadic integer inputs: http://www.wolframalpha.com/input/?...i/16)^2)*pi/32)^2*sin(n*pi/2)^2+from+1+to+100


----------



## mrCage (Oct 10, 2011)

Why not simply split it in 2 scenarios:

n=1 => 1 cubie.
n>1 => n^3-(n-2)^3

Subtract 6 from odd sized cubes if you don't really fancy calling the centres for cubies, as they are not inteerchangable in the normal sense with outer layer turns .... hmm.

No need to make this fancy.

Per


----------



## qqwref (Oct 10, 2011)

I discovered a formula equivalent to the Kronecker Delta over integers 
\( K(x,y) = \sin(\frac{\pi}{2} 2^{(x-y)^2}) \)
This returns 0 if x and y are different and 1 if they are the same. It isn't too hard to see why this works. (x-y)^2 is 0 if x=y and some positive integer otherwise; when we take 2 to this power we get 1 if x=y and some even integer otherwise. Then applying the sine turns all odd numbers into 1's (or -1's but that isn't important here) and all even numbers into 0's. Voila!

So here's a wolframalpha function giving the number of cubies:
6x^2-12x+8-sin(pi * 2^(x^2-2x))
And here's one giving the number of *non-fixed* cubies:
6x^2-12x+8-6sin^2(x pi/2)+4sin(pi * 2^(x^2-2x))


----------



## Herbert Kociemba (Oct 11, 2011)

qqwref said:


> As Lucas pointed out earlier, what we really want is to note that Q(n) = P(n) - KroneckerDelta(n,1), and then find a "prettier" function that is equivalent to the Kronecker delta at all positive integer values. Although this is doable, I'm not really sure what the point is.


 
What is a pretty function K(x) in this case? I suggest undefinitely often differentiable,without oscillating behavior between two successive natural numbers, and with K(x)->0 for x->infinity.
One possibility is for example K(x)=1/Gamma(x)/Gamma(2 - x), using the Gamma-Function.

http://www.wolframalpha.com/input/?i=plot+1/Gamma(x)/Gamma(2+-+x)


----------



## qqwref (Oct 11, 2011)

Oo, nice find. Wolfram Alpha helpfully points out that that function is equivalent to
\( K(x) = \frac{\sin(\pi x)}{\pi - \pi x} \)
A little fiddling gives a general expression for the Kronecker function:
\( K(x,y) = \frac{\sin(\pi (x-y))}{\pi(x-y)} \)
which is simple enough that I'm a little embarrassed to not have thought of it


----------



## Herbert Kociemba (Oct 12, 2011)

qqwref said:


> Oo, nice find. Wolfram Alpha helpfully points out that that function is equivalent to
> \( K(x) = \frac{\sin(\pi x)}{\pi - \pi x} \)


 
Be careful, equivalent except for K(1), which is the most important function value. Here you get a division by zero error.

You must define K(x)= Sin(pi*x)/(pi - pi*x) for x<>1 and K(x)= 1 for x=1

But in this way you get a case distinction between x=1 and x >1 which is funny if we remember what this thread is all about.


----------



## qqwref (Oct 13, 2011)

That's true, but the limit at x=1 is 1, which is formal enough for me. In WolframAlpha, if you ask to evaluate that function at x=1, it simply spits back a 1 without even warning you about the denominator. (Incidentally, if gamma(2-x) is undefined for most positive integers, is it still alright to divide by it?)


----------



## Herbert Kociemba (Oct 14, 2011)

qqwref said:


> That's true, but the limit at x=1 is 1, which is formal enough for me. In WolframAlpha, if you ask to evaluate that function at x=1, it simply spits back a 1 without even warning you about the denominator. (Incidentally, if gamma(2-x) is undefined for most positive integers, is it still alright to divide by it?)


 
I think indeed this discussion is very academic, nevertheless an expression like 0/0 is meaningless per se, whereas in the extendend complex plane (see for example http://en.wikipedia.org/wiki/Riemann_sphere) Gamma(2-x) is well defined with Gamma(2-x)=ComplexInfinity for x=2,3,4... and hence 1/Gamma[2-x]=0 is defined too.
But I will not insist on all this, I just wanted to have a bulletproof definition where no one could say that implicitly it includes a case distinction.


----------



## m1r0 (Oct 31, 2011)

I don't know if this has been already resolved, but wouldn't (x^3-[x-1]^3)+([x-1]^3-[x-2]^3)*|[sin(pi y)/(pi - pi y) at y=x]-1| work? (27-8)+(8-1)*|0-1|= 26 for a 3 by 3. And for a 1 by 1, (1-0)+(0-1)*|1-1|=1
I'm not sure that this is correct, because I am slightly basing this off of the post by qqwref. Yes, and I do know this is an old discussion.

Edit: Also, this was kind've thrown together in a minute, not a very elegant situation, just using a little limit problem to detect if x is one, it is not very elegant at all.


----------



## AndersB (Nov 8, 2011)

Hmm, I think this has been made way more complex then it actually is.

I like to approach the problem like this: For example in a 7x7, when you remove all invisible cubies, you remove a 5x5. That means 7x7x7-5x5x5=the number of cubies.
For all cubes it would look like this, if x is the sidelength: *x^3-(x-2)^3 = number of cubies*. Am i not right? 

This does not apply to the cubes smaller then a 2x2, but i think it does'nt really matter...


----------



## vcuber13 (Nov 8, 2011)

but thats the whole challenge


----------

