Is memory unimportant in doing mathematics? The title says it all.
I often heard people say something like memory is unimportant in doing mathematics. However, when I tried to solve mathematical problems, I often used known theorems whose proofs I forgot.   
EDIT
Some of you may think that using theorems whose proofs one has forgotten does not seem to support importance of memory. My point is that it is not only useful, but often necessary to remember theorems(not their proofs) to solve mathematical problems. For example, you can't solve many problems of finite groups without using Sylow's theorem.
 A: I know this has the soft question tag, but I think the statement of the question is too ambiguous to be meaningful. In particular, what do you mean by memory and doing mathematics?
Does memory just refer to previous theorems and facts? What about remembering the types of strategies that are helpful for broaching mathematical questions (e.g., trying a small case, trying a special case, drawing a picture, generalizing)?
Does doing mathematics refer to solving a problem on a test? Figuring out your own problems and then solving them? Answering open questions that have been deemed important within the field of mathematics (i.e., by other mathematicians)?
To take an extreme case, I would argue that someone who totally forgets the standard algorithm for long division and re-figures it out each day is, in a very real sense, doing mathematics. This person has a god-awful memory, but is still engaging with mathematics (specifically, basic arithmetic) and deriving a powerful algorithm. That said, I would also argue that this person is unlikely to make a longstanding contribution to the field of mathematics, in that he is too busy "re-inventing the wheel" to expand the boundaries of what is known by mathematicians.
Just as new mathematics springs forth from well-posed problems, you should consider rephrasing your question here if you want a more serious answer. In its current state, it would be easy to open scholar.google.com and do a search for mathematics and memory. You could also look at papers by Alan Schoenfeld on problem solving, and, more specifically, what he refers to as "resources." However, I am disinclined to give a fuller response based on the literature without knowing precisely what you are asking.
A: I think all of us at some point will invoke theorems whose proofs we have forgotten. I would argue that memory is important for mathematics in the sense that it is important for practically every other field. 
Certainly having good memory will not hurt you and several mathematical giants were undoubted aided by their prodigous memories (notable examples that come to mind include Euler, Poincaré and Von Neumann). But as is always said for mathematics, it is more important to understand and particularly the connections between subjects. 
I don't think many people can hope to retain absolutely everything they learned, even for undergraduate mathematics. Instead what is important is the ability to rapidly recover what you have lost. If you learn a subject and subsequently forget about it, then you should be able to relearn the subject much faster on a second exposure. In fact, I would argue that it is these repeated re-exposures which ultimately contribute to your mastery of a subject.
What's more important than memory would be the ability to efficiently find relevant literature. If you forget a theorem, but through your understanding and experience subsequently find it in some book or journal then you may have lost a bit of time, but ultimately you have your result.
Should you be discouraged from going into mathematics if you have a poor memory? Well that depends. If you fail to remember your own name then I would indeed say that mathematics will be a struggle to you. So will life in general. But if your memory is average, or even slightly below-average, then I would say that you will do just fine. Mathematics is ultimately not as memory-intense as subjects such as history or medicine.
P.S. In this question here, there is an interesting comment by Bill Cook about this subject. Of course I didn't remember the comment word for word, but rather just remembering the content roughly was enough for me to recover it. The ability to find is as equally as important as the ability to retain.
A: When you say memory you probably mean conscious memory. It has its benefits, it is always easier to know that you know something rather than discovering that you know it, but it is not essential. It is possible to remember something, or rather to know it, without knowing that you know that. In the following I will make the distinction between "remembering" (consciously) and "knowing" (unconsciously).
For mathematics you probably need to know more than you need to remember. If you know the basic definitions and how to derive from them, you will invariably be able to prove things. If you remember how it may be easier to do that, and probably easier to explain to others.
Surely remembering things is helpful, very helpful. I had friends in my undergrad who remembered everything and had the wonderful ability to connect all mathematics together and they got amazing grades and knew everything. I staggered to comprehend most things, and had a hard time fully understanding things (now I know that this is only so because we only had so little set theory in undergrad studies).
In fact, if you allow me a bit of namedropping, Saharon Shelah has an incredible memory for his results. The man has written a thousand papers and he remembers the results from each paper in the most uncanny way. I once asked him about something and he immediately knew to direct me to this and that, and added that in another paper I can also find more.
On the other hand, to do mathematics one has to be able to prove things, and to come up with new ideas. It does not matter how do you come up with them, you just have to be able to justify it mathematically. To see the large picture, even if you don't understand it consciously (or don't remember it consciously), is important and useful.
I believe that this is as subjective as humanly possible, and there is no proper way of analyzing whether or not memory is important, but I don't think anyone can argue that it is not useful. Every person has its own process, and where some people would be upset for not remembering everything; others won't mind and would focus on actually working. I know this because I don't remember too much outside of set theory, and even in set theory I don't remember too much - just references to results, and sometimes not even the actual results (only something close enough).
What I think is important is to have a good "proximity" alarm set, so when you run into a result which looks familiar you could remember it exists somewhere before, even if you don't remember the exact results which triggered that familiarity.
A: It depends on what kind of math you are working with. 
As an example, one of the fathers of H-bomb, Soviet academician, Dr Sakharov had memory so bad that he always had to go for paper reference if he needed to recall values of basic physical constants. But he never forgot how to use them. 
Once you acquired the mental grip on how to perform basic arithmetical operations, it is really hard to loose the skill. It is up to you where to develop it further. It has nothing to do with the memory per se, it is about to develop new kinds of neural connections in your brain, and it only comes with effort. Nootropics can help if you struggle to develop new levels of abstract thinking. 
Some extreme (not extremely) promising techniques were recently demonstrated at London Futurists meetup by Mr Andrew Vladimiroff. 
Generally speaking there is nothing difficult in developing huge memory, techniques are known long before Giordano Bruno got burned, it is a matter of exercise. But memory will not help you to understand new mathematical concepts. You need to hack your wetware from inside.
References: 


