Census figures released yesterday indicate that New York, Illinois and Pennsylvania together will lose seven congressional seats in the next reapportionment, underlining a dramatic shift in the nation's population from the industrialized Northeast and Midwest to the Sun Belt states of the South and West.

The Census Bureau also reported that New York City lost nearly 40,000 residents over the past decade and that the count of city residents was far below the bureau's population estimates. Those figures were immediately challenged by New York Mayor David N. Dinkins (D), who reasserted his earlier claim that the 1990 census has missed substantial numbers of Americans.

He accused the Census Bureau and the Commerce Department of "committing grand larceny" against New York City.

He renewed his call for a statistical adjustment to the census totals to compensate for the undercount. Other big cities have joined New York in a lawsuit to force the Commerce Department, which oversees the Census Bureau, to adjust the final figures.

The numbers issued yesterday are preliminary results of the decennial census conducted this spring and summer and are subject to change as final numbers come in and local governments challenge the findings. But combined with other state population totals released recently, these figures provide more confirmation that a continuing population shift will lead to a significant movement in political power.

The newest numbers indicate that New York will lose three congressional seats before the 1992 elections, making it the nation's biggest loser in reapportionment. Also, Illinois and Pennsylvania are likely to lose two seats each, and Texas to gain three seats.

Overall, reapportionment will affect 21 states and a total of 38 congressional districts with 19 seats being lost from some states and shifted to others, according to an analysis by Kimball Brace, president of Election Data Services, a political consulting firm.

In addition to Texas, the other big winners will be California, which is likely to gain seven seats, and Florida, which would gain four.

Brace said his analysis, unlike others issued over recent years, showed Oklahoma and Tennessee in danger of losing a seat and Maryland a long shot for winning a new seat.

He also reported that the census numbers fell 1.65 percent below estimates issued by the bureau in February. But he said the bureau also had indicated that between 3.5 million and 4 million people who were counted late will be added, and that the final numbers may match the estimates.

Some local government and state officials, however, used the shortfall in the preliminary numbers to shore up their charges of an undercount.

The most controversial figures released yesterday were those for New York City. The bureau reported the city population at 7,033,179, down from the 1980 final figure of 7,071,639 and significantly below the 1988 estimate of 7,352,700.

Dinkins argued that the city had not lost population but had increased in size with large numbers of foreign immigrants.

State officials also criticized the figures.

"This is not the final word and we will push as hard as we can to make sure the count is accurate and full," said Brad Johnson, an adviser to Gov. Mario M. Cuomo (D).

Census officials would not comment on the figures, emphasizing that they are preliminary numbers that will change with the input of local governments.

Those governments have 15 working days to challenge the figures. If the Census Bureau accepts the challenges, it will send out enumerators to recount those housing units.