We have,
Let the two consecutive number =xandx+1
So,
x2+(x+1)2=313
⇒x2+x2+1+2x=313
⇒2x2+2x=313−1
⇒2x2+2x=312
⇒x2+x=156
⇒x2+x−156=0
⇒x2+(13−12)x−156=0
⇒x2+13x−12x−156=0
⇒x(x+13)−12(x+13)=0
⇒(x+13)(x−12)=0
If,
x+13=0,x=−13
x−12=0,x=12
Then,
x=12
x+1=13
Hence, this is the answer.