Indian Prime Minister Rajiv Gandhi, serving notice that major issues still remain in U.S.-Indian relations, today accused the United States of taking a "soft line" toward Pakistan's efforts to develop nuclear weapons and indicated that India might make its own atomic bomb to match its neighbor's.

"We have to think about how we can counter the presence of a nuclear weapon right across our border [in Pakistan] when we know that the country that is likely to get it has attacked us on three occasions without provocation," Gandhi said in an interview with American news organizations on the eve of a five-nation trip that will include the United States.

The nuclear issue was one among several cited by the new Indian leader as he prepared for his first official visit to Washington, which has been actively seeking to place U.S.-Indian relations on a new and smoother plane.

While Gandhi's remarks today served notice that the process will take time, the tenor of his comments was much softer than their substance, and stood in marked contrast to the sometimes strident rhetoric of his mother, the late prime minister Indira Gandhi. This underscored the more optimistic note struck by the recent accord reached by the two countries that allows new high-technology transfers, including in the sensitive military arena.

Gandhi said he will discuss Pakistan's nuclear program with President Reagan during his U.S. visit from June 11 to 16 and that he will urge Washington to take stronger steps to try to curb it.

Gandhi also told reporters the United States should be tougher with Pakistanis caught trying to smuggle sophisticated supplies from the United States for use in making nuclear weapons. Gandhi said one man who was arrested in Houston last year was allowed to return to Pakistan instead of going to jail in the United States.

The Indian prime minister also criticized the FBI for what Gandhi described as not passing on information to his government that Sikh terrorists who were allegedly planning to assassinate him were also planning to blow up a nuclear plant in India.

During the hour-long interview, Gandhi exhibited unusual flexibility for an Indian leader, indicating a willingness to give on some of India's stands while stating the purpose of his Washington visit as one in which he hoped to "narrow down our differences."

The change in tone actually began with Indira Gandhi at her first meeting with Reagan in Cancun, Mexico, in 1981 and continued during her last visit to Washington in July 1982. Rajiv Gandhi said today that those meetings laid the foundation for his current visit and the new tenor of warmer relations between Washington and New Delhi.

But he made clear that India would not back away from either close ties with Moscow or its own position on South Asian regional problems as a price for a closer relationship with the United States.

Nevertheless, Gandhi's visit comes at a time when the often prickly relations between the United States and India are at their smoothest level in more than a decade. The Reagan administration, which in effect dismissed India as aligned too closely with the Soviet Union at the beginning of its first term, now talks about long-term efforts to wean New Delhi away from its Soviet arms relationship. These efforts include allowing India to buy sophisticated U.S. technology so it can build its own high performance military equipment, ranking administration officials and key lawmakers have said here and in Washington.

As part of the new administration strategy, an unusually large number of high U.S. officials -- including Vice President Bush, Secretary of State George P. Shultz and Undersecretary of Defense for policy Fred Ikle -- have visited India over the past eight months.

The new U.S. strategy was approved by Reagan shortly before Indira Gandhi's assassination last year, and gained strength with the landslide election of her son as prime minister in December.

While arms sales are unlikely during his trip, Gandhi will meet with manufacturers of high-technology products that India can now buy under a technology transfer agreement signed here last month during a visit by U.S. Commerce Secretary Malcolm Baldrige.

That agreement, widely publicized here, received little notice in the United States. But the agreement, scheduled to be initialed next week in a White House ceremony by Reagan and Gandhi, is the most tangible sign so far of Washington's intensified interest in forging closer ties to India.

That agreement and the Ikle visit are symbolic of the administration decision to overcome opposition from Pentagon hard-liners about sales of high-technology products.

A recent high-level U.S. senatorial delegation brought an offer from Lockheed to join with India in designing its own light combat aircraft that would be built in India, according to members of the delegation. The U.S. visitors said the Lockheed offer sparked strong interest among members of New Delhi's defense establishment, who have been trying without success to design a similar jet fighter.

That kind of offer is seen by the Reagan administration as more attractive to India, which wants to develop its own sophisticated defense industry, than an arms sales agreement of the type it has with Moscow.

Reagan administration wooing of India has not escaped notice in Moscow, which, according to U.S. and Indian sources, has stepped up its own campaign to emphasize its long-time support for New Delhi and its regional policies.

At the press conference today, Gandhi said he was not sure India will take the bait of U.S. high-technology sales to build its own sophisticated weapons.

"We welcome it," he said. "But how much we are going to go into and use it is a question that still must be decided. You must remember that the Soviet Union has been very consistent in its support of India."

He emphasized that his U.S. trip was not a shopping expedition. "We'll have to see exactly what the small print is," he said, referring to the agreement. "For me," he said, "it is not a trip to buy things and get things. . . . It is a trip to meet your leadership and build up an understanding."

On the nuclear issue, Gandhi said, "We are not developing a nuclear weapons program at the moment. We would like not to develop a nuclear weapons program."

[In an interview] this week with the French newspaper Le Monde, Gandhi said India, in principle, was against the idea of becoming a nuclear power. "We could have done it for the last 10 or 11 years and we have not done it," United Press International quoted him as saying in the interview. "If we take the decision, it will be a matter of several weeks or several months."

India exploded a "peaceful nuclear device" in 1974, thereby joining the club of nations considered able to make atomic weapons. But most sources agree that it has not gone ahead and developed an atomic bomb.

On the alleged plot by Sikh terrorists to kill him, Gandhi said the FBI "should have told us of the attempted attack on our nuclear plant because that's something that's not limited to India."

As part of the plot, uncovered by the FBI in mid-May, strategic locations in India, allegedly including a nuclear power plant, were among those targeted for bombing. "It could have been a Three Mile Island sort of thing," said Gandhi, referring to the partial meltdown of the reactor core at the Pennsylvania nuclear power plant in 1979.

But he tempered that criticism by saying "we are now satisfied" that the United States "will do everything it can to help us in this particular case." FBI agents, in a sting operation, broke up a plot by seven Sikhs to assassinate Gandhi during his visit to the United States, and to kill the chief minister of the Indian state of Haryana, Bhajan Lal, who was in New Orleans for medical treatment.

Despite the plot against him, Gandhi said he is "not afraid to go to the United States at all." But he acknowledged that the added security that now surrounds him will limit his ability to see the country.

"Let us say I might get less out of this visit than we could have gotten. But I still think that the improved atmosphere between the two countries will lead us to get more out of the visit," he said.

Gandhi appeared to gain confidence after a shaky start in the news conference today, and seemed better prepared to field questions on domestic and regional issues than on the type of foreign policy concerns he is likely to be dealing with in Washington, where he will be making his first visit as a head of government.

Asked about President Reagan's tendency to see the world in terms of Communist and anti-Communist nations, Gandhi said, "If President Reagan sees it red and white, we see it a nice rosy color."

Gandhi insisted that India has been even-handed in criticizing the United States and the Soviet Union, and compared Moscow's invasion of Afghanistan to the U.S. invasion of Grenada.