When Dennis Moore got home from work and read the letter, he started laughing. Then he showed it to his wife. She didn't laugh.

The letter, from the Maryland Department of Social Services, said that Moore was the father of a 3-year-old boy and that he was "legally required" to support him. A woman named Caroline Sample was named as the mother.

"You don't know this person, do you?" asked Moore's wife, Linda.

Moore said no, he didn't.

Moore called a lawyer friend and asked him to clear up the mistake. A long weekend passed before the appropriate state official was reached and the matter dropped.

When questioned, the 22-year-old mother readily agreed that Moore, a Bethesda social scientist, was not the father.

In fact, he has almost nothing in common with the man who the mother says is the true father.

Caroline Sample, a secretarial student in Salisbury, Md., also found the situation humorous. "Oh, my goodness," she giggled. "That's not him."

The director of the Department of Social Services was upset. George Karras said yesterday that the letter to Moore was "an honest mistake," the only mix-up of its kind in the six years he has been the department director.

This "mistake" quickly soured Moore's humor. When Moore received the letter three weeks ago he was amused.He had never heard of the woman named as the mother, he is happily wed, with a newborn infant and a clear conscience.

He reassured himself about his single days. "I've always known the names of the women I've been with," he said. "Of course, I can think of 50 of my friends who couldn't say that."

But then his wife began asking him questions, wondering whether there was something or other he hadn't told her.

"I thought I knew all about him," she said. "But did I really?"

That prompted Moore to do some serious thinking. The letter said that the child was born on June 7, 1976. Moore figured that nine months before then, in September 1975, he was living in Boston where he had just finished his master's degree and was working in a hotel.

"And I was seeing someone very seriously," Moore said. "There wasn't anyone else but her."

Then, just for good measure, Moore "went over the names of all the women in my life. I don't care how innocent you are, you start thinking back."

Although Moore knew he had never met the woman, he became anxious. He was worried that he would have to pay child support payments, or at least hire a lawyer.

"That's a disgusting letter to get," he said. "It ruined five days of my life. If they're going to send a letter like that, they better be sure they've got the right person."

Moore then telephoned his lawyer friend who agreed to contact the Department of Social Services and clear his name. Five days later, after Moore had become a "nervous wreck," the lawyers told Moore that the department admitted making a mistake.

Karras, the department director, said yesterday that the man believed to be the real father once worked at a Washington-area store about the same time as Moore. When workers from the department wrote the store asking for records, the company gave out Moore's Social Security number by mistake. With that number, the department found Moore's Bethesda address.

Last Friday, Moore visited the department and demanded a letter of apology. He also asked that the department be more careful in its research and send "less threatening" letters when the evidence is shaky.

Karras said Moore will be getting a letter of apology any day now, but the department does not plan to change its procedures.

That upsets Moore.

"They could ruin someone's marriage," he said.