Hey there,
just a quick info that apparently in blender 4 they separated the Math > Modulo node into 2 different options, which are truncated modulo and floored modulo. Supposing I read the documentation correctly I think we are supposed to use truncated modulo for exactly the same results as in the lecture.
There is a Stack Overflow Post about the difference of truncating and flooring in .net, but I suppose the science behind it can be applied to blender too.