# A new PSE member with square reputation

A new Puzzling Stack Exchange member (reputation = 1) asked a good question.
So, His reputation is a square number below 500.

Then he answered a question, and got good responses.
Again, he got a square number upvotes, and a square number downvotes.
Again, his reputation now is a square number, but still not more than 500.

How many upvote and downvote he get after asking?
Then, How many upvote and downvote he get after answering?

• @NL628 : positive – Jamal Senjaya Jan 2 '18 at 7:32
• @NL628 : numbers of up and down (not the total points) – Jamal Senjaya Jan 2 '18 at 7:37
• @lifesavinglinen how does my answer need improvement? What details do you want? – NL628 Jan 7 '18 at 7:25
• @NL628; how u worked it out and why the answer unique?? – JonMark Perry Jan 7 '18 at 7:35
• @JonMarkPerry okay sure will do – NL628 Jan 7 '18 at 7:35

In the beginning, when he asks he gets

64 upvotes and 16 downvotes ending up with 289 rep = 17$^2$ rep

and then after he answers the question, he gets

16 upvotes and 4 downvotes ending up with 441 rep = 21$^2$ rep

so we are done!! :)

For the Bonus:

49 upvotes and 25 downvotes ending up with 441 rep = 21$^2$ rep

and then after asking he gets

9 upvotes and 1 downvote ending up with 484 rep = 22$^2$ rep

EDIT: HOW I FIGURED IT OUT

The riddle never said anything about having to use pencil and paper so I made an assumption and assumed that both numbers were less than 200. Then I wrote a short C++ program and tested all possibilities, ending up with both my answers. Total time taken: 4 min and 30 sec.

We first write the equation as

$5x^2 - 2y^2 = z^2-1$

We can solve this mathematically by using the fact that

all perfect squares are $0,1, 4\mod 8$.

This means we can rewrite the equation mod 8 as

$5 \cdot \text{(0,1, or 4)} - 2 \cdot \text{(0,1, or 4)} = \text{(0,3,7)}$

Checking all cases for the parentheses, we find that the only cases that work are

(0,0,0), (0,4,0) and (1,1,3)

The first and second solution mean

x is a multiple of 4, and y is a multiple of 2

and the third solution means

x and y are both odd.

Checking all perfect squares of these forms, we find the only possible solution is

Similarly for the second part, the equation is

$10x^2 - 2y^2 = z^2-289$

Taking mod 8 we get

$10 \cdot \text{(0,1, or 4)} - 2 \cdot \text{(0,1, or 4)} = \text{(0,3,7)}$

giving the solutions

(0,0,0) (0,4,0) (4,4,0) (4,0,0) and (1,1,0)

The first four solutions mean that

x and y are both even

and the fifth means that

x and y are both odd.

Once again, checking all possibilities, we end up with