Consider an integer of the form $$N = 1 + \sum\_{i=1}^r d\_i^2$$ where $d\_i \in \mathbb{N}\_{\ge 3}$ and $d\_i^2$ divides $N$.


**Question**: Must $r$ be greater than or equal to $9$?


*Checking* (with SageMath): It is true for $N \le 500000$.


*Remark*: If it is true in general then it is *optimal* because $$144 = 1 + 3^2 + 3^2 + 3^2+ 4^2 + 4^2 + 4^2 + 4^2 + 4^2 + 6^2$$




---


**Motivation** (from tensor category theory): If above question has a positive answer then by [1, Proposition 8.14.6] and [2, Theorem 3.4] a simple integral modular fusion category (over $\mathbb{C}$) would be of rank $ \ge 10 $. And for so, if required, we can also assume $d\_i$ not a prime-power by [3, Corollary 6.16]. Then the (SageMath) checking is $N \le 10^6$; and above optimality would be unchanged because $$ 116964 = 1 + 6^2 + 18^2 + 38^2 + 38^2 + 114^2 + 114^2 + 171^2 + 171^2 + 171^2$$  

We did not add this additional assumption at the beginning because it seems to be true without it (experimentally), and without it the question is (number theoretically) more interesting.


With this additional assumption, the next example with $r=9$ is $$ 396900 = 1 + 18^2 + 30^2 + 70^2 + 70^2 + 210^2 + 210^2 + 315^2 + 315^2 + 315^2 $$


Above two examples with $r=9$ can be excluded from coming from a fusion ring because:


* First one: consider the simple object of FPdim $6$, multiply it with its dual (which must be itself here) and apply FPdim (ring homomorphism). Then you get $6^2=1+\cdots$, but there is no FPdim $\le 35$ (of a non-trivial simple object) which is not a multiple of $6$.
* Second one: as above, $18^2 - 1 = 323$ is odd and the only odd FPdim for a non-trivial simple object is $315$ , but $323-315 = 8$ and there is no non-trivial simple object of FPdim $\le 8$.


*Conclusion*: if above two examples are the only ones for $r=9$ (I checked that there is no other one for $N \le 10^6$), and if above question has a positive answer (we can put the additional assumption if required), then a simple integral modular fusion category (over $\mathbb{C}$) would be of rank $ \ge 11 $.


*References*  

[1]: P. Etingof, S. Gelaki, D. Nikshych, V. Ostrik; Tensor categories. Mathematical Surveys and Monographs (2015) 205.  

[2]: J. Dong, S. Natale, L. Vendramin; Frobenius property for fusion categories of small integral dimension. J. Algebra Appl. 14 (2015), no. 2, 1550011.  

[3]: D. Nikshych, Morita equivalence methods in classification of fusion categories, Hopf algebras and tensor categories, 289-325,
Contemp. Math., 585, Amer. Math. Soc. (2013).



Sum of squares and divisibility
I hope so. But please double check (or, better, simplify) the argument below.


Denote $N=qs^2$ for $q$ squarefree. Then each $d\_i$ divides $s$, say $d\_i=s/m\_i$ and we get $$q=1/s^2+\sum\_{i=1}^r 1/m\_i^2, \quad\quad\quad (\heartsuit)$$
and the sum of $r+1$ square reciprocals is integer. Since $d\_i\geqslant 3$, we get $m\_i\leqslant s/3$. Subtracting the summands with $m\_i=1$ we get $(\heartsuit)$ with smaller $r$ and the same condition $m\_i\leqslant s/3$ (possibly $q$ is no longer squarefree, but we do not care anymore.) So, now each $m\_i$ is at least 2. So, we assume that $(\heartsuit)$ holds with $r\leqslant 8$, some integer $q$ and $s/3\geqslant m\_i\geqslant 2$.


If $r=8$ and all $m\_i$ are equal to 2, then $1/s^2$ must be an integer which is absurd. Otherwise $\sum 1/m\_i^2\leqslant 7\cdot 1/4+1/9$ and $1/s^2+\sum 1/m\_i^2\leqslant 1/36+7/4+1/9<2$, thus $q=1$.


