During our seminar on Wednesday about weighted projective spaces we wondered how singular weighted projective spaces are precisely. First of all, they are always Cohen–Macaulay. So the next question could be: when are they Gorenstein? For this question there is a purely numerical criterion in terms of the weights:

Fact The weighted projective space $\mathbb{P}(q_0,\dotsc,q_n)$ is Gorenstein if and only if $q_i\,\mid\,\sum_{i=0}^nq_i$.

So I quickly wrote a silly Python script which iterates over all possible weights up to a certain limit, only considered the normalised ones (i.e. to consider them up to isomorphism) and see how many of these satisfy the condition. It turned out that there are 3 Gorenstein weighted $\mathbb{P}^2$'s, and 14 Gorenstein weighted $\mathbb{P}^3$'s.

Actually, looking for weights $(q_0,\dotsc,q_n)$ for which $q_0\leq q_1\leq\ldots\leq q_n$ satisfies the condition can be rewritten as a diophantine equation: if $(q_0,\dotsc,q_n)$ is a set of weights such that the associated weighted projective space is Gorenstein, then we will denote $$x_j=q_j^{-1}\sum_{i=0}^nq_i.$$

Then as explained at the end of section 2 of Samuel Bossière, Étienne Mann and Fabio Perroni, On the cohomological crepant resolution conjecture for weighted projective spaces we have that $$\sum_{i=0}^n\frac{1}{x_i}=1,$$ and for such a solution we can also go back to a set of weights.

The solutions to this equation are known as Egyptian fractions, and there is an OEIS sequence telling us precisely how many there are.

Followup question When is $\mathbb{P}(q_0,\dotsc,q_n)$ actually a complete intersection? The easiest non-trivial weighted projective plane is $\mathbb{P}(1,1,2)$, which is isomorphic to the quadric cone $\mathbb{V}(xy-z^2)$ in $\mathbb{P}^3$. On the other hand, the only remaining Gorenstein case is $\mathbb{P}(1,2,3)$, which based on the computation on page 128 of Harris's Algebraic Geometry textbook does not seem to be a complete intersection. What happens in for weighted $\mathbb{P}^3$'s?

For something completely unrelated using Egyptian fractions, today 0xDE published Egyptian fractions with practical denominators.