The idea is beautiful. Compare people to numbers, compare the loneliness of people who don’t know how to belong to the otherness of prime numbers, and thus imply that there could be resolution to their alienation because it’s part of a logical pattern, and if they can’t belong to everyone, at least they can belong to each other.
However, other than the fact that Mattia, one of the main characters, is a genius mathematician, and one passage where he introduces the concept of twin prime numbers, there’s really no mention of this theme.
In addition, the characters are dull and silent at best, and selfish and unlikable at worst. There is no progression. The relationships and the characters all follow the same motions, repeated endlessly for the 20 years that are covered in the book.
If prime numbers interest you and that’s how the title caught your attention, read pages 111-113.