Further we denote $s=m\_{r+1}$, and $(\heartsuit)$ reads as $$1=\sum\_{i=1}^{r+1} 1/m\_i^2. \quad\quad\quad(\clubsuit)$$
And we have a


**Special Condition.** $m\_{r+1}\geqslant 3\max(m\_1,\ldots,m\_r)$ and $m\_i$ divides $m\_{r+1}$ for all $i$.


What we do below is finding all solutions of $(\clubsuit)$ with $r\leqslant 8$. They all fail Special Condition. Let me start with listing them:


(a) $r=3$, $(2,2,2,2)$;


(b) $r=8$, $(2,2,2,3,6,6,6,6,6)$;


(c) $r=8$, $(2,2,3,3,4,4,4,4,6)$;


(d) $r=8$, $(2,2,2,4,4,4,6,6,12)$;


(e) $r=6$, $(2,2,2,4,4,4,4)$;


(f) $r=8$, $(2,2,2,3,3,12,12,12,12)$;


(g) $r=7$, $(2,2,2,3,4,4,12,12)$;


(h) $r=8$, $(2,2,2,3,9,4,4,36,36)$;


(i) $r=8$, $(2,2,2,3,4,4,12,15,20)$;


(j) $r=7$, $(2,2,3,3,3,3,6,6)$;


(k) $r=5$, $(2,2,2,3,3,6)$;


(l) $r=7$, $(2,2,2,3,3,7,14,21)$;


(m) $r=7$, $(2,2,2,3,3,9,9,18)$;


(n) $r=8$, $(3,3,3,3,3,3,3,3,3)$


(o) $r=0$, $(1)$.


Now goes a rather lengthy and boring proof that there are no other solutions of $(\clubsuit)$.


Denote by $2^\beta$ the maximal power of 2 which divides one of the numbers $m\_i$, $i=1,\ldots,r+1$. We have $\beta\geqslant 1$: otherwise all $1/m\_i^2$ are at most $1/9$, and not all equal to $1/9$, and RHS of $(\clubsuit)$ is less than 1. If we have exactly $h$ indices $i$ for which $2^\beta$ divides $m\_i$, then multiplying $(\clubsuit)$ by $2^{2\beta}$ and considering the expression modulo 4 we get $4|h$. Thus $h=8$ or $h=4$ or $h=0$.


Consider several cases.


0. $h=0$, all $m\_i$'s are odd. Then either $r=0$ and we get solution (0), or they all are not less than 3, and $\sum 1/m\_i^2\leqslant 9\cdot 1/9=1$, with equality corresponding to solution (n).
1. $h=8$ and $\beta \geqslant 2$. Then RHS of $(\clubsuit)$ does not exceed $8\cdot \frac1{16}+1\cdot \frac14<1$.
2. $h=8$ and $\beta=1$. Then eight even $m\_i$'s may be denoted by $2s\_i$, $s\_i$ are odd, $i=1,\ldots,8$, and $(\clubsuit)$ reads as
$$
\frac14\sum\_{i=1}^8\frac1{s\_i^2}+\frac{\varepsilon}{\ell^2}=1,\quad\quad\quad(\smile)
$$
where $\varepsilon=0$ if $r=7$ and $\varepsilon=1$ if $r=8$ (and $\ell$ is odd). At most three $s\_i$'s may be equal to 1, others are at least 3, also $\ell\geqslant 3$, thus LHS of $(\smile)$ is at most
$\frac14(3\cdot1+5\cdot \frac19)+\frac19=1$, the equality case is unique, it is the solution (b).
3. $h=4$ and $\beta\geqslant 3$. Analogously, $(\clubsuit)$ reads as
$$
\frac1{4^\beta}\sum\_{i=1}^4 \frac1{s\_i^2}+\sum\_{i=1}^{r-3}\frac1{\ell\_i^2}=1,\quad\quad\quad(\ast)
$$
where $s\_i$ are odd. At most 3 $\ell\_i$'s are equal to 2. Assume that at least one of $\ell\_i$'s is at least 4. Then LHS of $(\ast)$ is at most
$\frac1{64}\cdot 4+3\cdot\frac14+1\cdot\frac19+1\cdot\frac1{16}<1$, a contradiction. So, all $\ell\_i$'s are equal to 2 or 3, and we get contradiction modulo 8 after multiplying by $4^\beta$.
4. $h=4$, $\beta=2$. Now we get
$$
\frac1{16}\sum\_{i=1}^4 \frac1{s\_i^2}+\sum\_{i=1}^{r-3}\frac1{\ell\_i^2}=1,\quad\quad\quad(\diamond)
$$


