getting the number is very simple.
you agree when N = 0 then 5 * (N^3/8) = 0
N = 2, 2^3 = 8, therefore 8/8 = 1
N=4, 4^3 is divisable by 8
N=6, 6^3 is divisable by 8
N=8, 8^3 is divisable by 8.
and because 0,2,4,6, and 8 are divisable by 8, they will produce an interger.