The young loner charged with shooting President Reagan had a fixation for teen-age movie star Jodie Foster and attempted to assassinate the president in a grotesque attempt to get her attention, according to a letter found in his Washington hotel room.

John W. Hinckley Jr., an aimless, unemployed, mentally troubled drifter who in his 25 years made few friends, had sent several affectionate letters to the actress he had never met and carried pictures of her in his wallet, according to law enforcement sources. An unmailed letter was found in his hotel room here on the day he allegedly shot and wounded Reagan.

"I will prove my love for you . . . through a historic act," Hinckley reportedly wrote to Foster. The handscrawled, two-page letter indicated that Hinckley was going to shoot Reagan and that Hinckley himself might also be killed, according to sources. The letter concluded: ". . . it's 12:30 now, one hour before I go to the Hilton," sources said.

Foster, 18, left Hollywood last fall to begin studies as a freshman at Yale University. Officials at the university issued a statement by Foster late yesterday in which she said that "I have never met, spoken to, or associated with him [Hinckley]." In that statement, Foster said the FBI had asked her to say nothing more about Hinckley, who has been charged with attempted assassination of a president and assault with intent to kill a federal employe. Other sources said she had received several of Hinckey's letters. David Napier, a master at the school's Calhoun College, told a reporter that Foster had received "a lot of strange letters from a lot of people."

Aside from his obsession with Jodie Foster, Hinckley, the son of a wealthy, conserative western oil executive, was a man of few aims or causes. He had been a member of the National Socialist Party of America for one year, but was expelled from that neo-Nazi organization in 1979, according to leaders of the Chicago-based group, because he was too extremist and violent and they feared he was an undercover agent.

There are several events, some mundane and one chilling, that may have drawn the nondescript wanderer to the budding actress. Hinckley was a voracious reader of newspapers and magazines and might have seen Foster's picture in a recent Newsweek and read her short first-person account of her venture to Yale in last October's Esquire Magazine.

Although Hinckley had no known relationships with women in recent years, he seemed to be attracted to young girls. It was learned yesterday that in the two weeks before he came to Washington, Hinckley spent much of his time hanging around Evergreen High School in suburban Denver, where he attempted to befriend several teen-aged girls.

There is also a certain parallel between Hinckley and a character in a movie in which Foster appeared in 1975. In that movie, "Taxi Driver," Foster played a young runaway who ended up as a streetwalker in New York and made friends with a lonely, mentally unstable cabbie played by Robert De Niro. For much of the movie, the De Niro character, Travis Bickle, stalked a political candidate and was prepared to assassinate the politician before being scared off by a security agent. What is known of Hinckley's letters to Foster does not make it clear whether Hinckley ever saw that movie.

Paul Schrader, who wrote the screenplay for "Taxi Driver," said the film was inspired by the life of Arthur Bremer, the Milwaukee busboy who attempted to assassinate presidential candidate George C. Wallace in 1972. "The pathology of the movie is very accurate," Schrader said yesterday. "I would get letters and visits from people. One man just walked in once and said, 'I just wanted to find out how you found out about me' . . . I was frightened."

Travis Bickle struggled with loneliness, desperation and disillusionment, and so, too, did John Hinckley in recent years. He dropped in and out of college, roamed from Texas to Nashville to Denver, applied for jobs but never got them, constantly lied about his background, bought guns and grew increasingly bitter and nihilistic about American life and politics.

He was under psychiatric care near his parent's home in Denver earlier this year and was being treated with Valium. In the final days before his fateful trip across the country from Los Angeles to Washington on a Greyhound bus, Hinckley seemed to be separating himself more and more from his family and his past. The acquaintances he made when he stayed at a Denver motel fro two weeks earlier this month said they had no idea he was the son of a prosperous and infuential local businessman.

Hinckley was repeatedly described by childhood friends and by strangers whose paths he crossed during his aimless travels, as a loner, a quiet man, a man "so normal that he appeared to fade into the woodwork," as his Dallas high school classmate, Beverly McBeath, put it.

