uhm, I am no math wizard either, but wouldn't you need to remove two blocks each level? If I understood the original question correct the first layer would be 127x127 blocks. Then if one would remove 1 block from each side you would get 126x126 blocks. If I would place 126x126 blocks on 127x127blocks in minecraft it wouldn't become a pyramid as one cannot put 1 block in the middle of 4 blocks.
Actually it would be 127*127 on the base level, then 125*125, then 123*123, then 121*121 and so on since he has to remove one piece from every side and there are 4 sides.
I'm
definitely no math wiz but it seems relatively easy to figure out the exact number of cubes he would need.
If the pyramid is
hollow he just has to create the perimeter. So if he starts out with a 127*127 base he'd need 4*127 = 508 cubes, then 4*125 = 500 cubes for the next level and so on.