where $s\_i$ are odd and $\ell\_i$ not divisible by 4. Assume that at most one $\ell\_i$'s is equal to 2, then LHS of $(\diamond)$ does not exceed
$\frac1{16}\cdot 4+1\cdot \frac14+4\cdot \frac19<1$, a contradiction. Thus we get $r\geqslant 5$ and we may suppose $\ell\_{r-3}=\ell\_{r-4}=2$, and $(\diamond)$ reads as
$$
\frac1{16}\sum\_{i=1}^4 \frac1{s\_i^2}+\sum\_{i=1}^{r-5}\frac1{\ell\_i^2}=\frac12.\quad\quad\quad(\diamond\diamond)
$$
If all $\ell\_i$'s ($i=1,\ldots,r-5$) are odd, we get a contradiction modulo 8 after multiplying by $16$. If none of $\ell\_i$'s ($i=1,\ldots,r-5$) equals to 2, then one of them is at least 6, and LHS of $(\diamond\diamond)$ does not exceed $\frac1{16}\cdot 4+2\cdot \frac19+\frac1{36}=1/2$. There exists unique equality case, it corresponds to solution (c). Thus, we may suppose that $r\geqslant 6$ and $\ell\_{r-5}=2$, and $(\diamond\diamond)$ reads as
$$
\frac1{16}\sum\_{i=1}^4 \frac1{s\_i^2}+\sum\_{i=1}^{r-6}\frac1{\ell\_i^2}=\frac14.\quad\quad\quad(\diamond\diamond\diamond)
$$
If exactly one of $\ell\_i$'s ($i=1,\ldots,r-6$) is even (recall that it is not however divisible by 4), we get a contradiction modulo 8 after multiplying by 16. If two of $\ell\_i$'s ($i=1,\ldots,r-6$) are even, then they are at least 6, and LHS of $(\diamond\diamond\diamond)$ is at most
$\frac1{16}(3+\frac19)+2\cdot \frac1{36}=\frac14$. Again, the equality case is unique, it provides a solution (d). Thus, all $\ell\_i$'s ($i=1,\ldots,r-6$) are odd. If $r=6$, we immediately get $s\_1=\ldots=s\_4=1$, this gives solution (e). So, $r\geqslant 7$, at most 3 of $s\_i$'s are equal to 1 and $$\sum\_{i=1}^{r-6}\frac1{\ell\_i^2}\geqslant \frac14-\frac1{16}\left(3+\frac19\right)=\frac1{18}.$$
Thus there is 3 or 5 between $\ell\_i$'s, $1\leqslant i\leqslant r-6$.