*

*Hacking our wetware; 

*Giordano Bruno's Memory System
A: James Joseph Sylvester was one the greatest British mathematicians of the 19th century. He was known for his absentmindedness and poor memory; on one occasion he even denied the truth of one of his own theorems. 
(http://www.cut-the-knot.org/blue/Sylvester.shtml)
A: I think that memory is very important. Of course it is not the only thing needed to do math, but it almost impossible to go anywhere without it. I'm painfully aware of numerous times where not remembering well enough (or at all) things I have seen in the past, has hurt my research efforts. 
Years ago a friend was talking to me about a rising star in his area (a "his-second-ever-paper-appeared-in-the-annals" kind of guy), and what he was telling me was that this person could remember every proof he had ever read. 
A: Your question reminded me of the following article (I happen to be very interested in research on math and cognition):  Working Memory and Mathematics. It's a very long article, a review of the literature, citing a lot great references, and dated 2010.
You seem to be referring to "long term memory", though. So perhaps the article is not of any interest to you. Mathematical cognition (and thinking in general) involves many sorts of memory: working memory, long term memory, fluid memory, static memory, pattern recognition, etc., as well as the faculties of spatial ordering, temporal-sequential ordering, etc., each of which involves various parts of the human mind.
Here's a link to the abstract of a nice article that might be of interest Memory in Mathematical Understanding. The article discusses the correlation between learning, understanding, and memory. That is, memory can be a function of how well one learned and understood the material one is hoping to remember.

If it's of any consolation, I don't think that you are alone. (I can only speak for myself, here, in that I too wish I was able to recall many things, many times. That's where having access to good references and texts come to the rescue! It is better to know how to find what you need to know, than to simply rely on the hope that everything one has learned will surface when needed! Usually, one need only refresh one's memory, which takes only a fraction of the time spent having learned in in the first place.
On a light note:
I remember consoling myself a while back by visualizing "learning" as filling a suitcase(s), the contents of which is "what I know." The more you add to your luggage, (the more you learn and the more you know), the harder it is to locate any particular item amidst the cramped collection of what you've acquired!
A: I feel it is very unhealthy to say that memory is unimportant to doing mathematics and it is even more dangerous to equate memory with rote-learning. Memory has an important place in understanding of a subject. Understanding is on a basic level refactoring your knowledge and creating helpful associations. Finally, you have to remember those associations. You might internalize those associations and hence in the process, remember them without any external effort, but it is memory all the same. 
Hence, having a really strong memory is really helpful to doing good mathematics. I think of good memory as a complementary process, as a cache you use to acquire data at a rate while the brain is processing and internalizing the already accumulated data. 
What you are probably talking about here when you say memory is rote-learning. Which is basic memorizations of symbols, which is bad for any kind of field, not just mathematics. But then, in other fields, you can get away more with it than in mathematics. Also, in some fields, like history and law, rote memory might be thought of as important just because the associations are even more complex to remember and even more weakly related. Instead, in mathematics, associations are generally very very strong. 
A: You're more likely to remember something if you've understood it than if you've memorized it.
In that sense, memory does not play the role in mathematics that it is thought to play by students whose reason for taking a math course is to get it over with.
I would also add that you're more likely to remember something if you've taught it five times or more.
A: I have heard people saying the same thing so many times, they say you have to understand it... if you understand it you don't need to memorize anything. So far, if you don't know your multiplication table you won't be able to understand divisions. If you don't know Pythagoras' theorem, I doubt you will be able to calculate the hypotenuse of a square triangle except with a ruler. If someone ask you to solve a matrix... there are known methods to solve matrices you are not going to solve it by seeing the matrix. My mathematics teacher in high school, always said "There's nothing to understand, just learn everything".
Memory is important in everything we do, it's just that with the society of nowadays and the fact that you can access information with the tip of your finger on your smartphone... people think it is less important to memorize certain things. 
