EARL Ockenga teaches mathematics the way most educators think it must be taught if the United States is ever to become a math-literate society. The emphasis in his elementary classes at Price Laboratory School at the University of Northern Illinois is on problem-solving rather than rote computation.

A year ago, the report of the National Commission on Excellence in Education, ''A Nation at Risk,'' thrust the problem of declining public education forcefully into the limelight. Specifically, it fingered deterioration in US students' math and science skills as a serious cause for alarm.

''To solve these problems, we need a broad-based effort, not a quick fix,'' argues F. Joe Crosswhite, president of the National Council of Teachers of Mathematics and a math educator from Ohio State University. ''It will take a long-term commitment.''

Dr. Crosswhite has been involved in the latest international study of eighth-grade math skills. ''The achievement of US students is not as good as we'd like,'' he says. ''Overall they are performing at the median (for Western nations). But we are below those countries, like Japan, with very high educational standards and pressures.''

Overall, America's eighth-graders performed above the median in arithmetic, probability, and statistics, but below in algebra, geometry, and measurement. Geometry skills, in particular, appear to have sagged substantially.

Any successful effort to bolster math performance, say many math educators and teachers, must address a spectrum of issues, including teachers' pay and working conditions, curriculum reform, and standardized testing.

For some time now there have been serious shortages of qualified math teachers. The reasons are fairly straightforward. Teaching salaries are well below those that the mathematically skilled can command in private industry. For these modest salaries, teachers typically put in 12- to 14-hour days. Equally as important to teachers has been the decline of their authority in the classroom and status in the community.

So far, some 20 states have increased teachers' base salaries by $1,000 or $2 ,000 a year. Others have added college loan forgiveness programs for those who teach mathematics for a set period of time. Pending before Congress is a mathematics and science bill that would provide $425 million in scholarships for math and science teachers.

Half the time spent in the US on mathematics is now devoted to paper-and-pencil computation skills. This emphasis, particularly in the age of the computer, is widely considered counterproductive.

''Every report on the subject has agreed that we have got to be teaching higher order rather than rote skills,'' says Patricia Hess, a supervisor of public schools in Albuquerque, N.M. ''Problem-solving has to be the focus.''

Mr. Ockenga's approach is an example of this. He draws math problems from real life, rather than from textbooks. He also engages students in lively discussions about problems designed to catch their fancy. An example is the game Crack the Secret Code to Get the Message. Ockenga gives students a secret message made up of a series of numbers and a table with three possible letters for each number. Then he solicits ideas on various ways to crack the code, guiding students to discover basic problem-solving strategies.

This is considerably different from the steady diet of drill and practice common in most classes today. None of the math educators argue that basic drills should be eliminated, merely deemphasized. ''There is a popular misconception that if you can compute with paper and pencil, you must somehow understand what you are doing. This is not necessarily the case. It can be just as mindless as pushing buttons,'' explains Prof. Zalman Usiskin of the University of Chicago.

Besides the increased emphasis on applications, there is also a need to introduce mathematics concepts at an earlier age. ''Mathematics is a language,'' Dr. Usiskin contends. ''The longer you delay learning it, the harder it becomes.'' Other industrialized countries, including the Soviet Union, expose students to math concepts at an earlier age than do US schools.

The changes these specialists are talking about would require a major revamping of school curricula - something some teachers find threatening. ''Many teachers feel that their job is teaching rote skills,'' Dr. Hess explains. ''Elementary teachers in some states don't need any mathematics training to teach. So many of these teach exactly as they were taught and are uncomfortable with any innovation.''

Another problem: the results of standardized testing are the ruler against which colleges and the public measure the performance of individual students and the system at large. But because rote skills are the easiest to measure, these tests stress just the skills which educators agree need to be deemphasized. ''We've got this terrible dichotomy,'' says Dr. Hess.