How many colors of a Rubik's Cube must be known to locate all? I wonder if I can apply some kind of formula given a few colors with the location on a Rubik's Cube to calculate the locations of all other colors on it. 
Best would be if this formula would be so general that one could apply it for any kind of Rubik's Cube like 2x2x2, 3x3x3 4x4x4,  etc. 
I'm not very good at math and I don't even know how to try to start analyzing this problem but I'm very curious how this could be done. 
 A: On a 4×4×4 or larger cube you can reach a configuration where the only visible difference from "solved" is that two of the stickers are out of place. (There will also be at least one center piece that has been replaced by another center of the same color, but that is not visible). See this animation for a sequence of moves exhibiting this. It permutes three center pieces in a 3-cycle, two of them on the same face so the visual net effect is one of two stickers trading places.

This is not possible on a 3×3×3 cube, because there are no identical center pieces to permute. The best you can do is three stickers out of place relative to solved, as @CooperCape points out in a comment. In the animation below the three cyclically permuted stickers are on the edge pieces of the top layer. The white faces of those cubes stay on the top surface, hence the appearance is that of three cyclically moved stickers. The cube in the animation has blue and green at opposite faces so the 3-cycle goes (green, blue, red).

For a 2×2x2 the best you can do is 4 stickers out of place.
So if your adversary decides which stickers you get to see, you might need to see all but $3, 2, 1, 1, 1, \ldots$ stickers before you know what the rest of the cube looks like.

If you decide which stickers to inspect, you can be a bit smarter than that. The pieces of the cube fall into different orbits that cannot be interchanged with each other -- for example, you cannot move an edge piece to a corner position -- so you could omit all the stickers on one of the pieces in each orbit and reconstruct its identity and orientation.
And you can be even more clever than that. I'm not sure offhand exactly how far down you can go (especially if you're allowed to let the stickers you inspect depend on what you've already seen), but here is one plan to start with, for a cube of side length $2k+1$ (where $k\ge1$):


*

*You need to inspect two middle centers to find the orientation of all the centers in space. But you can leave the other $4$ middle centers out.

*There is one orbit for the corners. We can ignore one sticker on each corner -- seeing two sides of a corner piece is enough to know for certain which one it is and how it is oriented. On the last corner we can omit all of the stickers: Which corner it is follows by elimination, and its orientation is determined by the other corners. All in all, you're leaving out $10$ corner stickers.

*There is one orbit for the middle edges; it works just as the edge orbit in a 3×3×3. You can leave out $3$ stickers, two of which on the same piece. When you have identified all of the other pieces, which of the last two is which follows by the common parity or corner+edge permutations, and their orientations can then be deduced by looking at only one sticker.

*The center pieces that are not in the middle fall in $k(k-1)$ orbits of $24$ pieces each. Each orbit can only be permuted with the same parity as the corners were, but there are enough indistinguishable pieces that each impossible permutation looks exactly like one of the possible ones anyway. So you can leave out only $1$ sticker in each orbit.

*The non-middle edge pieces have $k-1$ orbits, each of which can be permuted freely. But their orientation cannot vary, so we can at least omit $2$ stickers in each orbit.
All in all this strategy lets us omit at least
$$ 4 + 10 + 3 + k(k-1) + 2(k-1) = k^2+k+15 $$
of the $ 6(2k+1)^2 = 24(k^2+k)+6 $ stickers of the cube.

An even-sided cube of side length $2k$ is simpler, because there are no middle pieces. At first it can feel disorienting that we can't use the middle centers as a fixed frame to reference everything else to (it certainly did for me), but in fact this turns out not to be a problem for this task at all:


*

*For the corners we can omit $11$ stickers as before.

*The edge pieces fall into $k-1$ orbits, each of which can be permuted freely. As before we can omit the $2$ stickers on the last piece.

*The center pieces fall into $(k-1)^2$ orbits, each with four pieces of each color. As before, we can only omit $1$ sticker in each orbit.
All in all we can omit $11+2(k-1)+(k-1)^2 = k^2+10$ stickers for the $2k$-sided cube. And this holds even for $k=1$.
