Chinese Vice Premier Teng Hsiao-ping said today he hoped that China's invasion of Vietnam would end sooner than its 33-day war with India in 1962 but that China would probably attack Vietnam again if provoked, a Japanese news agency reported.

In the most specific discussion so far of China's timetable for the invasion, Teng told Kyodo news agency president Takeji Watanabe, "It's been nine days since Feb. 17," when the war began. "I think fighting will end in a little while."

The Japanese news agency reported that Teng indicated the conflict might end in about 10 days "or a few days more" because "Vietnam is stronger than India."

Hanoi Radio and analysts here and in Bangkok said fighting was continuing near at least three important Vietnamese towns. Vietnam claimed the Chinese had suffered total casualties of about 18,000 through yesterday, but said nothing of its own losses.Neither Teng nor the official Chinese press gave casualty totals for either side.

[In Washington, U.S. officials said reports from the war zone indicated a significant increase in military action around rail lines and towns in the northern border region of Vietnam. The officials attributed the change to a decision by Vietnam to engage Chinese forces, and said they expected a new phase of heavier fighting as the two sides engage in a test of strength.]

Chinese troops appeared to be as deep as 25 miles into Vietnam at one point, according to reports, but there seemed to be no threat to Hanoi, which is at least 80 to 90 miles from the fighting.

Analysts here and in Bangkok discounted Japanese reports that Chinese units had driven as deep as 48 miles into Vietnam.

According to Kyodo's report of its interview with Teng in Peking, the Chinese leader said Vietnamese had frequently invaded Chinese territory, "so what is wrong with us going into theirs?"

Teng's remarks did not appear to absolutely rule out a war lasting longer than the 1962 border war with India. The Indian conflict was fought around an underpopulated Himalayan frontier against an army without much combat experience or apparent desire to fight.

The Vietnamese, on the other hand, have indicated their willingness to engage the Chinese vigorously, particularly if they begin to withdraw and can be said by Hanoi propagandists to be in retreat. The Americans and the French found it difficult to end what they thought would be limited wars with the Vietnamese.

Teng reportedly would not rule out future invasions of Vietnam.

"If Vietnam should cause a provocation along the border again, I think we would want to give them a lesson again," Kyodo quoted him as saying.

"Our objective is a limited one -- that is, to teach them they could not run about as much as they desired," Teng said.

Teng, considered by foreign analysts to be the most influential member of China's ruling Politburo, indicated he thought the invasion was justified because the Vietnamese "controlled Laos, invaded Cambodia, signed a treaty with the Soviet Union that is a military alliance in nature, and encroached on Chinese soil at will."

Teng, who holds the offices of vice premier, Communist Party vice chairman and army chief of staff, said Peking would wholeheartedly support a reported compromise U.N. resolution calling for withdrawal of foreign troops from both Cambodia and Vietnam, Kyodo said.

But Teng reportedly added that "we would not make that a bargaining condition," indicating China would not insist on a Vietnamese withdrawal from Cambodia before withdrawing its own troops from Vietnam.

Kyodo said Teng indicated Hanoi had been preparing a long time for a fight. "They kept digging trenches these several years to antagonize China and we saw them with our own eyes," Teng was quoted as saying.

As for the possibility of Soviet military intervention, Teng reportedly said, "I cannot foresee any such action although I cannot preclude totally such risks.... We had considered certain risks in making the decision and had made sufficient preparations."

Kyodo said Teng estimated Soviet troop strength along the Sino-Soviet border at about a million men, although he said they were spread thinly along the 5,000-mile frontier.

Teng reportedly said Hanoi expected help from "those who pulled the strings behind them" and depended on its recent friendship treaty with Moscow. "If we are afraid of that," Teng reportedly said, "other people would think we are soft. When we made up our mind [to fight], we kind of thought, 'Let's see for ourselves if the Chinese have a nervous breakdown,'" apparently meaning if they can stand the pressure of war.

During the negotiations over the agreement to normalize relations with the United States, Teng reportedly said, American negotiators asked Peking to commit itself against the use of military force.

"But we refused because we could not tie our own hands," Teng was quoted as saying.

American officials have said they did not ask China to make a written pledge to forsake force against the Nationalist Chinese-held island of Taiwan, after President Carter seemed to indicate at a press conference that Washington had asked for such a pledge. Teng apparently did not say if the commitment sought by U.S. negotiators was to be written or oral.

He added, according to Kyodo, "China does not want foreign land. We'll pull out as soon as our objective is attained." Although he hoped the war would be shorter than China's 33-day invasion of India, which ended in a unilateral Chinese withdrawal, Teng said "the other side is the problem."

Foreign analysts meanwhile, continue to look for clues to China's military objective in the border area fighting. Some argued that Chinese generals had been told simply to kill as many Vietnamese soldiers as possible, and they were now preparing for more Vietnamese troops to reach the front.

The Chinese appear to be interested in destroying as many military installations and missile sites as possible in the border area.

Some analysts are watching troop movements in the mountainous far northwest corner of the border area, where Chinese soldiers appear to have moved south of the town of Laichau, about 20 miles inside Vietnam, on Highway 6.

About 40 miles further southwest is Dienbienphu, the scene of Vietnam's final great victory against the French in 1954 and thus a target of symbolic, though little strategic, importance.

Radio Hanoi, monitored in Bangkok, said China now has at least 25 infantry divisions in Vietnam, "more divisions," it said, "than the Americans put into the war in Vietnam."

Intelligence sources consider this an exaggeration. They estimate that about half the 200,000 Chinese troops in the border area are actually in Vietnam. At the height of the American involvement, there were about 546,000 U.S. forces in Vietnam, but only about 60,000 were combat troops.

Meanwhile, a Chinese Foreign Ministry spokesman told Western reporters in Peking that there are also some Vietnamese forces on the Chinese side of the border. "It is hard to say how many are left in China, but most have been driven out," he said.

The Chinese spokesman said some of the fighting "has been inside of China" but he added that "it is hard to say where the front line is."

Radio Hanoi focused its attention today on fighting near the border city of Laocai. It said Chinese troops supported by artillery and tanks had attacked Camduong, small village two miles southwest of Laocai that was visited Friday by Rep. Billy Lee Evans (D-Ga.) and some American journalists.

Hanoi said heavy fighting in the area of the hamlet, which began Saturday, was still continuing. Three columns of Chinese troops had been engaged by the Vietnamese forces and 1,400 Chinese had been put out of action, the radio said.

The Vietnamese radio reported continued fighting in the area of Caobang, about 18 miles inside Vietnam on a vital highway paralleling the border.

It said the Chinese suffered many casualties in fighting in Quangninh Province at the border's northeast corner. Foreign analysts have reported that the capital of Quangninh Province, Mongcai, is in Chinese hands. Isao Takano, a reporter based in Hanoi for the Japanese Communist newspaper Akahata, said, however, that Vietnam had repulsed a Chinese attempt to take the town.

Hanoi radio and foreign analysts reported continued fighting around Langson a small city controlling the shortest rail and road line from the border to Hanoi.

China's official New China News Agency issued one of its rare battle reports early today and disclosed the capture of a town north of Langson called Dongdang.

Analysts said they could not confirm a Chinese claim that an elite Vietnamese unit, the "Flying Tiger" regiment of the Third Division, had been beaten in the battle. Analysts and Vietnamese reports have indicated that few main-force Vietnamese units have yet entered the fighting, being carried on so far by Vietnamese militia and regional troops.

Analysts had reported the capture of Dongdang several days ago. The Chinese report did not give a date.