There have been studies , investigating the relationship between autism spectrum conditions (ASCs) and mathematical or scientific ability. In the first study, Baron-Cohen et al (2007) examined 378 undergraduate mathematics students with 414 students from other disciplines (medicine, law, social science). There was a ninefold increase in the rates of autism in the mathematics group compared to the control group (seven cases of autism 1.85% in the math group vs one case of autism 0.24% in the control group).
There is some evidence that seem to indicate that individuals with higher mathematical ability might have more autistic traits. Baron-Cohen has suggested that there is an empathizing–systemizing difference where empathy is mutually exclusive to systematizing or conceptualization but this is hotly contested .
So what is the relationship between mathematical ability and autism?
(The distinction between postgrad and undergrad maths is discussed in another question - Is there any evidence for the distinction between undergrad and postgrad mathematics?)
 Baron-Cohen, Simon, Sally Wheelwright, Amy Burtenshaw, and Esther Hobson. "Mathematical talent is linked to autism." Human nature 18, no. 2 (2007): 125-131.
 Baron-Cohen, Simon, Sally Wheelwright, Richard Skinner, Joanne Martin, and Emma Clubley. "The autism-spectrum quotient (AQ): Evidence from Asperger syndrome/high-functioning autism, males and females, scientists and mathematicians." Journal of autism and developmental disorders 31, no. 1 (2001): 5-17.
 Baron-Cohen, S. (2009). The empathising-systemising theory of autism: Implications for education. Tizard Learning Disability Review, 14, 4–13. https://doi.org/10.1108/13595474200900022