Well, proceed with cases. Assume that $\ell\_{r-6}=5$, but $\ell\_{r-7}\ne 3$ (or $r=7$ and $\ell\_1=5$). Then $\sum \frac1{s\_i^2}=4-16\sum\_{i=1}^{r-6}\frac1{\ell\_i^2}\geqslant 4-\frac{32}{25}$. Therefore at least three $s\_i$'s are equal to 1, say $s\_2=s\_3=s\_4=1$, and $(\diamond\diamond\diamond)$ reads as $\frac1{16s\_1^2}+\frac{\varepsilon}{\ell\_{r-7}^2}=\frac1{16}-\frac1{25}=\frac9{16\cdot 25}$ (here $\varepsilon=0$ if $r=7$ and $\varepsilon=1$ if $r=8$). We see that $r=8$, and we get an equation $\frac1{\ell\_1^2}=\frac{9}{16\cdot 25}-\frac1{16s\_1^2}=\frac{(3s\_1-5)(3s\_1+5)}{16\cdot 25\cdot s\_1^2}$. If 5 does not divide $s\_1$, then $3s\_1\pm 5$ is coprime to $25s\_1^2$, and the numerator of $\frac{(3s\_1-5)(3s\_1+5)}{16\cdot 25\cdot s\_1^2}$ may be equal to 1 only if both $3s\_1-5$ and $3s\_1+5$ are powers of 2, which is impossible (powers of 2 never differ by 10). So, $s\_1$ is divisible by 5 and $\frac9{16\cdot 25}\geqslant \frac1{\ell\_1^2}\geqslant \frac8{16\cdot 25}$, that is, $\ell\_1=7$, but this does not provide a solution.


Assume then that $\ell\_{r-6}=3$. Analogously, we get $\sum \frac1{s\_i^2}+\frac{16\varepsilon}{\ell\_{r-7}^2}=16(\frac14-\frac19)=\frac{20}{9}$. If all $s\_i$'s are at least 3, then LHS is at most $4/9+16/9=20/9$, and equality holds in the unique case, corresponding to solution $(f)$.
So let us suppose that $s\_4=1$, we get $\sum\_{i=1}^3 \frac1{s\_i^2}+\frac{16\varepsilon}{\ell\_{r-7}^2}=\frac{11}9$. If all $s\_1,s\_2,s\_3$ are at least 3, we get $r=8$ and $\frac{11}9\geqslant \frac{16}{\ell\_1^2}\geqslant \frac{11}9-3\cdot \frac19=\frac{8}9$, that is impossible (recall that $\ell\_1$ is odd). So, without loss of generality $s\_3=1$ and $\frac1{s\_1^2}+\frac1{s\_2^2}+\frac{16\varepsilon}{\ell\_1^2}=\frac29$. Clearly $s\_1,s\_2\geqslant 3$. If $r=7$, i.e., $\varepsilon=0$, this yields a solution with $s\_1=s\_2=3$, that is (g). So assume that $r=8$. Since $\frac{16}{\ell\_1^2}<\frac2{9}$, we get $\ell\_1\geqslant 9$. Thus $\frac1{s\_1^2}+\frac1{s\_2^2}\geqslant \frac29-\frac{16}{81}=\frac2{81}$. It yields $\min(s\_1,s\_2)\leqslant 9$.


If now $s\_1,s\_2$ are at least 5, then $\frac{16}{\ell\_1^2}\geqslant \frac29-\frac2{25 }=\frac{32}{225}$, or $\frac{225}2\geqslant \ell\_1^2$, this yields $\ell\_1=9$. Thus $\frac1{s\_1^2}+\frac1{s\_2^2}=\frac2{81}$. If $s\_1=s\_2=9$, we get solution (h). Otherwise, say, $s\_2=7$,
this does not lead to a solution.


Finally, if $s\_2=3$, we get an equation $\frac1{s\_1^2}+\frac{16}{\ell\_1^2}=\frac19$, or
$\frac{16}{\ell\_1^2}=\frac19-\frac1{s\_1^2}=\frac{(s\_1-3)(s\_1+3)}{9s\_1^2}$. If 3 does not divide $s\_1$, then $s\_1\pm 3$ are coprime to $9s\_1^2$, so both $s\_1-3$ and $s\_1+3$ must be powers of 2. This happens only for $s\_1=5$, and we get solution
(i). If $s\_1=3k$, we get $\frac{(k-1)(k+1)}{9k^2}=\frac{16}{s\_1^2}$, thus $k^2-1=(k-1)(k+1)$ is a positive perfect square, which is impossible.


