TITLE: A mysterious connection between primes and squares
QUESTION [19 upvotes]: Motivated by two previous questions of mine (cf. Primes arising from permutations and Primes arising from permutations (II)), here I ask a curious question which connects primes with squares.
QUESTION: Is my following conjecture true?
Conjecture. Let $n$ be any positive integer, and let $S(n)$ denote the number of permutations $\tau$ of $\{1,\ldots,n\}$ with $k^4+\tau(k)^4$ prime for all $k=1,\ldots,n$. Then $S(n)$ is always a positive square.
Via a computer, I find that
$$(S(1),\ldots,S(11))=(1,1,1,4,4,4,4,64,16,144,144).$$
For example, $(1,3,2)$ is a permutation of $\{1,2,3\}$ with 
$$1^4+1^4=2,\ \ 2^4+3^4=97,\ \ \text{and}\ 3^4+2^4=97$$
all prime.

REPLY [25 votes]: The fact on squareness is easy.
If $n$ is odd, among the sums of the form $i^4+\tau_i^4$ there is an even one; it should equal to 2, hence $\tau_1=1$. All other odd numbers should map to even ones, and vice versa. Hence the number of permutations under the question is the square of the number of bijections from odds (from 3 to $n$) to evens satisfying the same constraint.
If $n$ is even, we cannot have $\tau_1=1$, otherwise there would be another even sum. Hence a similar reasoning applies.
It remains to show that there exists at least one such permutation..  (Notice that for the constraint on $i+\tau_i$ this would follow easily from the Bertrand postulate...)