Kim Peek, one of Utah's most celebrated and unusual citizens, died Saturday at the age of 58 from an apparent heart attack.

Kim first leapt into the national and then international spotlight 21 years ago when he was acknowledged as one of the primary inspirations for Dustin Hoffman's character in that year's hit movie, "Rain Man," about a savant.

A savant is an eminent scholar. Scientists and researchers called Kim a "mega-savant" because of his phenomenal knowledge in 15 broad categories, including math, literature, sports, classical music, history and geography. His brain was a literal file cabinet, his prodigious memory photographic, and he stored everything from ZIP codes and road maps, military commanders, a perpetual calendar, every tidbit of sports minutiae he ever read and more. He memorized the Bible, the Book of Mormon, and Doctrine and Covenants in their entirety, along with more than 12,000 other books, his dad said.

But unlike a file cabinet you rifle through to find a folder, he had instant recall and could dazzle audiences as he answered their questions on almost any topic. An acquaintance could name a date and he could rattle off day of the week it fell on and quite possibly recite other historical events that occurred that day, if those facts had caught his fancy. For many years, Kim kept the payroll for a center that served people who had disabilities, doing all the calculations in his head.

But born with no connective tissue to bring the left and right sides of his brain together, he was unable to filter information and often had to twist a cord or hum to himself so he could block out distractions. And simple tasks like dressing himself or setting the table eluded him. His father, Fran Peek, said Kim was 16 before he mastered stairs.

Most surprising to many of the scientists who studied the workings and anatomy of his brain, including researchers from NASA, was the fact that he just kept learning as he got older. In recent years, Fran Peek said Kim learned to play the piano and to tell jokes — unexpected because he had always been very literal.

Much of what scientists learned about Kim came in recent years and they on occasion revised what they believed about him. For example, they discovered he was not autistic. Scientists also learned that Kim could hold a book within eight inches of his face and read the left page with his left eye, the right with his right eye at the same time. He devoured books that way.

One of Kim's favorite locations on Earth — he and his dad traveled just shy of 3 million miles and talked to nearly 60 million people worldwide — was the public library in Salt Lake City, where he amused himself by memorizing phone books and Cole directories. He also loved to pore over maps and if someone named a city, he'd list businesses, area codes, ZIP codes and historical data.

Kim and his dad first met screenwriter Barry Morrow at a convention in the '80s and within two years Morrow had written and sold the script for "Rain Man." To prepare for the role, Hoffman spent time with Kim and with other savants. Morrow later gave Kim the Oscar he won for Best Screenplay and Kim carried it with him on his travels.

Kim was the subject of 22 documentaries and more than 4,000 articles, as well as two books by his father. Readers responded to a recent profile in the Deseret News with dozens of fond recollections of his visits to local schools and service clubs. Monday, blogs lamented the death of a man who was both affectionate and who did everything his own unique way, whether he was "playing" with you by reciting related items and waiting to see if you could find the connection ("They're all on 17th Street in Idaho Falls," he'd say) or presenting you with only the violin's part in a musical composition.

Kim is survived by his father, Fran, his mother, Jeanne Willey Peek Buchi, and siblings Brian Peek and Alison Peek. His funeral will be Dec. 29, but arrangements are being finalized through Larkin Mortuary.

e-mail: lois@desnews.com