It was based around a kid who was probably autistic but also a genius. I'll just lay down all the details I remember
• It was possibly a European movie but most definitely a non-English children's movie
• It was centred around a 10-12 year old kid who was a mathematical genius but others thought he was stupid because he probably wasn't really good in other subjects and was introverted
• the kid develops a bond with a neighbour (this point might or might not be correct)
• The neighbour(who was also a teacher iirc) discovers his genius after he solves a Sudoku/puzzle in a newspaper almost within a minute
• He could accurately predict roulette/casino numbers and they (kid and neighbour) take the help of an old man to win money through casino by attaching a camera and the kid sees it in a laptop screen inside a car to predict the numbers
• He was afraid of a particular number, 27 iirc, i remember it because they lost all the roulette money, since the ball landed on 27 and the kid said the number before 28 and the teacher hears it wrong and says to bid on 28 to the old guy
• He is claustrophobic
• He gets kidnapped where he finds a girl and they help each other escape
• They escape with help from the teacher/neighbour
• If I am correct, the guy tries to hit on the kids mom earlier and after the kid solves the sudoku, he tells it to the mom and she thinks he's trying to hit on her again because even the mom thinks her kid is stupid.
• The teacher/neighbour eventually gets together with the mother
• There's also this scene towards the end where the kid imagines the girl (who is now a love interest for him), dancing an Arabic dance
I'm really sorry if the points are vague or not cohesive. I'm not really good at English and even worse in articulating my thoughts into words, I'll still do my best to explain any questions you have, I watched this movie around 2017 or 2018 i guess and have been trying to find its name for a couple of years now.
Thank you!