It was only when Hinckley acted or said the extraordinary that observers -- hotel maids, janitors, acquaintances -- took notice of the chubby, sandy-haired young man, clad usually in jeans and button-down shirts, who sometimes grew so animated during brief conversations that his eye lids and shoulders would fidget. A maid at the Golden Hours Motel in Denver, where Hinckley stayed before coming to Washington, said he had one peculiar habit that indicated to her that he was a strange fellow. The maid said she told FBI agents about that habit and was directed by agents not to reveal what it was.

Calvin Wynne, a maintenance worker at an apartment complex in Lubbock, Tex., where Hinckley lived last fall while attending Texas Tech, said he remembered, after seeing Hinckley's face flash on the television; Monday, speaking to him twice. Wynne said Hinckley showed "great hostility" toward the government, and felt "there were some political leaders he thought should be eliminated.

"He just basically had no allegiance to any authoritarian control," Wynne said, according to the Lubbock Avalanche-Journal.

Wynne said Hinckley's attitude and personality were "strained," and it seemed as though he "had something on his mind."

"There was a nervousness about him," Wynne said. "Hyperactive, is that what you call it? He moved about a lot. He got more anxious, more hyper as the conversation wore on, like he wanted to do something."

Texas Tech University history professor Joseph King recalled Hinckley only because he was the most quiet, the most unobtrusive student he had lectured to in the fall of 1979, when Hinckley was enrolled in King's U.S. Economic History course.

"I recall him mainly because he was so quiet and attentive," King said. "While everyone else in the class exhibited a kind of camaraderie, he always sat alone on the left side of the room, surrounded by empty chairs. Even during humorous moments in class, he would continue to gaze at me attentively, taking notes." Hinckley, King said, wrote an "excellent" review for the course of a book on American slavery.

Texas Tech records show several mysterious breaks in Hinckley's University career. He started in the fall of 1973 and attended in the spring of 1974, but there are no records for him during the summer and fall of 1974. He returned to the university in the spring of 1975, came back the following fall and attended in the spring of 1976. But he was not at the university during either the fall semester of 1976 or the following spring semester. He came back in the summer of 1977 and distinguished himself by maintaining a B average and making the Dean's List.

Then there was Hinckley's apparent fascination with guns, which seemed to grow in proportion to his increasingly lonely spiritual sojourn. In 1979 and 1980 he purchased a total of six guns, three in Dallas, two in Lubbock and one elsewhere, all from pawnshops that buy and resell an assortment of musical instruments, jewelry, guns and encyclopedias.

All of the handguns were made by RG Industries in Miami, a small company that assembles cheap handguns from parts manufactured by Roehm Industries, a West German firm. The first handgun was .38-caliber revolver, purchased by Hinckley from Pappa Daddy's Galaxy Pawn Shop in Lubbock. A year later, he purchased two .22-caliber revolvers from Snidely Whiplash Pawn Shop also in Lubbock.

On Oct. 9, roughly a month after Hinckley bought the two pistols, he was arrested at the Nashville airport after an officer there noticed what he believed was a gun barrel while Hinckley was going through an electric metal detector. When Officer John Lynch opened the suitcase he found two revolvers in their original boxes. "The plastic was still wrapped around the boxes," Lynch said. "He told me they were good guns. He said he was going north to sell them or gave them to some friends."

After posting $62.50 bond, Hinckley vanished from Nashville, never showing up for his trial. Instead, he apparently returned to Texas, to Dallas, where four days later he bought two more guns. Yesterday in Dallas, Isaac (Rocky) Goldstein, owner of Rocky's pawnshop from which Hinckley bought the .22-caliber weapon allegedly used in Monday's shooting, took his phone off the hook and reportedly hired a bodyguard after anonymous callers threatened him and his business.

Hinckley purchased two guns from Rocky's and the salesman who sold them to him quit yesterday when the shop received an avalanche of phone calls. Both Goldstein and his son David said they did not remember Hinckley, and the only records they have of the suspect's visits to the pawnshop were quickly confiscated by federal authorities.

Hinckley lived in Lubbock over a seven-year period, but left little impression on the memories of people he came in contact with, except for the trail of paper and records of apartments rented and guns bought.

