One question to know if the number is 1, 2 or 3 I've recently heard a riddle, which looks quite simple, but I can't solve it.

A girl thinks of a number which is 1, 2, or 3, and a boy then gets to ask just one question about the number. The girl can only answer "Yes", "No", or "I don't know," and after the girl answers it, he knows what the number is. What is the question?

Note that the girl is professional in maths and knows EVERYTHING about these three numbers.

EDIT: The person who told me this just said the correct answer is:

 "I'm also thinking of a number. It's either 1 or 2. Is my number less than yours?"

 A: The boy gives the three numbers different names: "Yes", "No" and "I don't know". So the question is, "what is the name of your number?"
A: I am thinking of a positive integer. Is your number, raised to my number and then increased in $1$, a prime number?
$$1^n+1=2\rightarrow \text{Yes}$$
$$2^n+1=\text{possible fermat number}\rightarrow \text{I don't know}$$
$$3^n+1=2k\rightarrow \text{No}$$
A: Pick any bijective mapping from $\{1,2,3\}$ to $\{\text{Yes},\text{No},\text{I don't know}\}$ and then it is easy to contrive a question.
Here's an example question using this method.

Let $f =\{(1,\text{Yes}),(2,\text{No}),(3,\text{I don't know})\}$ and let $x$ be the number that you are thinking of. What is $f(x)$?

This can be generalized to any set of possible numbers and set of possible responses with the same cardinality.
A: $\frac12-it$ is a zero of the zeta function. Is $\frac{N-1}{2}\frac12+it$ also a zero of the zeta function?
$N = 1 \implies$ no, since $it$ is not on the critical strip.
$N = 2 \implies$ I don't know, since the Riemann hypothesis has not been proved. 
$N = 3 \implies$ yes, since the conjugate of a zero is another zero. 
A: Two silly, brute-force, examples, which (I hope) give two fairly extensible ways of constructing an answer to this problem.  $n$ refers throughout to the girl's number.
The unsolved problem in mathematics approach: (E.g., @alex's answer)

Is there a Moore graph of girth $5$ and degree $f(n)$?  Here, 
$$
f(n)=\begin{cases}2&n=1\\4&n=2\\57&n=3\end{cases}
$$

$2\mapsto$Yes (the Petersen graph)
$3\mapsto$No (A Moore graph of girth $5$ may only have degree $2,3,7$ or $57$)
$57\mapsto$I don't know (It is unknown whether a Moore graph of girth $5$ and degree $57$ exists).
The unconditional (on any unsolved result being unsolved!) probabilistic approach: (E.g., @Ben Millwood's answer)
Maybe the girl has constructed a Moore graph of girth $5$ and degree $57$ in her head, or read a recent paper exhibiting such a graph.  In that case, the following approach works.  

Let $G(n)$ be a random variable taking values in the set $\{1,2\}$.  The probability distribution is defined as follows: $G(1)$ is always $1$, $G(2)$ is always $2$ and $G(3)$ is $1$ with probability $0.5$ and $2$ with probability $0.5$.  
[Fix a point in the sample space.]  Is it the case that $G(n)=1$?  

A: Most of the answers seem to rely on relatively complex mathematics, that I couldn't easily do in my head. I'm hoping this is the simpliest answer out there, or at least, one of the simplest.
If I take your number, and subtract 2 from it, then take the reciprocal, is it positive? In other words: $\frac{1}{x-2}$


*

*Yes- Number must have been 3

*No- Number must have been 1.

*I don't know- Is 1/0 positive or negative? It could be either, and thus I Don't Know is the appropriate answer.

A: How about this one:

Let's say your number is $n$.
  For every even number $x$ ($x>2$) is that true that $x+n$ is representable as a sum of $n$ primes?

A: Let the boy ask the girl: 

"Divide the number you have with the previous number. Is the result a fraction?"

If the girl replies:


*

*"Yes" then the number is 3 because 3/2 is a fraction.

*"No"  then the number is 2 because 2/1 is not a fraction.

*"I don't know" then the number is 1 because 1/0 is undefined. 

A: The mathematician's answer: 
I am thinking of a function $f:\{1,2,3\}\to\{0,1\}$.  $f$ takes $1$ to $0$, $2$ to $1$ and $3$ either to $0$ or $1$, but I'm not telling you which.  
Let $n$ be your number.  Is $f(n)$ equal to $1$?
A: 
If k is your number,
  does each continuous mass distribution µ in $\mathbb{R}^{3k-2}$  admit
  an equipartition by hyperplanes ?

A: Here's one involving probabilistic trials.
If I were to choose a random variable $x$ distributed at $N(2, 0.01)$ but cut off at $[1.5, 2.5]$, would the number you're thinking of be higher than $x$?
If you're thinking of $1$, your answer is "no".
If you're thinking of $2$, your answer is "I don't know", since there's a 50-50 chance either way.
If you're thinking of $3$, your answer is "yes".
A: "Among all prime numbers except 3, is there a positive and finite number of couples whose difference is the number you are thinking of?"
$N = 1 \implies$ no, since there are none ( $\{2, 3\}$ is disallowed).
$N = 2 \implies$  I don't know, at least until the Twin Primes conjecture is proved or disproved.
$N = 3 \implies$ yes, since there is only $\{2, 5\}$.
A: Question 1:
I'm thinking of a huge integer number with last digit $7$.
Is this ratio $~~\dfrac{\mbox{my number}}{\mbox{your number}}~~$ integer?


*

*$1$ (yes)

*$2$ (no)

*$3$ (I don't know)



Question 2:
Consider series $\displaystyle\sum\limits_{n=1}^\infty a_n, \quad (a_n>0, ~~~ n \in \mathbb{N})$,
such that there exists limit (see Ratio test)
$$
L = \lim_{n\to \infty} \frac{a_{n+1}}{a_n}.
$$
If $L+1$ is equal to your number, is this series convergent?


*

*$1$ ($L=0$, yes)

*$2$ ($L=1$, I don't know)

*$3$ ($L=2$, no)

A: Assume the girl's number is X.
The boy asks:

Is half day before OP posted this question past October X?

A: "Using the number of characters in the first word of you possible answers (Yes, No, I don't know), which options length corresponds to your selected number?"
A: The question doesn't state that the BOY is an expert in maths, so he'd probably go for:
Please say "no" if your number is 1, "don't know" if your number is 2, or "yes" if your number is 3.
A: This was suggested by a friend:

If $k$ is your number, does $\mathbb{S}^{3k-2}$ have an exotic smooth structure?

A: For an unknown $x$, is your number 1 or (2 and $x$)?
YES means that the number is 1
NO means that the number is not 1 and not 2 -- so it's 3
I DON'T KNOW means that the number is 2 (since the (2 and $x$) clause will be true if $x=2$ and false otherwise)
A: Without any math involved:
Boy: I'll map your numbers to your answers. 1 means "NO", 2 means "YES", 3 means "I don't know", the first word that comes out of your mouth, will you please say the phrase that is mapped to the number you are thinking of?
Girl: ahhhhhhhhhh
Boy: No, you have to say it

First dimension: 
Girl: NO
BOY: Then it's 1

Alternate dimension:
Girl: YES
BOY: Then it's 2

Altnerate dimension after that:
GIRL: I DON'T KNOW
BOY: Then it's 4, I mean 3

A: "Let your number be $n$, consider an equation 
$$x^n=n^2$$
If I randomly choose one of the real root(s) of $x$, is that root equal to your number $n$?"
A: "I am thinking of a number which is either 0 or 1. Is the sum of our numbers greater than 2?"
A: Let $n$ be the number you are thinking. And let $x$ and $y$ be positive integers I am thinking. Is there a positive integer solution $z$ for the following equation? 
$$
x^n+y^n=z^n
$$


*

*Yes then $n=1$

*I don't know then $n=2$

*No then $n=3$ because of the following proven conjecture



It is impossible to separate a cube into two cubes, or a fourth power into two fourth powers, or in general, any power higher than the second, into two like powers. I have discovered a truly marvelous proof of this, which your browser is too narrow to contain.

A: If $x$ is your number, is my brother's height in metres more than $10(x-2)+2$?
A: ‘Is there a perfect number $n$ such that $n+1$ is a multiple of your number?’ If her number is $1$, the answer is obviously yes; if her number is $2$, the answer is I don’t know, since it’s not known whether there are any odd perfect numbers; and if her number is $3$, the answer is no, because every even perfect number greater than $6$ is congruent to $1$ mod $3$.
A: The girl take a number in {1, 2, 3}. I say to her: "Ok, now, imagine I know your number and pick one of the other, is your number greater than mine?"


*

*If she has picked 1, she will answer "no" because 1 < 2 and 1 < 3.

*If she has picked 2, she will answer "I don't know" because 2 > 1 but 2 < 3.

*If she has picked 3, she will answer "yes" because 3 > 1 and 3 > 2.

A: Is it correct that your number equals 1 or it equals 2 and {any question she don't know answer for}?
Yep, it's a boring answer, but it always works for such kind of problems.
A: "I'm also thinking of one of these numbers. Is your number, raised to my number, bigger than $2$?"
Let $n$ be the girl's number (unknown to me), and let $m$ be my number (unknown to her).


*

*$n = 1 \implies $ NO: $1^m = 1 \not > 2$ for all $m \in \{1,2,3\}$.

*$n = 3 \implies $ YES: $3^m \geq 3 > 2$ for all $m \in \{1,2,3\}$.

*$n = 2 \implies $ I DON'T KNOW: Whether $2^m > 2$ depends on $m$.

A: First of all I ruled out indirect ways of using reference to either of the numbers 1, 2 ,3 to frame a question, as I thought it's implicit in the question that it should challenge your thinking, not your cleverness.
If she answers I don't know, compared to yes or no, it is more likely that she is confused between two numbers, ruling out one possibility. If the boy thinks of a number, the most common way to link it up to 1, 2, or 3 will be by divisibility. Also, I thought out of 1, 2, and 3, if I can rule out one number by the way I frame the question, I will be left with two options. The most common way of describing a number is whether it's odd or even.
So how about asking: "I am thinking of an odd number. Is it perfectly divisible by your number?"
If she says no, clearly the number is 2. If she says yes the number is 1 because only with 1 can you be sure that any number is divisible by 1.
If she says I don't know the number is 3, because an odd number can or cannot be divisible by 3.
A: Here's my wife's solution:
The boy asks: "I have an equation of the form $ax^2+bx+c=0$ in my mind, in which $b^2-4ac \geq 0$. Is the number of its real roots less than your number?"


*

*If the girl's number is 3, then her answer is "yes". 

*If the girl's
number is 2, then her answer is "I don't know". 

*If the girls' number
is 1, then her answer is "no".

A: "If two less than your number is the second derivative of a function at a turning point, is that point a local minimum?"
A: I get the sense that there's a classic comedy routine in here somewhere.

"You know, they give baseball players these days very peculiar names. [...] Well, now, let's see ... On our team we have: NO's on first, YES's on second, and I-DON'T-KNOW's on third ..."  

A: Does the girl know computing addition to math? Probably. 
"Here is an array of three character strings, indexed from [1]:
s[] = { "Yes", "No", "I don't know" }

what is the value of s[x] where x is the number you are thinking of?"
Basically, the space of three possible answers can be used as symbols to encode the information directly. 
Justification, in the light of comments:
The other answers differ in that they employ an arithmetic and logical coding trick: arithmetic is applied and then logic to produce an answer, whose truth value or in determinacy is then rendered to English "Yes", "No" or "I don't know".
It is just as valid and "mathematical" to simply obtain these symbols directly without using arithmetic coding.
Furthermore, it can still be regarded as arithmetic coding, because the answer strings are made of bits, and can therefore be coded as numbers: for instance, the bit patterns of the ASCII characters can be catenated together and treated as large integers. s is then effectively just a numeric table lookup which maps the indices 1 through 3 to integer symbols which denote text when broken into 8 bit chunks and mapped to ASCII characters.
A lookup table, though arbitrarily chosen, is a mathematical object: a function. 
Furthermore, the displacement calculation to do the array indexing is arithmetic; we are exploiting the fact that the information we are retrieving is numeric and can be used to index into a table. Otherwise we would have to specify an associative set relation instead of a function from the integer domain. ("Here is a mapping of your possible state values to the symbols I'd like you to use to send me the value.")
This answer reveals that the question is basically uninteresting. An entity holds some information that can be in one of three states, and there is to be a three-symbol protocol for querying that information. It boils down to, give me the symbol which corresponds to your state, according to this state->symbol mapping function. I would therefore argue that the convoluted arithmetic coding is the hack answer not this straightforward coding method. In computing, we sometimes resort to arithmetic encoding hacks when we have to use a language that isn't powerful enough to do some task directly, or simply when the resources (time, space) aren't there for the cleaner solution. 
A: "Is $\Sigma$(TREE(number)) an odd number?" 
NB: $\Sigma(\mathrm{TREE}(1)) = \Sigma(1) = 1$, $\Sigma(\mathrm{TREE}(2)) = \Sigma(3) = 6$, but in the context of "ordinary mathematics", the value of $\Sigma(n)$ is unprovable for any $n > 10\uparrow\uparrow10$, e.g. for $n = \mathrm{TREE}(3)$.
A: Along the lines of "the open problem" method - 
Define $$ f(n) = \pi^{n-1}\mathrm{e}^{\pi(n-1)}.$$
Where $n$ is the number chosen by the girl. The question is, is $f(n)$ irrational? 
If $n=1$, $f(1) = 1$, so the answer is "No". 
If $n=2$, $f(2) = \pi\mathrm{e}^{\pi}$, the answer is "Yes".
If $n=3$, $f(3) = \pi^2\mathrm{e}^{2\pi}$, so the answer is "I don't know".
A: Let the boy ask the girl "Subtract 2 from the number your are thinking and then take the square root of the result.Is the result positive?".
If the girl replies "yes" then the number is 3 because square root of 3-2=1 which is positive.
If the girl replies "no" then the number is 2 because square root of 2-2=0 which is not positive.If the girl replies "I don't know " then the number is 1 because square root of 1-2= is imaginary number which cannot be said whether it is positive or negative.
                                   OR                                                                                          
Let the boy ask the girl"Divide the number you have with the previous number.Ask if the result is a fraction?"If the girl replies "yes" the number is 3 because 3/2 is a fraction.If the girl replies "no" then the number is 2 because 2/2 is not a fraction.If the girl replies "I don't know" then the number is 1 because 1/0 is undefined. 
A: If there is no generally agreed "$>$" operator for complex number field: "Is $e^{\left(i\frac{n-1}{2}\pi\right)}>0$?"
A: Divide the other two numbers left to get a proper fraction. Ask her to subtract 1 from numerator and 2 from denominator. Ask her if the 'number' obtained is greater than 0.
If yes. She should have had 1 and thought of number 1.
If she says she doesn't know. The number she thought of must be 3
If no. It should be 2
A: Let $k$ be your your number. Is there a $3k$-colouring of the elements of $\mathbb{R}^2$ such that points having a unit distance have different colours?
Yes$\,\to k=3.\quad$No$\,\to k=1.\quad$I don't know$\,\to k=2.$
Have a look at the chromatic number of the plane.
A: 
Call your number is $n$.  Is $n=1$, or, is your reasoning assuming $n=3$ consistent?

If $n=1$ then trivially "yes".
If $n=2$, then $2=3$ is inconsistent, so "no".
If $n=3$, then by Godel she can't know the consistency of her own reasoning so "I don't know".
(Assuming her reasoning is consistent anyway...)
