I wouldn't call this by any means fast (its exptime) but its quite a bit more efficient than attempting to just brute force enumerate
Denote the the balls as "r", "b", "y", and "w" respectively
Denote pulling out the balls as assembling a sequence of "r", "b", "y" ,"w" such that there are 13 of each
We are looking for the number of scenarios where no 2 of the same color are found in a row
This can be computed as
$$1 - \frac{number \ where \ least \ 2 \ are \ found}{total} $$
So now the total is a trivial excercise to compute as it is $$ \frac{52!}{13!13!13!13!} $$
Based on the permutation formula
Now to find the number where at least 2 are present will require us to exploit an inclusion exclusion principle
We consider an empty of sequence of balls with locations $a_1, a_2 ... a_{52}$
Now for a start we can pick any two consecutive number $i,j$ and assign them the same color. From here we can ask what are all the possible permutations. In doing so however we will see some overcounting occur. Consider the following smaller case of 4 reds, 1 yellow, 1 blue
$$rrybrr$$
is a sequence which both the $rra_3a_4a_5a_6$ and $a_1a_2a_3a_4rr$ sequence count. Thus we need to remove it from the sum of combinations of these two sequences.
But now consider the more involved case of 4 reds, 2 yellows, 1 blue
$$rryybrr$$
Is counted by $rra_1a_2a_3a_4a_5a_6a_7$, $a_1a_2yya_5a_6a_7$, and $a_1a_2a_3a_4a_5rr$ which means that if we add up the counts of these three combos we have counted it 3 times, but then if we take a pair of sequences: find the intersection and then subtract we have subtracted it 3 times, in other words we forgot to count it.
This reveals to us a more general inclusion exclusion rule will be necessary and shows us an algorithm for efficiently computing your problem
Create all the different possible empty sequences that can be constructed by using only 2 of the same color placed consecutively and the remaining 50 spots blank.
Now from this generate the set of possible "intersections" of 2 sequences (ex: $rra_3$ and $a_1rr$ can be intersected to form $rrr$ but $bba_3$ and $rra_3$ cannot be intersected since that would require one of the positions to be simaltaneously red and blue.
Now generate the set of intersections of 3 original sequences, 4 original sequences, etc...
Now for each sequence you have made (including those generated from intersections) count the number of permutations of remaining elements possible
Then sum up all the first case sequence numbers, subtract the 2-intersection numbers, add 3 intersection numbers, subtract 4-intersection numbers etc... all the way down the line
The result will be the total number of sequences where at 2 of the same color are guaranteed to be next to each other, without any overcounting. Call this number N
$$1 - \frac{N (13!)^4}{52!}$$
Is the answer you are looking for
If we denote $u_i$ as a sequence generated, $u_i \cap u_j $ as the intersection of the two sequences (if possible) and null if not possible and lastly $P(u_i)$ equals the number of permutations possible for some argument inside which is a sequence or intersection of sequences (this returns 0 if the intersection inside is Null)
Then the total is
$$ \sum_{i = 1}^{total \ sequences \ of \ 2} \left( (-1)^{i+1}\sum \left[P\left(\cap_{i \ elements \in U} \right] \right) \right)$$
http://math.stackexchange.com/questions/430000/how-many-arrangements-of-a-generalized-deck-of-generalised-cards-have-pairs
– Nikos Δr Aug 06 '14 at 21:02