Only occasionally, as in his conversations with the Lubbock maintenance man, were aspects of his life and his problems remembered. It was in Texas that Hinckley first met members of the National Socialists Party of America, who took him with them on an automobile journey in March 1978 to St. Louis, where he participated in an NSPA march to commemorate the birthday of George Lincoln Rockwell, founder of the American Nazi Party. b

"He seemed committed to our cause; he was bright, a little understated," said Michael C. Allen, acting director of the group, recalling the St. Louis march. "He wore uniforms like the rest of us -- he was a stormtrooper. Black boots, the swastika, khakis and the black helmet. But he was too militant. He wanted to destroy our enemies -- blacks, Jews, Communists."

"It got to the point," said party stormtrooper John Gaynor, "that we suspected him of being a federal agent. He was just too far out. He wanted to destroy people."

Hinckley, according to Allen, lasted only a year in the party. The same semester at Texas Tech during which he studied German concentration camps and Hitler's "Mein Kampf" he was expelled from the party.

If it wasn't Hinckley's sometime bizarre behavior that people remembered, it was the deceits, the occasional lies and half-truths. Two weeks after he was released by police in Nashville, he was in Denver, looking for work.

In noncursive, undramatic, understated handwriting on a job application to the Rocky Mountain News, Hinckley lied about job references and his academic standing. He desired, he wrote, a writing or circulation job paying in excess of $4 an hour, and wrote that he had previously worked as a bookkeeper at a Dallas publishing house, a photographer in Los Angeles, and a salesman in Hollywood. He wrote that he had graduated from Texas Tech with a degree in English and journalism, and expressed an interest in politics and reading.

The News, and the Denver Post, to which he also applied for a job, checked his credentials and found them false.

But it was at the Golden Hours Motel in Denver, where Hinckley lived for 16 days before leaving town eight days ago, that the mysterious wanderer left the most mundane, yet memorable, impressions.

The hotel, located on a noisy thooughfare across the street from a Ford dealership and a McDonald's, is owned by the Chon Lee family. Hinckley lived in room 30 on the second floor. On March 8, Hinckley drifted into the hotel requesting a "cheap place to stay," according to the daughter of the owner.

He said he would pay by either day or week, and when the girl told him the weekly rate was $74.25, he paid the amount in cash. He was driving a white plymouth Volare bearing Texas license plates which had expired last year.

"He was just a clean-cut, good-living kid. He didn't seem to drink or smoke and never had any women in the room," said Ginger Aucourt, who, with her daughter Stacey, works as a maid at the hotel and lives in the room next door to the one Hinckley stayed in.

He looked like a young man who was simply down on his luck, a poor waif who drifted in from the city, the Aucourts recalled. Each night he went to bed before 9 p.m., and awoke before 9, and immediately in the morning he would go downstairs to the front desk to peruse the Rocky Mountain News.

He always wore tennis shoes, jeans and a beige jacket, and each day, when he was asked where he was off to so early in the morning, he replied "to work."

"I talked to him maybe two, three times a day," Ginger Aucourt said. "We talked about Texas, country and western music, things we had in common. He didn't talk much about himself, his family, politics or religion." c

And though he appeared impoverished, and walked about the hotel with head bowed down and hands shoved into his pockets, he never admitted to these people that his family was properous and only 20 miles away. During his stay at the hotel, he made 34 phone calls, none of them long distance.

The Aucourts said Hinckley spent most of his time in his hotel room with the shades tightly drawn. He bought food at the nearby McDonald's and ate in his room. Each morning, when the Aucourts tidied his room, they found McDonald's wrappers in the trash bin, a tape recorder on the night table next to his bed, several record albums and a few tapes featuring music by John Lennon and the Eagles rock group.

"All day long, the shades were drawn. He never talked about his past or his family. He always pulled the coverlet over his bed, and the room was always orderly and clean," said Stacey Aucourt.

He said he didn't have much money, so last Sunday Aucourt invited him over for a spaghetti dinner. Saying he had been tied up at work, Hinckley, who told them he worked for a local record shop, arrived for the dinner two hours late.

On Monday morning Ginger Aucourt saw Hinckley get into his white Plymouth. He waved to her. She thought the lonely stranger was going to work as usual. Instead, he began the long journey to Washington.