5. Uff, now let $h=4$ and $\beta=1$. We get
$$
\frac14\sum\_{i=1}^4\frac1{s\_i^2}+\sum\_{i=1}^{r-3}\frac1{\ell\_i^2}=1
$$
for odd $s\_i$ and $\ell\_i$. Multiplying by 4 and considering modulo 8 we see that $r-3$ must be even, thus $r$ is odd, so $r\leqslant 7$. Therefore $\sum\frac1{\ell\_i^2}\leqslant \frac49$ and $\sum\frac1{s\_i^2}\geqslant 4(1-\frac49)=\frac{20}9$. This implies that at least two of $s\_i$'s are equal to 1, say $s\_3=s\_4=1$. We get from above $\frac1{s\_1^2}+\frac1{s\_2^2}\geqslant \frac29$, so either $r=7$, $\ell\_1=\ldots=\ell\_4=3$, $s\_1=s\_2=3$,
that's solution (j), or, say, $s\_2=1$, and we get $\frac1{4s\_1^2}+\sum \frac1{\ell\_i^2}=\frac14$. There is a solution (a) with $s\_1=1$ and $r=3$. Otherwise $s\_1\geqslant 3$ and we get $\sum \frac1{\ell\_i^2}\in (\frac14-\frac1{36},\frac14)$. Thus, one of $\ell\_i$'s is equal to 3, say $\ell\_{r-3}=1$, and $\frac1{4s\_1^2}+\sum\_{i=1}^{r-4}\frac1{\ell\_i^2}=\frac5{36}$. Assume that all remaining in LHS $\ell\_i$'s are greater than 3, and that $s\_1$ is greater than 3. Then $\frac1{4s\_1^2}+\sum\_{i=1}^{r-4}\frac1{\ell\_i^2}\leqslant \frac1{100}+3\cdot \frac1{25}=\frac{13}{100}<\frac5{36}$.


Next case. $s\_1=3$. Then $\sum\_{i=1}^{r-4}\frac1{\ell\_i^2}=\frac19$. If $r=5$, we get solution (k). Otherwise $r\geqslant 6$, then remaining $\ell\_i$'s are at least 5, not all equal to 5, thus $\sum\_{i=1}^{r-4}\frac1{\ell\_i^2}\leqslant \frac1{25}+\frac1{25}+\frac1{49}<\frac19$.


Finally, let $s\_1>3$, but $\ell\_{r-4}=3$. Then $\frac1{4s\_1^2}+\sum\_{i=1}^{r-5}\frac1{\ell\_i^2}=\frac1{36}$. If all $\ell\_i$'s, $i\leqslant r-5$, are at least 11, then LHS is at most $1/100+2/121<1/36$. So, one of them equals to 7 or 9.
This leads to equations $\frac1{4s\_1^2}+\frac1{\ell\_1^2}=\frac{13}{36\cdot 49}$ and $\frac1{4s\_1^2}+\frac1{\ell\_1^2}=\frac{5}{4\cdot 81}$, respectively.


For $\frac1{4s\_1^2}+\frac1{\ell\_1^2}=\frac{13}{36\cdot 49}$ note that 7 must divide both $s\_1$ and $\ell\_1$ (otherwise we get a contradiction modulo 7 multiplying by 49, due to 13 being quadratic non-residue modulo 7). If, say, $s\_1=7z$, $\ell\_1=7w$, we get an equation $\frac1{4z^2}+\frac1{w^2}=\frac{13}{36}=\frac14+\frac19$. This is only possible for $z=1$, $w=3$ (for $w=1$ LHS is too large, otherwise too small). Surprisingly, this solution does not enjoy SC again.


For $\frac1{4s\_1^2}+\frac1{\ell\_1^2}=\frac{5}{4\cdot 81}$, we analogously get that $s\_1$, $\ell\_1$ must be divisible by 9 (since 5 is not a quadratic residue modulo 3). So, we get an equation $\frac1{4z^2}+\frac1{w^2}=\frac{5}4$ which has the unique solution $z=w=1$, which leads to solution (m).


