Military officer training programs on college campuses are recovering from their Vietnam-era batterings and attracting increasing numbers of freshman students. Yet the military services are now closing some officer training programs for cost-related reasons.

Enrollment in the Army's Reserve Officer Training Corps, which wilted under a torrent of student protests form 165,430 cadets in 1967 to 33,220 in 1973, has risen steadily each year since 1973t to 54,671 this year, said an ROTC spokesman.

The Army's ROTC program is the largest of the three run by the military services, accounting for about two-thirds of all ROTC cadets. The smallest of the programs, the Navy's, underwent a similar experience - slipping below 7,000 cadets in the early 1970s but rising to 8,357 this year.

In the Air Force, where a spokesman said the need for new officers is currently low, the number of students in ROTC is continuing to fall.

- insert on add 1 after 2nd graph: fall.

For the first time since 1970, there will be an increase in the number of college graduates who will enter the services as officers. About 8,600 ROTC graduates will enter the service this summer.

The upsurge of interest in training for military service is taking place against a background of decreasing opportunities to participate in the Army and Air Force programs. Since 1972, the Army has closed 12 ROTC units and the Air Force has closed 35, because they said the units were not producing enough officers to justify their costs.

Both services require that any four-year school with an ROTC program enroll at least 17 cadets in its junior class to be cost-effective. Six schools that have not met that goal will lose their program at the end of this academic year.

In at least three of those programs, though, the numbers of freshmenr and sophomores enrolled suggests that if their ROTC programs continued, the schools would easily top the Army and Air Force officer production goal by the time this year's entering students graduated.

"Back in the '60s, when we had all kinds of demonstrations about things on campuses, ROTC did take a beating," said Air Force spokesman Capt. Richard Howland. "We were the military representatives on campus at that time. We were the symbol . . .

"I really don't believe they were against ROTC per se. They were against what the military was doing. Those (student) leaders are all gone now. They've graduated and gotten good jobs in the community."

With all the turmoil, only 14 colleges dropped ROTC completely. Enrollment plummeted at other campuses for a variety of reasons, not all of them political, said Maj. Gen. Charles C. Rogers, Army chief of staff

The generation of students now entering college, students who were in junior high school when campus protest peaked in the late 1960s, have apparently not inherited the attitudes towards ROTC that permeated some colleges during the last decade.

The six schools where ROTC programs will be ended this year are the University of Maryland-Eastern Shore (UMES), De Paul University in Chicago, Tulane University in New Orleans, the Potomac State College campus of the University of West Virginia, the Waterbury Branch of the Universtiy of Connecticut and the University of Alaska.

The taint of Vietnam still seems to shadow ROTC for the older students at those schools. Only 18 juniors and seniors at UMES took ROTC this year, for example; only 15 did at De Paul and fewer than 20 from West Virginia did.

For younger students, though, ROTC may be less a political issue than simply one more alternative in their educations. There were 44 freshmen and sophomores at UMES who took ROTC this year. Sixty-four underclassmen at De Paul signed up and 63 at West Virginia, according to spokesmen on those campuses.

Officials contacted at universities that will lose their ROTC program this year were unhappy about the prospect. "As the decision is now handed down, there seems not to be any option," said Earl Richland, executive assistant to the UMES chancellor.

"But in our business, you never accept that, we are now appealing to our congressmen."

Major Gen. Charles C. Rogers, Army chief of staff for ROTC, cited three reasons for the new interest in the program.

The first, he said, is the ending of the Vietnam conflict, which "made the program unpopular."

Equally important, he said, is the role of the military as an employer, particularly during times of high unemployment. "The military, of course, is a great employer," Rogers said. "Starting off as a young second lieutenant, at about $12,000 and starting off as a boss" is a good position for a young person entering today's job market. "Anybody who is conpetent in leading and managing resources is going to find himself employable."

The third reason was last year's Bicentennial celebration, which brought "a tingle of patriotism" to colleges, Rogers said.

This year, 5,200 college graduates began four-year terms as Army officers after completing ROTC programs. Rogers said he has been directed to increase the number of ROTC graduates to 10,000 by the 1980-81 school year, in order to replenish the Army and National Guard reserve stock of officers.