Washington — What is shaping up to be the longest, costliest presidential campaign in United States history was formally launched in Senate Caucus Room 318 Wednesday. Sen. Alan Cranston (D) of California, saying he felt compelled by the prospect of a nuclear holocaust to challenge President Reagan for the White House, officially declared himself a candidate for the 1984 Democratic nomination.
Senator Cranston's announcement - and the entries scheduled to follow quickly this month from Sen. Gary Hart (D) of Colorado, former Vice-President Walter F. Mondale of Minnesota, and former Gov. Reubin Askew of Florida - means more than the prospect of a 21-month campaign. It also could foreshadow the earliest, most visible, most persistent crowding of a sitting president by major opponents when a White House is in the midst of critical decisions. In Mr. Reagan's case, he is at the moment embroiled in arms bargaining with the Soviet Union abroad, and disputes over his budget - especially defense spending - at home.
Each Democrat is expected to probe different issues on which he feels Reagan is vulnerable. Cranston will attack the President on arms control, Senator Hart on defense and weapons policy, Mr. Mondale on fairness and compassion in economic policy, while Mr. Askew will go after Reagan's Southern base with a conservative appeal on social issues. In March, Sen. John Glenn (D) of Ohio will weigh in to rival Reagan on the Republican's own pet themes of optimism and national destiny.
But for Cranston, the threat of ''nuclear war'' is ''the dominant problem of our age.''
''Through my years in business, my experience in building the Democratic Party in California and in my 14 years in the Senate,'' he said, ''I have concentrated on arms control, defense and foreign policy so that I could work, constructively and creatively, against the holocaust of modern war.''
He likened the arms race to solving US economic troubles. ''There can be no cure for growing unemployment, decreasing productivity, the diminishing opportunity for individual Americans to enhance their well-being, if we continue to pour a mounting portion of our national resources - our money, our technological skills, the energies of our people and our government - into a race to build arms.''
''I believe in the necessities of defense,'' Cranston said. ''But we have overleaped the bounds of reason.''
As a group, the Democrats offer a broad regional as well as thematic line of attack. They can appeal in the Sunbelt and Midwest bases of GOP presidential strength.
An economic recovery would give Mr. Reagan at least an even shot against the Democrats generally. Asked ''if the economy improves by 1984,'' would they ''plan to vote for President Reagan for reelection,'' American voters split 47 percent yes to 47 percent no in a year-end Penn & Schoen survey. The same survey showed some potential trouble for liberal Democrats like Cranston. By 2 to 1, voters said they would ''consider voting for a moderate Democrat for President, but not for a liberal Democrat.''
Based on his voting record, Cranston has been one of the most liberal legislators in the Capitol. Mondale, now seen as more of a moderate because of his role in the Carter administration, was just as liberal a senator.
But Cranston intends to immerse his campaign in the public issues of the moment. Next week he will outline an economic agenda featuring ''pragmatism and flexibility.'' He will also make the familiar Democratic appeal for ''cooperation between business, labor, educational institutions, and government.''
Cranston has been one of his party's most formidable fund-raisers. His feat last month of winning a majority of California delegation backing in a straw vote was a convincing show of political muscle. Cranston calls his California base ''the best base anybody has,'' extending as it does into the Western and Sunbelt reaches of Reagan's strength. Following his announcement in Washington and brief trip to New Hampshire, Cranston returned to California where he was expected to announce that 60 percent of the state's elected officials backed his candidacy.
Cranston has already picked the states he will focus on for '84. ''We have the strongest state organization of any candidate in New Hampshire,'' says Sergio Bendixen, Cranston's campaign director. He adds that Cranston's New Hampshire team is especially strong in the blue-collar towns of Nashua and Manchester, areas where liberals and progressives do not usually do well.
Cranston's targets also include Iowa, Alabama, New York, Illinois, Washington , Massachusetts, and Wisconsin.