Let $n$ be a positive integer, we consider partitions of the following form :  

$$n = d^{2}\_{1} + d^{2}\_{2} + ... + d^{2}\_{r}$$ such that : 


* $d\_{i}\vert n$
* $1=d\_{1}<d\_{2} \le d\_{3} \le ... \le d\_{r}$
* $gcd(d\_{2},d\_{3},...,d\_{r}) = 1$


We call $r$ the **rank** of the partition.


**Examples** : 


* $60 = 1+3^{2}+3^{2}+4^{2}+5^{2}$
* $168 = 1+3^{2}+3^{2}+6^{2}+7^{2}+8^{2} $


**Remark** : Let $G$ be a [non-cyclic finite simple group](http://en.wikipedia.org/wiki/List_of_finite_simple_groups#Non-cyclic_simple_groups_of_small_order), and $(H\_{i})\_{i}$ its irreducible representations, then : $$ord(G) = \sum\_{i} dim(H\_{i})^{2}$$ is an example. The first example comes from the group $A\_{5}$, and the second, from the group $A\_{1}(7)$.  

Of course, there are examples not coming from a group : $60 = 1 + 3^{2} + 5^{2}+5^{2}$ 



> 
> **Problem** : Are there only finitely many such partitions for a fixed rank $r$ ? 
> 
> 
> 


**Motivation** : The study of finite quantum groups (see [here](https://mathoverflow.net/questions/141812/existence-of-a-kac-algebra-for-a-given-fusion-ring-in-a-particular-class)).


**Final remark**: Let $p\_{r}(n)$ be the number of such partitions for $n$, of rank $r$.  

If the problem has a positive answer, then $N\_{r} = max\{n : p\_{r}(n) \ne 0 \} < \infty$  

In this case, the generating function $P\_{r}(x) = \sum\_{n}p\_{r}(n)x^{n}$, is a polynomial of degree $N\_{r}$.  

Bonus problem : Find an evaluation of the number $N\_{r}$. 



A problem on a specific integer partition
**Update:** Sebastien and I just found out that the equation $X\_1^2+\dots+X\_r^2=mX\_1\dots X\_r$ which evolved in the comments below is a classical topic, named the *Hurwitz equation*. See [this encyclopedia entry](http://www.encyclopediaofmath.org/index.php/Hurwitz_equation). It was actually discussed on MO before, see [this post](https://mathoverflow.net/questions/84927/conjecture-on-markov-hurwitz-diophantine-equation). So most of the comments below are obsolete.


**Existence:** For $r=3$ there are infinitely many such partitions. Let $F\_i$ be the $i$th Fibonacci number. Then:
\begin{equation}
1+F\_{2i-1}^2+F\_{2i+1}^2=3F\_{2i-1}F\_{2i+1}.
\end{equation}
This follows from [Cassini's identity](http://en.wikipedia.org/wiki/Cassini_identity) $F\_{n-1}F\_{n+1}-F\_n^2=(-1)^n$ upon replacing $F\_n$ with $F\_{n+1}-F\_{n-1}$, and setting $n=2i$.


**Uniqueness:** We now show the following:



>  Let $1\le b\le a$ be integers such that $abm=a^2+b^2+1$ for an integer $m$. Then $m=3$ and either $a=b=1$, or $b=F\_{2i-1}$, $a=F\_{2i+1}$.


If $a=b$, then of course $a=b=1$ and $m=3$. Suppose now that $b<a$. Set $c=mb-a$. Then
\begin{align}
c^2+b^2+1 &=
b^2m^2-2abm+a^2+b^2+1\\
&= b^2m^2-2abm +mab\\
&= mb(bm-a)\\
&= mbc
\end{align}
So the transformation $(a,b)\mapsto (b,mb-a)=(b,c)$ sends $(a,b)$ to another solution $(b,c)$. Note that $c>0$ as $b>0$. From
\begin{equation}
ca = (mb-a)a = b^2+1 \le b(b+1) \le ba
\end{equation}
we obtain $c\lt b$, unless $b=1$ and $a=2$. So by descend we finally arrive at $(a,b)=(2,1)$, hence $m=3$.


We see that $m=3$, and that every solution of $a^2+b^2+1=3ab$ with $a>b$ has the form $(a\_k,a\_{k-1})$, where $(a\_k)$ is the sequence defined by $a\_1=1$, $a\_2=2$ and $a\_k=3a\_{k-1}-a\_{k-2}$. However, the sequence $F\_{2i+1}$ fulfills this recurence, and the assertion follows.


