Paul Erdos, a legendary mathematician who was so devoted to his subject that he lived as a mathematical pilgrim with no home and no job, died on Friday in Warsaw. He was 83.

The cause of death was a heart attack, according to an E-mail message sent out this weekend by Dr. Miki Simonovits, a mathematician at the Hungarian Academy of Sciences, who was a close friend.

Dr. Erdos (pronounced AIR-dosh) was attending a mathematics meeting in Warsaw when he died, Dr. Simonovits reported.

The news, only now reaching the world's mathematicians, has come as a blow. Dr. Ronald L. Graham, the director of the information sciences research center at AT&T Laboratories, said, "I'm getting E-mail messages from around the world, saying, `Tell me it isn't so.'"

Never, mathematicians say, has there been an individual like Paul Erdos. He was one of the century's greatest mathematicians, who posed and solved thorny problems in number theory and other other areas and founded the field of discrete mathematics, which is the foundation of computer science. He was also one of the most prolific mathematicians in history, with more then 1,500 papers to his name. And, his friends say, he also was one of the most unusual.

Dr. Erdos, "is on the short list for our century," said Dr. Joel H. Spencer, a mathematician at New York University's Courant Institute of Mathematical Sciences.

Dr. Graham said, "He's among the top 10."

Dr. Ernst Straus, who worked with both Albert Einstein and Dr. Erdos, wrote a tribute to Dr. Erdos shortly before his own death in 1983. He said of Dr. Erdos: "In our century, in which mathematics is so strongly dominated by `theory doctors,' he has remained the prince of problem posers." Dr. Erdos, he continued, is "the Euler of our time," referring to the great 18th-century mathematician, Leonhard Euler, whose name is spoken with awe in mathematical circles.

Stooped an slight, often wearing socks and sandals, Dr. Erdos stripped himself of all quotidian burdens of daily life: finding a place to live, driving a car, paying income taxes, buying groceries, writing checks. "Property is nuisance," he said.

Concentrating fully on mathematics, Dr. Erdos traveled from meeting to meeting, carrying a half-empty suitcase and staying with mathematicians wherever he went. His colleagues took care of him, lending him money, feeding him, buying him clothes and even doing his taxes. In return, he showered them with ideas and challenges -- with problems to be solved and brilliant ways of attacking them.

Dr. Laszlo Babai of the University of Chicago, in a tribute written to celebrate Dr. Erdos's 80th birthday, said that Dr. Erdos's friends "care for him fondly, repaying in small ways for the light he brings into their homes and offices."

Mathematicians like to brag about their connections to Dr. Erdos by citing their "Erdos number." A person's Erdos number was 1 if he or she had published a paper with Dr. Erdos. It was 2 if he or she had published with someone who had published with Erdos, and so on. At last count Erdos had 458 collaborators, Dr. Graham said. An additional 4,500 mathematicians had an Erdos number of 2, Dr. Graham added. He said so many mathematicians were still at work on problems they had begun with Dr. Erdos that another 50 or 100 papers with Dr. Erdos's name on them were expected to be published after his death.

Dr. Graham, whose Erdos's number is 1, handled Dr. Erdos's money for him, setting aside an "Erdos room" in his house for the chore. He said Dr. Erdos had given away most of the money he earned from lecturing at mathematics conferences, donating it to students or as prizes for solving problems he had posed. Dr. Erdos left behind only $25,000 when he died, Dr. Graham said, and he plans to confer with other mathematicians about how to give it away to help mathematics.

Dr. Graham said Dr. Erdos's "driving force was his desire to understand and to know." He added, "You could think of it as Erdos's magnificent obsession. It determined everything in his life."

Dr. Spencer, of New York University, who has an Erdos number of 1, said, "He was always searching for mathematical truths." He added: "Erdos had an ability to inspire. He would take people who already had talent, that already had some success, and just take them to an entirely new level. His world of mathematics became the world we all entered."

Born in Hungary in 1913, Dr. Erdos was a cosseted mathematical prodigy. At age 3, Dr. Graham said, Dr Erdos discovered negative numbers for himself when he subtracted 250 degrees from 100 degrees and came up with 150 degrees below zero. A few years later he amused himself by solving problems he had invented, like how long would it take for a train to travel to the sun.

Dr. Erdos had two older sisters who died of scarlet fever a few days before he was born, so his mother became very protective of him. His parents, who were mathematics teachers, took him out of public school after just a few years, Dr. Graham said, and taught him at home with help of a German governess. And, Dr. Graham said, Dr. Erdos's mother coddled him. "Erdos had never buttered his own toast until he was 21 years old," Dr. Graham said. He never married and left no immediate survivors.

When Dr. Erdos was 20, he made his mark as a mathematician, discovering an elegant proof for a famous theorem in number theory. The theorem, Chebyshev's theorem, says that for each number greater than one, there is always at least one prime number between it and its double. A prime number is one that has no divisors other than itself and 1.

Although his research spanned a variety of areas of mathematics, Dr. Erdos kept up his interest in number theory for the rest of his life, posing and solving problems that were often simple to state but notoriously difficult to solve and that, like Chebyshev's theorem, involved relations between numbers. "He liked to say if you can state a problem in mathematics that's unsolved and over 100 years old, it is probably in number theory," Dr. Graham said.

Dr. Erdos, like many mathematicians, believed that mathematical truths are discovered, not invented. And he had an evocative way of conveying that notion. He spoke of a Great Book in the sky, maintained by God, that contained the most elegant proofs of every mathematical problem. He used to joke about what he might find if he could just have a glimpse of that book.

