If we know that a positive integer x can be represented as sum of squares of two numbers, what can we say about neighbours of x? Let $x, p, q, i$ all be positive integers.
If we know that, 
$x = p^2 + q^2$
Then is there a way to find out that, can $x+i$ be also represented as sum of squares of two positive numbers without checking for all combinations of two positive numbers?
 A: Unfortunately, the answer to your question is "no". Whether or not a number can be represented as the sum of two squares depends (in a mildly complicated way) on how the number factors as a product of primes. Knowing how $n$ factors isn't much help when you want to know how nearby numbers factor.
It is known (and not hard to prove) that numbers congruent to 3 modulo 4 can't be the sum of two squares. There are always some of those nearby.
A: A fundamental result on this matter is

Let $n$ be a natural number and let $n=k^2\cdot m$, where $m$ is
  square free, i.e. in the decomposition of $m$ to a product of primes,
  there is no prime in with power greater or equal to 2. $n$ is sum of
  two squares if and only if $m$ does not consist any prime factor of
  the form $4t+3$.

Moreover, this result gives us slightly better identification of such numbers,

A natural number $n$ is sum of two squares,if and only if in the
  decomposition of $n$ to prime factors, every factor of the form $4t+3$
  appears with even power.

