The present research offers a set of data aiming to clarify the relationship among neuropsychological aspects and difficulties / easiness in school mathematics activities shown by children with educational special needs. Two neurological-developmental conditions were compared: epilepsy, commonly related to difficulties in mathematical learning at school, and high academic abilities shown by gifted children, commonly related to school success in mathematics. All children taking part in the present research can be characterized as having peculiar cognitive traits, specially in attention, cognitive flexibility and visuospaciality, all of them having influence in their mathematical activity at school. Nevertheless, we discuss here the aids these children benefited from "cultural prosthesis", and we propose that both neuropsychological and sociocultural aspects should be taken into account in planning classroom mathematical activities addressed to children with educational special needs.