"Whatever it is, it's not sex," says Irving Wallace, trying to pin down his formula for success.

It's an odd disclaimer for the 64-year-old writer whose latest novel deals with the sex life of a president's wife. Still, "I don't think there is any secret" to writing a best seller. "If there was, we could all learn it and become millionaires," says the millionaire author who produces best sellers the way an apple tree produces apples.

"In my case," he says, "it's that I like a story. The writing can be good or not, but you have to make me want to turn that page. Most young writers run into trouble because they start with ordianry ideas. You can live with bad writing today, if you have an orginial idea. Then the problem is getting people to swallow it."

The latest idea Wallace wants us to swallow is "The Second Lady," his 12th novel, about the kidnapping and sexual proclivities of a fictional first lady. Likely to become his 11th best seller, it has more than 120,000 hardcover copies published so far and is expected to raise the number of Wallace books in print to more than 140 million. Besides novels, these include "The People's Almanac," "The Book of Lists" and other nonfiction epics in which he has collaborated with his wife Sylvia, his son, David Wallechinsky, and other family members. For his latest novel, Wallace has left his home and swimming pool in Brentwood, near Los Angeles -- although he believes that "a writer's place is in his home."

He has some misgivings about his first major publicity effort in 11 years.

"I don't enjoy it," he says. "I did the "Today' show half awake. I'm a night person. I usually go to bed at about 4 a.m., which meant that I had to get up for that show with about an hour's sleep."

In spite of a jet lab and a heavy schedule, gray hair and a deeply lined face, Wallace's compact frame radiates energy. He bustles around his hotel suite as he talks, playing the host, pouring a glass of soda and dropping in ice cubes. He smiles frequently (most of the lines in his face follow the contours of a smile), and gestures to emphasize an occasional point. f

"In the electonic media, you have to be a performer," says Wallace, who has performed spectacularly at the bookstores with best sellers such as "The Chapman Report" (about a sex survey a la Kinsey), "The Seven Minutes" (about a book being tried for obscenity), "The Word" (about what happens when the manuscript of a new Gospel is discovered), "The Fan Club" (about the abduction and rape of a movie star) and, most recently, "The Second Lady."

Critics have accused Wallace of getting his ideas from the headlines, but he says that writing and publishing a novel takes too long for headlines to be helpful: "If you're lucky, a headline comes along right after you've written a book."

Sometimes they have. For example, "The Prize," which looks behind the scenes at the awarding of the Nobel Prize. "I put heart transplants in that book after the experts told me it was impossible. I used the idea of freezing sperm, which they said could not be done, and a couple of years later the sperm banks began to open. To write novels from the headlines, you have to be able to read the headlines three or four years ahead."

The last time Wallace did a big media tour, including television, was in 1969, for "The Seven Minutes." This time, he's doing it to help his new publisher, New American Library, which has been publishing paperbacks for a long time but is starting a new hardcover line."They bid $1.5 million for the book at auction, they they begged me to do a tour," says Wallace.

He made the switch to NAL last year because, "I got tired of Simon & Schuster.It's become a subsidiary of Gulf and Western, and I don't know anybody there any more."

The current trend toward acquisitions and mergers in publishing is "a thing we all fear," says Wallace. "A few conglomerates are buying one of the few remaining outlets in the world for dissent."

Wallace has ridden out several revolutions in the industry, including the paperback revolution. When he began writing, the hardcover publisher would normally sell the paperback rights to a book and split the proceeds with the writer, then rent the plates to the paperback publisher, saving him the cost of typesetting. Now, paperback publishers dominate the market. Sometimes a hardcover and paperback house pool their assets to bid jointly for a book, and sometimes the author's agent auctions off the various rights separately. Whatever the arrangement, the edition that sells in the millions isn't Knopf or Viking or Doubleday; it's Bantam or Dell or Ballantine or New American Library.

Wallace was there from the start: "Ian Fleming and I were the first two to be offered 100 percent of the paperback rights by a publisher -- it was a paperback publisher starting a new hardcover line. Fleming said yes and I said no. He was right. At that time, I still thought the publisher's name on a book mattered. It doesn't.

"I missed on that deal, but I was one of the first to recognize the ascendance of paperbacks over hardcovers, and it ruined my friendship with Alfred Knopf. Instead of going to Knopf with one of my books, I went to Victor, Weybright at New American Library, and I told him, 'You buy the book and you sell the hardcover rights.' Knopf was furious. Now, of course, the publishers work together. You get a company that owns hardcover and paperback houses, and they will overinvest in buying and advertising the hardcover just to promote the paperback."

Wallace is currently trying another new wrinkle: using an agent who is not based in the United States.

"It began when I decided to get a new agent in Europe, rather than let American publishers handle the foreign rights. I picked a man in a London, Ed Victor. He was the best I could find, and the time zones work just right. I'm still awake in California at 3 a.m. when he's just coming into his office in London."

