Calculating $ \sum_{k=1}^n \lfloor k * \sqrt 2\rfloor $

49 Views Asked by At

This is a programming question I've come across recently and it requires me to find this sum as quickly as possible since n can become very large (up to 10100 inclusive). So far I've tried to write the first few terms but I can't seem to find a formula for this sum.