The last “cool” thing to happen to MIT had something to do with an old cannon and Caltech. Inspiration behind the idea probably went something like, “Pythagoras’ beard, it’s brilliant! First, we utilize level 87 ninja stealth skills to infiltrate enemy lines (Pasadena, Calif.), grab enormous pieces of ancient artillery and then, in the guise of mere mortals (a moving company), abscond with the treasure, bending time and space to navigate our way back to the fortress (MIT). Then, boys, we become gods and spend forever relishing the sweet, ambrosial taste of victory!” (They let it sit there for a while. Someone took a couple of pictures.)

As glamorous as that may have been, director Robert Luketic (“Legally Blonde”) manages to find another true MIT story full of even more thrills. “21,” Luketic’s screen adaptation of Ben Mezrich’s book, “Bringing Down the House,” tells what should have been the fascinating, “factually based” story of six MIT students who use their mathematical prowess to score millions from Las Vegas casinos. But as one of the first scenes in the film establishes, the ability to count cards and use secret signals is only half as important as the ability to “dazzle” an audience. But to say that “21” is any more “dazzling” than the stale conclusion to MIT’s cannon fiasco is to make a gross overstatement.

The story begins with Ben Campbell (Jim Sturgess, “Across the Universe”) — one of those revoltingly extraordinary students whom competitive Yalies live in fear of discovering. Ben’s got a 4.0 from MIT, he’s invented a car that drives itself, he’s president of practically everything and, most importantly, he’s got gorgeous brown eyes and a tall, slender physique. Ben seems to have it all — except money. Enter shady math professor Micky Rosa (Kevin Spacey), who recognizes Ben’s mad number skills and steps in to show him a quick way of making some serious cash.

Although the film is full of fast-paced scenes featuring Las Vegas glamour, the engrossing intricacies of card counting and lots and lots of Jim Sturgess, it is also often plagued by painfully predictable situations. When heading back to Cambridge from the first Vegas scam, Ben must stuff wads of cash into his underwear in order to get it safely through airport security. But while Ben anxiously walks away from the full-body scanner, an officer suddenly turns toward Ben, an intense expression on her face. Suddenly, everything moves in slow motion; the music’s tension mounts; the camera zooms in on Ben’s petrified face and heavy breathing — and the audience sits, eyes rolling. What, the TSA is now going to provide the movie’s main tension?

Too many of these moments make most of “21” less than stimulating. We all know where the main story lines will end up: Kate Bosworth’s blond, skinny butt will get the boy; jealousy of Ben will consume the team’s former “big player;” and sooner or later, the jig will be up. But, within the last 30 minutes, unexpected twists suddenly emerge and tense moments actually manage to create suspense. The film’s intolerable first 90 minutes are — in the last few scenes — happily redeemed.