When District Commissioner John Russell Young gave the key to the City of Washington to Shah Mohammed Reza Pahlevi of Iran on Nov. 16, 1949 - one day short of 23 years ago - he may not have realized how often it would be turning in the lock.

But here's the shah back again today, on his 12th visit to Washington, in a routine which is much more familiar to him (and possibly to the older members of the Iranian Students' Association, which have been picketing him almost as long) than to any of the president of the United States who have been his hosts.

It was president Frankin D. Rosevelt who first asked the shah over, when they met at the Tehran conference of 1943. Wartime travel conditions prevented that, but the shah hasn't skipped a President since. He's been here toasting President Truman, Eisenhower, Kennedy, Johnson, Nixon and Ford as great leaders and true friends and will presumably similarly endorse President Carter tonight.

Each President received a full-fledged state visit from the shah, but if he had more than one term in office, he got a "private" "informal," or "unofficial" visit from him as well.

But however it is billed, the road show is pretty much the same each time. Either the shah brings an empress with him, who inspires murmurs about her beauty and jewels, or, when he was between empresses, there would be murmurs about his eligibility.

Elaborate gifts, promises and personal endorsements are exchanged between the shah and the President. The shah always tries to look very stable, implying that he will keep things steady in the Middle East for us. Masked Iranian students protest the visit, and a handful of them are arrested on minor charges embarrasingly out of proportion with their outrage.

Dinners are exchanged, in which the shah serves caviar and the President serves up some American entertainment, and the next day it turns out that a lot of key people weren't invited and feel huffy.

But there has also been a steadily increasing solemnity about these visits. Whether because of politics, or the general social climate, or simply because the shah is getting older, each visit has been less carefree than the one before. It go so bad the last time they were here that the empress declared that she just didnt feel like wearing any crown jewels when she was in the United States.

When the shah first turned up, in 1949, bringing 140 trunks for a 28-day visit, he was 30 years old. Although he came with stomach trouble, which he had checked out at New York Hospital, he ran all around the country - grabbing airplane controls to show off his skill as a pilot and hopping onto the football field to coach George Washington University in its game against Georgetown University.

He not only gave President Truman a rug, but he got down on his knees and showed Eleanor Roosevelt how to count knots on a Persian rug to see how good it is.

His encounter with Iranian students was limited to waving at the son of an old friend who was studying medicine in Kansas, and who had ridden two nights and a day in order to pay his respects.

He summed up his impression of Americans by declaring, "They have happy faces, are well-attired, and look friendly." There were rumors then that the shah, in the middle of divorcing Egyptian Princess Fawzia, was "looking for an American bride."

However when he next showed up, in December 1954, for an "unofficial" visit with President Eisenhower, he had with him the Empress Soroya, who dazzled everyone with her beauty and jewels. The couple accepted another invitation to visit President Eisenhower, in July 1958, but by that time they were divorced, and the shah came with his sister, dazzling everyone with his eligibility.

He gave a dinner at the Mayflower Hotel, in which 20 pounds of caviar was served on gold, and he also gave a little party for Iranian students here.

His sister's diamonds knocked everybody's eyes out.

On the next visit, to President Kennedy in April 1962, he had his new Empress Farah to knock everybody's eyes out. She wore a gold dress encrusted in rubies, with a diamond-and-emerald tiara, necklace and bracelet including stones of up to 20 carats.

Jacqueline Kennedy and she were inevitably compared during this visit, but the First Lady had gone for simplicity - no jewelry except a small handful of diamonds pinned in her hair - and the general consensus was that the empress had won.

In June 1964, the shah was back again, on a "private visit," but in August 1967, he was ready for another full-fledged state visit, this time to President Johnson. The empress didn't come, but the Johnson's sent a vermeil dressing-table box back to her, in addition to the matched 16-pound bowling balls they gave the royal couple.

Of the 26 Iranian students who picketed the Capitol when the shah were there, four were arrested on disorderly charges, forfeiting $10 collateral. One was also arrested when he threw leaflets at the shah's car, on the charge of "depositing trash in a public space."

