The danger of a gas explosion at the crippled Three Mile Island nuclear plant near Harrisburg, Pa., was reported to be increasing last night as federal and state officials expanded their evacuation planning for adjoining residential communities.

Sources at the Nuclear Regulatory Commission said the growing danger of explosion inside the reactor stemmed from an increasingly explosive combination of gases within the reactor vessel.

Last night, President Carter said he will visit the plant "to learn better about the situation there." White House officials clearly were caught off guard by the announcement and said they did not know exactly when the visit will take place but that it will be in the near future.

The developments came during a day of conflicting claims of progress in reducing the size-and thus the danger-of the hydrogen bubble.

NRC officals said there has been an increase of oxygen in the giant gas bubble that has impeded efforts to cool the reactor, increasing the danger of igniting the highly flammable hydrogen gas in the chamber.

An explosion could burst through the reactor vessel and possibly also the four-foot thick concrete containment shell, which is the last obstacle to the release of radiation into the atmosphere.

"The gases are coming together in the wrong combinations, as far as we're concerned," said one source at the NRC who asked not to be identified. "There's no immediate danger, but it's putting some time pressure on us to do something to get rid of that bubble."

These concerns were voiced after officials at the Metropolitan Edison Co., which runs the plant, said they had succeeded in reducing the size of a gas bubble in the reactor that was blocking cooling water from reaching overheated uranium fuel rods.

The top priority of technical teams dispatched to Three Mile Island was still to devise a safe means of collapsing the gas bubble that sits in the dome of the reactor and prevents cool water from reaching all parts of the reactor.

"We have to get that gas bubble out of the reactor," NRC chairman Joseph M. Hendrie said yesterday. "The principal problem we have right now is to work out a means of dealing with that gas bubble so we can cool down the reactor."

At a news conference in Washington, Hendrie said that when technicians decide to eliminate the bubble it might be "prudent" to evacuate residents living 10 to 20 miles downwind of the facility.

Moves to eliminate the bubble could come Monday or Tuesday.

Sometime Friday night, utility technicians apparently pumped cooling water at a faster rate through the reactor vessel in an attempt to collapse the bubble in the dome of the vessel. The bubble had grown to where it covered an area of 1,000 cubic feet, more than one third of the entire reactor core.

While the move may have stopped the bubble from growing, it forced some of the hydrogen gas out of the bubble and out of the reactor room to the concrete containment vessel that surrounds the reactor to wall in any leaked radiation.

The loss of hydrogen meant that the hydrogen-to-oxygen ratio in the bubble had changed for the worse, bringing the two gases closer to the "sparkpoint" than they had been before. It also raised the levels of hydrogen gas inside the containment to almost 2 percent, almost half of what it must be to explode.

NRC sources said there has already been one hydrogen gas explosion inside the containment, an unreported blowup of gas that took place on the day of the accident, Wednesday.

"There was a spike [increase] in the pressure being measured inside the containment of about 30 pounds per square inch," one NRC source said. "We believe the spike was a small hydrogen gas explosion, which the concrete containment contained inside. There was no breach of the containment."

So serious was the possibility of a larger hydrogen gas explosion in the containment that the Pentagon was airlifting 70 tons of lead bricks to Three Mile Island to build a little "igloo" of lead shielding to allow workers to move close to the reactor to activate a device called a "recombiner."

This device, whose controls are located near the reactor and in direct line of sight of radiation leaking from an outside sump, works by providing a means to control the burning of the hydrogen gas. Far from a solution, the controlled burning is preferabble to an explosion that could break the containment.

The lead bricks were coming from the Brookhaven National Laboratory on Long Island, the National Bureau of Standards in Gaithersburg, the National Cancer Institute in Bethesda and an unidentified medical laboratory in Syracuse.

Also airlifted by the Pentagon was a complete untended weather station of the kind used in remote regions of the Arctic and Antarctic to keep track of wind movements and barometric pressure changes. One source said this weather station would be placed as close as possible to the reactor building, to provide wind measurements to technicians if the plant's condition worsens and a more serious release of radioactivity occurs.

The evacuation plan under consideration is one that would be used if a gas explosion takes place or if even a partial meltdown of the uranium core is threatened. If either one of these things happen and radioactive debris escapes to the atmosphere, most of the radioactivity would blow with the prevailing winds, which at Three Mile Island are westerly (blowing from the west) and northwesterly.

In an attempt to keep the reactor as cool as possible, technicians yesterday pumped 30,000 gallons of water diluted with chemicals called borates into the reactor. The borates are salts of boron that "soak up" the excess neutrons being produced by the radio-active decay of the isotopes in the uranium fuel rods.

If neutrons aren't soaked up of stopped in some way, they will tend to escape from one fuel rod and strike another, thus causing the rod to heat up in a kind of miniature chain reaction that is far from the "critical mass" that produces a full-scale chain reaction.

"What the borates do is supplement our other attempts to cool down the reactor," one NRC source said. "We want to get to a condition we call cold shutdown and we're doing everything we can to get there."

Reports reaching Washington from Three Mile Island continued to describe the reactor as having been more seriously damaged than had been originally believed. Technicians were able yesterday to identify radioactive cesium and some slight traces of radioactive strontium in the cooling water after it was pumped out of the reactor.

Finding cesium and strontium in the coolant means the fuel rods were damaged badly enough to come close to melting down. Cesium and strontium are metal fission products that escape from a reactor as a liquid sludge that is highly poisonous and long-lived. Until yesterday, the only fission products found in the coolant had been gases like xenon, krypton and iodine.

None of the cesium and strontium was found anywhere off the site of Three Mile Island. They were only found in the waste water that was still being discharged from the reactor at a rate of about 10 gallons a minute. The cesium in the water is an isotope called cesium-137. The strontium is strontium-90.

The waste water being pumped into sump tanks outside the reactor was still venting radioactivity to the air, though in lesser concentrations than were measured Friday.

The radioactive xenon and krypton gases being blown away from the plant were giving readings of 1 to 2 millirems per hour over the plant, and fractions of that one to three miles from the plant. A millirem is a small fraction of the normal dose received in an x-ray. The concern last night was that people living nearby were accumulating a radiation dose that was much higher than the actual dose being read each time a release of radiation took place.

What are the chances that the reactor core will suffer at least a partial meltdown if the bubble protecting the core cannot be collapsed? NRC Chairman Hendrie refused to say what the odds of a meltdown are, except to say: "I don't think they've changed much these last few days."

If the core melts down even partly, that part of the core will get so hot it will melt through the steel floor of the reactor room and start to bore its way through the earth beneath it. How far it goes depends on how much earth and rock it meets that will remove heat from it and slow its passage.

One of the big dangers of a meltdown is the remote chance that the core will melt down so far into the earth that it will make contact with underground rivers and poison their water with radioactivity. The Susquehanna River, where Three Mile Island is located, feeds the Chesapeake Bay, and supplies drinking water to thousands of residents in three states.