The ‘#’ is not part of the variable ‘frame’ but simply indicates to Blender that what you have entered should be interpreted as a Driver. In the case of '#frame' the driver simply returns the value 'frame' - the current frame of animation.
To use the floor function you should prefix the entire expression with '#' - ie,
#floor(frame). In order to have the value step up by 1 on each 25th frame you could enter the expression
#floor(float(frame)/25). This converts the 'frame' into a floating point value (technically not required - but still good practice), divides by 25 and rounds down to an integer. ie, on frames 0-24 it will produce 0, on frames 25-49 it will produce 1, 50-74 -> 2, 75-99 -> 3, etc.