Someone must have been telling the truth about T. Because he is a 13-year-old mathematical genius, T. is summoned from St. Alban's School to the Smithsonian Institution on the fine morning of Good Friday, 1939.

There, at the opening of Gore Vidal's phantasmagoric new novel, "The Smithsonian Institution," T. enters a cock-eyed world where the exhibitions come to life when the building is closed, where scientists have scanning machines that can see into the past and the future, and where the chief director, an addled version of Abe Lincoln, reads and weeps over Carl Sandburg in the hope of understanding his presidency. "Be careful," says one of the guards to T. "Things ain't always what they seem around here."Things may all seem confusingly whimsical at first, as T. is greeted by a gossipy Mrs. Benjamin Harrison, then nearly eaten for dinner by cannibalistic Iroquois Indians and finally seduced by a sex-starved squaw who turns out to be Mrs. Grover Cleveland. It is as if the author of "Burr," "1876" and "Lincoln" had overdosed on "Myra Breckinridge."

Yet there is a design in the apparent chaos. "War clouds are gathering over Europe," the narrative keeps repeating, as if to mock the sort of language that implies humans aren't at fault. While flunking a boring algebra test, T. has made doodles that reveal him to be "a master of quantum physics," starting with E equals MC2 and "going on to E equals MC2 to the enth degree."

As T. tells the directors of the institution, "he had an unusual knack for turning numbers into pictures that he could study in his head as actions set off reactions."

As the narrative describes it: "Somehow the thought of light being electromagnetic radiation made a brilliant symmetrical picture in his brain, and then he saw how it was done - with more numbers and then more energy and the atom itself could be broken to create further energy. He could also visualize a way to stop the chain reaction."

When J. Robert Oppenheimer learns of this, he wants to have a serious talk with T. "Well, you really are the prodigy they say you are," he says.

Here the plot, already thick, twists itself into a pretzel, and Vidal does astonishing work just keeping us oriented in his hall of see-through mirrors. T. develops qualms about helping to create the bomb.

Moreover, at a military exhibition he encounters a wax figure he recognizes as his future self and learns that he will die (has died) in battle on March 1, 1945. He feels he must somehow stop the coming war. This presents him with two new problems to solve: how to travel back in time and alter history, and how to pick the precise event to alter.

Despite its seeming zaniness, "The Smithsonian Institution" is appealing in several ways. First, there is the simple suspense of T.'s adventure: Will finding the right past to change really make a difference? Then there is the science-fictional illusion that Vidal successfully creates. Despite a certain amount of mumbo-jumbo, you come to believe in the novel's world of intersecting realities, where all time collapses into a quantum present and individuals meet different versions of themselves along the space-time continuum.

Then there is the vehicle Vidal has built for his commentary on American history, which you may bristle at or cheer, depending on your temperament. Off and on throughout the story, T. mixes with all the presidents and their first ladies. Cleveland is reading Allan Nevins' biography of himself and finding it splendid despite "a lot of mistakes." Lincoln rambles on, misquoting himself.

Although still alive, Franklin D. Roosevelt pays a visit and defends his imperial motives in fighting World War II, especially when George Washington insists that the Japanese were provoked to bomb Pearl Harbor. Jefferson, sounding, "to T.'s ear, just like the English actor Ronald Colman in `Lost Horizon,' " debates Polk.

"We are Rome, indeed," T. concludes. "And our Athens is long dead." Historical joke is piled upon historical joke, none of which will be told here for fear of giving away too much of the plot.

Finally, there is the puzzle of T.'s identity. He himself offers one explanation when he leads Oppenheimer to conclude that he nicknamed himself for "the T. that reverses the direction of motion of all particles," for "Time itself."