Fidel Castro said for the first time publicly today that he is willing to discuss the issue of American political prisoners in Cuba. There are seven such prisoners in Cuba.

He also said that he would probably visit the United States within the next five years.

In another first Castro accepted an invitation by Sen. Frank Church (D-Idaho) to hold a press conference Thursday with American journalists aboard a U.S. Air Force jet here. The jet is coming from Andrews Air Force Base to return Chunch to the United States. It dropped him off here Monday.

It was the first time a U.S. government plane had flown to Cuba in more than 16 years. "At least," Castro joked. "It is the first time one has come here legally." He noted "with appreciation" that President Carter had ended U.S. intellience flights over Cuba soon after his inauguration.

In an unusual display of conciliation and optimism over the future of U.S. Cuban relations. Castro confirmed reports from Washington that he is receiving information from the Carter administation concerning foreign activites against Cuba in the U.S. exile community.

"It is a matter of exchange of information dealing with plans against Cuba that violate the U.S. and Cuban law," Castro told reporters trailing his whirlwind tour of the Cuban countryside with Church.

Church and Castro also announced that they are in agreement on the bright prospects for a new world sugar agreement when international talks reconvene in Geneva in September. The talks have been stalemated over a price disagreement, with Cuba and the United States on "different sides of the issue.

While Castro did not indicate that he would take any action on the status of the seven American political prisoners held here, he said he hopes that there will be a chance to talk about them with Church.

Castro has previously been adamant in his refusal to discuss the prisoners, who the Cubans maintain were legally convicted and sentenced for crimes against the Cuban government. Carter recently expressed worry over the seven men and said their imprisonment here would prevent normalization of relations with Cuba in the foreseeable future.

The first of the prisoners was arrested in 1959, and the most recent 11 years ago. Although details of the charges against them and of their trials were never released by the Cuban government, they are believed to have been charged with CIA activity here. All have been sentenced to either 20 or 30 years in prison.

On his arrival here, Church indicated that the prisoners and the presence of Cuban troops in Africa were priority items on his discussion agenda. He brought with him to give to Castro a packet of letters and telegrams from persons in the United States with relatives prohibited from leaving Cuba.

Among those letters is one from Monica Moore, whose husband, Byron, was arrested here in June along with Donnie Rebozo, the nephew of former President Nixon's close friend Bebe Rebozo.

Cubans have charged Rebozo and Moore, who were picked up offshore in a Miami-based boat called the "Nita Sue," with smuggling marijuana and with violations of Cuban territorial waters. Moore's wife, who said she is dying of cancer, sasked that Moore be released or that she be allowed to visit here.

On the exchange of information on terrorist activity, Castro said he does not think that "it is in the interest of the United States to promote more terrorism in the United States."

Extremist Cuban exile groups have allegedly been responsible for a number of bombings in Miami.

Last week the State Department acknowledged cooperating with the Cuban government on the terrorists, but would not confirm a report that it had informed Castro of a planned attempt by exiles last June to launch an invasion of the island. The attempt was later abandoned.

So far, indications are that the exchange has been a one-way process.Castro said, however, that "It would be the same if there were a group of North Americans here who were planning an attack against the United States. I think a minimum of cooperation is in the reciprocal interest of trying to fight terrorist elements."

Besides, Castro said, "It's the least the American government can do." In past CIA plots against his life and government, he said, "In no country can planning for terrorist attacks against another country be allowed."

The comment was one of the few negative refrences to the United States that Castro has made during Church's visit. Local observers have described the Cuban leader's attitude during the trip as the most opimistic ever displayed publicly on the state of U.S. Cuban relations during an official U.S. visit.

Castro has been extremely complimentary to Carter except for a comment to Church about Carter's proposal to limit the number of nations through which plutonium is available for nuclear realistic" since the Third World has no alternatives to nuclear energy.