He would also muse about the perfect death. It would occur just after a lecture, when he had just finished presenting a proof and a cantankerous member of the audience would have raised a hand to ask, "What about the general case?" In response, Dr. Erdos used to say, he would reply, "I think I'll leave that to the next generation," and fall over dead.

Dr. Erdos did not quite achieve his vision of the perfect death, Dr. Graham said, but he came close.

"He died with his boots on, in hand-to-hand combat with one more problem," Dr. Graham said. "It was the way he wanted to go."

Paul Erdos was regarded by fellow mathematicians as the most brilliant, if eccentric, mind in his field. Because he had no interest in anything but numbers, his name was not well known outside the mathematical fraternity. He wrote no best-selling books, and showed a stoic disregard for worldly success and personal comfort, living out of a suitcase for much of his adult life. The money he made from prizes he gave away to fellow mathematicians whom he considered to be needier than himself. "Property is a nuisance," was his succinct evaluation.

Mathematics was his life and his only interest from earliest childhood onwards. He became the most prolific mathematician of his generation, writing or co-authoring 1,000 papers and still publishing one a week in his seventies. His research spanned many areas, but it was in number theory that he was considered a genius. He set problems that were often easy to state, but extremely tricky to solve and which involved the relationships between numbers. He liked to say that if one could think of a problem in mathematics that was unsolved and more than 100 years old, it was probably a problem in number theory.

In spite, or perhaps because of, his eccentricities, mathematicians revered him and found him inspiring to work with. He was regarded as the wit of the mathematical world, the one man capable of coming up with a short, clever solution to a problem on which others had laboured through pages of equations. He collaborated with so many mathematicians that the phenomenon of the "Erdos number" evolved. To have an Erdos number 1, a mathematician must have published a paper with Erdos. To have a number of 2, he or she must have published with someone who had published with Erdos, and so on. Four and a half thousand mathematicians have an Erdos number of 2.

Erdos was born into a Hungarian-Jewish family in Budapest, the only surviving child of two mathematics teachers (his two sisters, who died of scarlet fever, were considered even brighter than he was). At the age of three he was amusing guests by multiplying three-digit numbers in his head, and he discovered negative numbers for himself the same year. When his father was captured in a Russian offensive against the Austro-Hungarian armies and sent to Siberia for six years, his mother removed him from school, which she was convinced was full of germs, and decided to teach him herself. Erdos received his doctorate in mathematics from the University of Budapest, then in 1934 came to Manchester on a post-doctoral fellowship.

By the time he finished there in the late 1930s it was obvious that it would be an act of suicide for a Jew to return to Hungary. Instead Erdos left for the United States. Most members of his family who remained in Hungary were killed during the war.

Erdos had made his first significant contribution to number theory when he was 20, and discovered an elegant proof for the theorem which states that for each number greater than 1, there is always at least one prime number between it and its double. The Russian mathematician Chebyshev had proved this in the 19th century, but Erdos's proof was far neater. News of his success was passed around Hungarian mathematicians, accompanied by a rhyme: "Chebyshev said it, and I say it again/There is always a prime between n and 2n."

In 1949 he and Atle Selberg astounded the mathematics world with an elementary proof of the Prime Number Theorem, which had explained the pattern of distribution of prime numbers since 1896. Selberg and Erdos agreed to publish their work in back-to-back papers in the same journal, explaining the work each had done and sharing the credit. But at the last minute Selberg (who, it was said, had overheard himself being slighted by colleagues) raced ahead with his proof and published first. The following year Selberg won the Fields Medal for his work. Erdos was not much concerned with the competitive aspect of mathematics and was philosophical about the episode.

From 1954 Erdos began to have problems with the American and Soviet authorities. He was invited to a conference in Amsterdam but on the way back into the United States was interrogated by immigration officials over his Soviet sympathies. Asked what he thought of Marx, he gave a typically guileless response: "I'm not competent to judge, but no doubt he was a great man." Denied his re-entry visa, Erdos left and spent much of the 1950s in Israel.

He was allowed back into the United States in the 1960s, and from 1964 his mother, now in her mid-eighties, began travelling with him. Apart from his family and old friends, Erdos had no interest in a relationship which was not founded in shared intellectual curiosity and he was content to remain a bachelor.

Nor did he see the need to restrict himself to one university. He needed no equipment for his work, no library or laboratory. Instead he criss-crossed America and Europe from one university and research centre to the next, inspired by making new contacts. When he arrived in a new town he would present himself on the doorstep of the local most prominent mathematician and announce: "My brain is open."

He would work furiously for a few days and then move on, once he had exhausted the ideas or patience of his host (he was quite capable of falling asleep at the dinner table if the conversation was not mathematics). He would end sessions with: "We'll continue tomorrow - if I live." After the death of his mother in 1971, Erdos threw himself into his work with even greater vigour, regularly putting in a 19-hour day. He fuelled his efforts almost entirely by coffee, caffeine tablets and Benzedrine. He looked more frail, gaunt and unkempt than ever, and often wore his pyjama top as a shirt. Somehow his body seemed to thrive on this punishing routine.

Because of his simple lifestyle, Erdos had little need of money. He won the Wolf Prize in 1983, the most lucrative award for mathematicians, but kept only $720 of the $50,000 he had received. Lecturing fees also went to worthy causes. The only time he required funds was when another mathematician solved a problem which Erdos had set but not been able to solve. From 1954 he had spurred his colleagues on by handing out rewards of up to $1,000 for these problems.

He died from a heart attack at a conference in Warsaw, while he was working on another equation.