This can not be sustained
No math is needed to tell you that anything at all that has any kind of waste, and only eats itself, will reduce to nothing. Consider your people like a swimming pool above the ground. After all, this is just about adding and removing calories.
Let’s assume your people are like us and they use the toilet, and they breathe, and they have body heat. Those are all calories. Calories leave one human, so they leave all humans. Let’s call calories “water” for now so it fits the pool picture. All of humanity on your planet is “the pool,” and the amount of calories in all of humanity is the water in the pool.
OK, like I said. People make heat, they use toilets, and the breathe out. So that happens for billions of people. The number doesn’t matter, but it’s a leak in the pool. It’s calories leaving humanity somewhere. It can be a big leak, or a small leak, it doesn’t matter at all.
OK, so water is coming out of the pool now. Maybe fast, or maybe slowly.
Now let’s feed all your humanity. It doesn’t matter how much or little they eat, they all eat the same thing. They eat the water in the pool: they eat themselves. The calories come from humanity. So now, you are taking water from the pool, and putting it into the pool. You see? The number doesn’t matter. If you take 200 gallons from the pool and “eat it” so 200 gallons go into the pool, you didn’t add anything at all. Try 300 trillion gallons? That’s a lot of water. But that’s fine, because all those people will be eating it up again—all 300 trillion gallons of it. Did the pool get any bigger? Any smaller?
Well, it is getting smaller. You have a leak, and you are adding no water at all from outside. Water goes out, no water goes in, pool empty. Everyone dead. It ends the same with every number.
Is there any nutrition?
There is nutrition. What type depends on what you ate. Some diets will make you have more fat, some more protein, and some will have very little value. There is no difference what livestock you use, you get out what you put in. Human nutrition has the same variety as any other animal. A liver has more iron. Bones have calcium. Etc. There is nothing really unique about a human diet that can’t be done with another animal just as easily. And like any other animal, you can change the nutrition by changing what the animal eats and drinks (clean water is essential).
You will have no scientific justification for eating human flesh, it will need to be some mystical thing like vampires to be believable.