Jack lives in a long street. The number on his house is somewhere between 13 and 1300. Fred wants to guess Jacks number, so he asks:
"Is the number higher than 500?" Jack answers, but he lies.
Then he asks: "Is your number a square?" Jack answers again, and he lies again.
The next question is: "Is your number a third power?" Jack answers, and this time he speaks the truth.
Then Fred asks: "If I would know at this point whether or not the second digit in your number is a 1, I would know your number, right?" Jack answers.
Then Fred takes a guess, but guesses wrong. On what number does Jack live?
Hint: Fred and Jack are friends, so Fred assumes Jack is telling the truth to him always.