The Johnsons put on the American Ballet Theater's "Rodeo" then, and the Kennedy's hed also presented ballet, a Jerome Robbins troupe, on the 1962 state visit. But the next time the shah showed up, in June 1968, there was on entertainment at the White House because of the recent death of Sen. Robert F. Kennedy, although the Johnsons did give a big dinner for the shah, officially ending the mourning period.

A year later, the Nixons opened their fall social season with a dinner honor of guess who. The empress who was pregnant, didn't accompany the shah, but it was a full-fledged state visit. Earlier in 1969, he had also been here to attend President Eisenhower's funeral.

In 1973, there was still another full-fledged state visit to the Nixons, even though technically visitors are limited to one per President. The Iranian embassy broke out the caviar again for their guests (the shah never touches the stuff himself, the embassy let it be known), but the empress was considerably toned down. She confine herself to one diamond and emerald brooch and emerald earrings, and was considered to have been out-dazzled by Maria Christina Ford in the jewel department.

The masked demonstrators' cry was "Nixon, Don't Arm the Shah!" and "Middle East Is the Next Indochina!"

"Then, in 1975, another big state visit, this time to President Ford. There were 500 Iranian students demonstrating in Lafayette Park, and 20 masked students chanting, "The Shah is a puppet!" during an embassy dinner.

By this time, the empress was practically in mufti. "I don't wear jewel in the United States or traveling," Shah declared. "I just don't feel like wearing them. I'm so much involved in so many real problems everyday that wearing a lot of jewels is just not contemporary any more. And wearing tiaras is not in our traditions," shah concluded, in the face of a tradition she herself had established here.

She has also visited Washington on her own. Those painted signs you see on the sidewalks, "Condemn Farah's U.S. Visit," have been blooming there for some time.

When he was in England in the summer of 1873, Mark Twain was prevailed upon by The New York Herald to cover the approaching visit of the Shah of Persia to Britain. He wrote five stories that are expected below:

LONDON, June 18, 1873. "Would you like to go over to Belgium and help bring the shah to England?"

I said I was willing.

. . . When I got home I sat down and thought the thing over. I wanted to go into this enterprise understandingly. What was the main thing? That was the question. A little reflection informed me. For two weeks the London papers had sung just one continual song to just one continual tune, and the idea of it all was "how to impress shah."

. . .My course was very plain, now after . . . reflection. All I had to do was to go over to Belgium and impress the shah. I failed to form any definite plan as to the process, but I made up my mind to manage it somehow. I said to myself. "I will impress this shah or there shall be a funeral that wil be worth contemplating."

(Finally Mark Twain meets the Shah. ) shah).

Seeing all this (gun and uproar), and feeling that if I was to "impress the shah" at all, now was my time. I ventured a little squeaky yell, quite distinct from the other shouts, but just as hearty. His shahship heard and saw and saluted me in a manner that was, I considered, an acknowledgment of my superior importance.

(Finally, England meets the shah :)

At last came the long-expected millennium himself. His Imperial Majesty the Shah, with the charming Princess of Wales on his arm. He had all his jewels on, and his diamond shaving brush in his hat front. He shone like a window with a westering sun on it.

We are certainly gone mad. We scarcely look at the young colossus who is to reign over 70,000,000 of people and the mightiest empire in extent which exists today. We have no eyes but for this splendid barbarian, who is lord over a few deserts and a modest 10 million of ragamuffins - a man who has never done anything to win our gratitude or excite our admiration, except that he managed to starve a million of his subjects to death in 12 months. If he had starved the rest I suppose we would set up a monument to him now.

And after lavish entertaining and "mountains of money spent," the shah departed.

We are all sorry to see the shah leave us, and yet are glad on his account. We have had all the fun and he all the fatigue. He would not have lasted much longer here. I am just reminded that the only way whereby you may pronounce the shah's title correctly is by taking a pinch of snuff. The result will be "t-Shah!"

A condensed version of Mark Twain's series of five articles on the Shah of Persia published by The New York Herald in 1873 is contained in "A Treasury of Great Reporting" by Louis L. Snyder and Richard B. Morris, published by Simon and Schuster, 1949.