Savant syndrome is a rare, but extraordinary, condition in which persons with serious mental disabilities, including autistic disorder, have some ‘island of genius’ which stands in marked, incongruous contrast to overall handicap. As many as one in 10 persons with autistic disorder have such remarkable abilities in varying degrees, although savant syndrome occurs in other developmental disabilities or in other types of central nervous system injury or disease as well. Source The savant syndrome: an extraordinary condition. A synopsis: past, present, future Philos Trans R Soc Lond B Biol Sci., 2009 May 27; 364(1522): 1351–1357.
The exceptional skills can include rapid calculation, artistic ability, map making, musical ability, calender dates etc, and are strongly associated with memory. It affects around one person per million.
There is as yet no explanation for the syndrome - either as to why it happens or as to how it happens.
Several investigators have shown that memory alone cannot fully account for savant abilities, particularly calendar calculating and musical skills.
Note: The current record for being able to recite thedigits of pi - from memory - stands at 100,000.