Let p and p+1 be the removed numbers from 1,2,...,n, then sum of remaining numbers,
=n(n+1)2−(2p+1)
From given condition,
1054=n(n+1)2−(2p+1)n−2
⇒2n2−103n−8p+206=0
Since n and p are integers so n must be even .
Let n=2r, we get
p=4r2+103(1−r)4
Since p is an integer, then (1−r) must be divisible by 4. Let r=1+4t, we get,
n=2+8t and p=16t2−95t+1.
Now, 1≤p<n
⇒1≤16t2−95t+1<8t+2
⇒t=6
⇒n=50andp=7
Hence, the removed numbers are 7 and 8.