For how many integers 1≤n≤2015 does the following equation hold? ⌊√2015(n−1)⌋=⌊√2015n⌋

I have been struggling with this simple-looking problem for a while. What I have done so far:

If n≤504, we can make use of √2015(n−1)<√2015n−1 to write

⌊√2015(n−1)⌋≤√2015(n−1)<√2015n−1<⌊√2015n⌋,

and hence the equation does not hold. For n>504, I get stuck. I wrote a MATLAB code to find such n that satisfies the equation. The first few values of n are 544,565,581,595,… but I can't find a pattern. Can you please give me a hint?PS. The problem comes from a 27th Chilean 2015-16 mathematical olympiad.

**Answer**

Edit: Directly solving OP's question (using the same idea as below):

√2015n−√2015(n−1)≤1 is true for n≥504 and false for n≤503

So when n=1,2,…,503 we have √2015n takes only distinct values (as the difference between two consecutive values is greater than 1), for a total of 503 values.

For n=504,505,…,2015, we have √2015n does not skip any values (as the difference between two consecutive values is less than 1), so √2015n takes all the values between ⌊√2015⋅504⌋=1007 and ⌊√2015⋅2015⌋=2015, a total of 2015−1007+1=1009 values.

So when 1≤n≤2015, we have that √2015n takes 1512 distinct values; the non-distinct values duplicating the previous values, since they are increasing with n.

So the number of solutions of the equation is 2015−1512=503

The original problem in the link asks to determine the number of different values of ⌊n22015⌋, for 1≤n≤2015. I think that your equation is equivalent to the number of duplicates (I will verify when I get a chance)

The solution is to take the difference of two consecutive terms and compare it with 1:

n22015−(n−1)22015=2n−12015≤1⟺n≤1008

As long as n≤1008, no value will be skipped, so all values between 0 and ⌊100822015⌋=504 will be taken (505 values).

When n>1008 each term will generate a new value, So we have 2015−1008+1=1008 new values.

The total is 505+1008=1513 distinct values

The number of duplicates is 2016−1513=503. So for 502 values your equation holds.

**Attribution***Source : Link , Question Author : Amir Parvardi , Answer Author : Momo*