Number of Cubies problem

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

That's a neat trick!

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.)

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
 
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.
 
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.
 
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.
 
Last edited:
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.
 
Last edited:
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.
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.
 
Last edited:
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) \)
 
Last edited:
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 :p so I thought it would be nice trying to write this "hack" for this problem.

EDIT:.... lol same as rinfiyks -.-'
 
Last edited:
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!

function.gif

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) \).
 
Last edited:
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!


MSP13819hch0eg4i1c807300003i0hai8aic7d62h6
 
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
 
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
 
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))
 
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)
 
Last edited:
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 :p
 
Back
Top