Not only do we not know the date, we don't even know whether he wrote the remark at all.
For all we know it might have been invented by his son Samuel, who published his father's comments.
In his letters, Fermat never mentioned the general case at all, but quite often posed the problem of solving the cases $n=3$ and $n=4$. I am almost certain that Fermat discovered infinite descent around 1640, which means that in 1637 he did not have any chance of proving FLT for exponent 4 (let alone in general).
In 1637, Fermat also stated the polygonal number theorem and claimed to have a proof; this is just about as unlikely as in the case of FLT -- I guess Fermat wasn't really careful in these early days.
Let me also mention that Fermat posed FLT for $n=3$ always as a problem or as a question, and did not claim unambiguously to have a proof; my interpretation is that he did not have a proof for $n = 3$, and that he knew he did not have one.
Edit Let me briefly quote two letters from Fermat:
I. Oeuvres II, 202--205, letter to Roberval Aug. 1640 Fermat claims that if $p = 4n-1$ be prime, then $p$ does not divide a sum of two squares $x^2 + y^2$ with $\gcd(x,y) = 1$. Then he writes
I have to admit frankly that I have found nothing in number theory
that has pleased me as much as the demonstration of this proposition,
and I would be very pleased if you made the effort of finding it, if
only for learning whether I estimate my invention more highly than it
deserves.
This looks as if Fermat had just discovered "his method" of descent.
Starting from $x^2 + y^2 = pr$ one has to show that there is a prime
$q \equiv 3 \bmod 4$ dividing $r$ which is strictly less than $p$.
II. In his letter to Carcavi from Aug. 1659 (Oeuvres II, 431--436), Fermat writes:
I then considered certain questions which, although negative, do
not remain to receive a very great difficulty, for it will be easily
seen that the method of applying descent is completely different from
the preceding [questions]. Such cases include the following:
- There is no cube that can be divided into two cubes.
- There is only one square number which, augmented by $2$,
makes a cube, namely $25$.
- There are only two square numbers which, augmented by $4$,
make a cube, namely $4$ and $121$.
- All squared powers of $2$ augmented by $1$ are prime numbers.
My interpretation of this is that Fermat lists four results which he
believes can be proved using his method of descent. In my opinion
this implies that Fermat did not have a proof of FLT for exponent $3$
in 1659.
Edit 2
In light of the discission at wiki.fr let
me add a couple of additional remarks along with a promise that a nonelectronic
publication of my views on Fermat will appear within the next two years (if I can
find a publisher, that is).
A search in google books for "hanc marginis" and Fermat for the
years up to 1900 reveals several hits, none of which claims that
the remark was written around 1637; in particular there are no dates
given in Fermat's Oeuvres or in Heath's Diophantus. Starting with
Dickson's history, this changes dramatically, and nowadays the date
1637 seems to be firmly attached to this entry.
The dating of the entry seems to come from a letter written by
Fermat to J. de Sainte-Croix via Mersenne mentioned in Nurdin's
answer; this letter is not dated, but since Descartes, in a letter
to Mersenne from 1638, refers to a result he credits to Sainte-Croix,
but which Fermat claims he has discovered, it is believed that Fermat's
letter to Mersenne was written well before that date. The reasons for
dating it to September 1636 are not explained in Fermat's Oeuvres.
In this letter, Fermat poses the problem of finding two fourth
powers whose sum is a fourth power, and of finding two cubes whose
sum is a cube. The reasoning seems to be that in 1636, Fermat
had not yet found (or believed to have found) a proof of the general
theorem, so the entry must have been written at a later date.
Since he did not refer to the general theorem in any of his
existant letters, it is also believed that he soon found his
mistake, so the entry cannot have been written at a time when
Fermat was mature enough to find sufficiently difficult proofs.
Let me also add that the following dates can be deduced from
Fermat's letters:
- 1638 Numbers 4n-1 are not sums of two rational squares
- 1640 Fermat's Little Theorem
- 1640 Discovery of infinite descent; used for showing that
(1) primes 4n-1 do not divide sums of to squares.
- 1640 Statement of the Two-Squares Theorem
- 1641 - 1645 Proof of (2) FLT for exponent 4
- later: Proof of (3) the Two-Squares Theorem
It is impossible to attach any dates between 1644 and 1654 to
Fermat's discoveries since he either wrote hardly any letter
in this period, or all of them are lost.
Fermat claimed to have discovered infinite descent in connection
with results such as (1), and that he at first could apply it
only to negative statements such as (2), whereas it took him a
long time until he could use his method for proving positive
statements such as (3). Thus the proofs of (1) - (2) - (3) were
found in this order.
This means in particular that if Fermat's entry in his Diophantus
was written around 1637, then the marvellous proof must have been
a proof that does not use infinite descent.
I would also like to remark that the Fermat equation for exponents
3 and 4 had already been studied by Arab mathematicians, such as
Al-Khujandi and Al-Khazin, who both attempted proving that there
are no solutions. The cubic equation also shows up in problems
posed by Frenicle and van Schooten in response to Fermat's
challenge to the English mathematicians.
No one with any familiarity with his work can doubt that Siegel was one of the greatest mathematicians of the 20th century. Weil was a decisive, opinionated man -- just the type of person who would have an answer to this question ready at hand. And "Carl Ludwig Siegel" is a totally unsurprising answer from anyone. (Also "Andre Weil" would be a totally unsurprising answer from anyone: it might be my answer!)
But it is especially unsurprising coming from Weil. The list of contemporary mathematicians of the Siegel-Weil caliber is short enough, and among mathematicians on that list -- e.g. Wiener, von Neumann, Kolmogorov, Godel --
the research interests of Siegel and Weil were especially close: for instance, there is a Siegel-Weil formula. Both brought their prodigious knowledge and technique to bear on number theory, but with distinct, and distinctive, styles. To be very brief and crude, Weil had a fundamentally algebraic approach, whereas Siegel had a fundamentally analytic approach. My own approach to mathematics is rather close to Weil's (although in magnitude, microscopic compared to his): I very much appreciate that finding the right bit of "structure" can make the solution of your problems self-evident. A lot -- by no means all -- of Weil's work is like that: the finished product is so tidy and efficacious that you too easily forget to ask how he thought of any of it in the first place. To someone with this "algebraic" style, Siegel's work looks like a sequence of miracles. So it is unsurprising to me that someone like Weil would select someone like Siegel to give his top regards.
I think you can also gain some insight into why Weil named Siegel by considering their ages: Siegel (born in 1896) was ten years older than Weil (born in 1906). Ten years is long enough for Siegel always to have been ahead of Weil in his career and stature, but short enough for them to be true contemporaries and competitors. Most other great mathematicians that spring to mind when I think of Weil are actually quite a bit younger, e.g. Serre (born 1926), Tate (born 1925), Shimura (born 1930); it makes sense that Weil is not going to name any of these as the greatest mathematician of the 20th century. Indeed all three are alive well into the 21st century.
[Added: I just remembered that Chevalley (born 1909) was a contemporary of Weil of a similar stature. But Chevalley was very close to Weil, both personally and in mathematical styles and tastes. It is psychologically natural to esteem (and fear) most that which is most different from ourselves, not that which is most similar. Anyway, for Weil to name Chevalley would have sounded arrogant, as if not being able to name himself he picked the person standing right next to him.]
By the way, I think that Shimura and Siegel are quite similar in style as well as stature. I read Shimura's autobiography, and I think he is right to be profoundly disappointed that Siegel did not take more of an interest in his work. Shimura's work is closer to being a continuation of Siegel's (including a continuation of the brilliance, creativity and orginality!) than any other mathematician I can think of, so it is natural that Shimura holds Siegel in high regard.
There is also something "organic" in the work of both Siegel and Shimura which naturally bristles a bit at the "Bourbakistic" influence of the French school: it seems clear enough, for instance, that the modern theory of "Shimura varieties" is both an addition and a subtraction from what Shimura himself intended. I know several of Shimura's students, and though they work in what the rest of the mathematical world thinks of as parts of algebraic number theory and arithmetic geometry, in the way they actually think about mathematics they take a more analytic approach...like Siegel. I have even fewer credentials to speak for Selberg than I do for any of these others, but I imagine that he may have felt a similar kinship to Siegel, i.e., the use of an "analytic" approach to studying problems that others regard as being more algebraic.
Best Answer
'Around 1956, Escher explored the concept of representing infinity on a two-dimensional plane. Discussions with Canadian mathematician H.S.M. Coxeter inspired Escher's interest in hyperbolic tessellations, which are regular tilings of the hyperbolic plane. Escher's works Circle Limit I–IV demonstrate this concept. In 1995, Coxeter verified that Escher had achieved mathematical perfection in his etchings in a published paper. Coxeter wrote, "Escher got it absolutely right to the millimeter."'
http://en.wikipedia.org/wiki/M._C._Escher
If Angels and Devils is a hyperbolic tessellation then it might have been inspired by Coxeter.
The construction itself was done using techniques like these:
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.133.8746&rep=rep1&type=pdf