Victor is presently negotiating the foreign rights to "The Second Lady," and the idea of a movie version has started a major fit of buzzing in Hollywood, just down the street from Wallace's home. That's because the woman who gets the title role will get to play two juicy parts: Billie Bradford, the first lady of the United States, and Vera Vavilova, the look-alike KGB agent who is substituted for her after she is kidnapped in Moscow. Both have lovemaking scenes, which are not numerous in the book but very steamily detailed when they occur. The first lady in the novel is a Democrat -- as Wallace was.

"I used to be a Democrat," he says. "I don't know what the hell I am, now. I'm into politics. I got into it because of Vietnam. We had Gene McCarthy over to our house when he was running. A lot of friends came, and there was a lot of feeling for him. This year, I invited Anderson . . . He's a nice man -- but I don't know." t

Another thing Wallace doesn't know is what the White House reaction to his new novel will be, and he won't find out from Mary Hoyt, the first lady's press secretary, whose counterpart in the novel has an affair with a speechwriter. "If you'll excuse the pun," she said after looking through the novel, "I've not been intimately enough involved in my work to comment. Nor, as press secretary to the first lady, am I dumb enough to ask her what she thinks about Mr. Wallace's behind-the-scenes fantasies!"

Wallace has been behind the scenes at the White House before. In 1963, he recalls, he was doing research for "The Man" (about the impeachment of the first black president) and Pierre Salinger offered him a tour of the White House as part of his research. That wasn't enough for Wallace. "I told him, 'I want to be the president for about 10 days. I want to see the bedrooms, what's lying around the place, and how he spends his day.' When John Kennedy heard about it, he laughed and said, 'Let him come up to the Oval Office every day while I'm taking my nap,' so I was popping in and out of the White House for 10 days.

"I remember telling a Secret Service agent about a particular spot in the White House where I was planning to have an assassination attempt in the novel, and he groaned: 'Every time one of you guys writes an assassination scene, we have to read it.'

"When my research was finished, I was offered a seat on the press plane for the president's trip to Houston and Dallas, but I turned it down and went home. Since then, I've checked back a few times to see what has been changed."

Research has always been a significant part of the Wallace approach to fiction, and in the last few years it has become the basic ingredient of "The People's Almanac" and many spinoffs, a publishing cottage industry which he runs with Sylvia (his wife since 1941), David (his son, who originated the idea) and Amy (his daughter, who has published a book on psychic healing besides contributing to the family enterprise). But "We aren't a conglomerate," Wallace says. "We're four very autonomous individuals having fun together. We enjoy sitting around and talking about book ideas, and it's good for me. Writing fiction is a very lonely kind of work. These books are more relaxing than a novel, and your research isn't far from your writing."

The original idea was that Irving would be the only writer in the Wallace family, he says, but "call it heredity or call it environment, it didn't work out that way. Sylvia was a writer when I met her -- very beautiful and very bright and too scared to write a novel. Instead, she has helped me to edit my novels -- and now she has an editing job besides her work on 'The People's Almanac,' 'The Book of Lists' and all our other family-produced books.

"The kids grew up very hip about the publishing business -- they know all about the meaning of an advertising budget. Sylvia didn't want David to compete with his father, so when he was growing up she tried to steer him away from writing. He studied law, and he went into films and then he made it as a writer on his own with 'What Really Happened to the Class of 1965,' and I couldn't have been happier."

For enterprises related to "The People's Almanac," he says, the Wallaces "have accumulated a library of 33,000 books in two buildings with 16 full-time employes: two secretaries, two librarians and the rest researchers." fUpcoming from this complex are another "People's Almanac" (smaller and priced for mass distribution: "We're thinking of doing smaller almanacs and producing them every two years instead of every three," says Wallace) and a blockbuster called "The People's Almanac Presents 'The Book of Predictions'" ("We got leading people around the world to predict the future -- we paid them for it.")

But the major production in the works is due next May: "Intimate Sex Lives of Famous People." Wallace is obviously delighted about the book.

"We really got into it while we were working on 'Lists,' studying the quirks of famous people," he says. "One thing that we discovered is that the definitive biographies usually aren't definitive. They're success stories and they tend to leave out a lot of interesting material. All four of us worked on it, and we have produced articles about 220 famous people throughout history, right up to Elvis Presley and Henry Miller -- about 1,000 to 1,500 words on each. We tried to be nice, and we didn't have to go too hard on anyone. But, for example, we mention that Milton Berle once had an affair with Aimee Semple McPherson -- he was very young at the time. We have the sex lives of Jack Johnson and Mata Hari and Clark Gable, who was not a great lover off the screen. We talked to a woman who had an affair with Gable, and she said that he was not really very good, and she would lie there being slightly bored. 'But then,' she said, 'I would open my eyes and think, Oh my God, it's Clark Gable.' "

He wanders on, through pet names applied to sex organs by such luminaries as Lord Byron and Horatio Nelson, Oscar Wilde's comment that a woman with whom he tried to go straight was "Like cold mutton" and the well-publicized foibles of Charlie Chaplin and Errol Flynn.

"James Joyce was a madman in his letters to his wife," he says. "We had to cut them down. I was afraid we couldn't handle them in our book." He adds that "we will have a minimum of one picture per person, including some very good ones: Havelock Ellis taking a nude sunbath, for example, and Jean Harlow nude on a sofa."