Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

$S$ is a set of all points $(a, b)$ such that $0 ≤ a$, $b ≤ k$. How many squares are there such that all the $4$ vertices are from set $S$?

For diagonal squares, a square must contain odd points on its side. so that we can join the mid points of each side. suppose we take $5$ points on each side, $$5*5 will make = 1^{2}$$ $$3*3 will make = 3^{2}$$ etc

so when $n$ is odd, its summation of all odd squares till $k$. & for even similar approach.

Can you guide me further? Please help.

share|cite|improve this question
up vote 3 down vote accepted

I think it's this sequence. It says, "$a(n) =$ number of squares with corners on an $n\times n$ grid."

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.