Number theoretical feats of some mathematicians like Ramanujan remain a mystery for those believing that brain is a classical computer. Also the ability of idiot savants - lacking even the idea about what prime is - to factorize integers to primes challenges the idea that an algorithm is involved. In this article I discuss ideas about how various arithmetical feats such as partitioning integer to a sum of integers and to a product of prime factors might take place. The ideas are inspired by the number theoretic vision about TGD suggesting that basic arithmetics might be realized as naturally occurring processes at quantum level and the outcomes might be "sensorily perceived". One can also ask whether zero energy ontology (ZEO) could allow to perform quantum computations in polynomial instead of exponential time.
The indian mathematician Srinivasa Ramanujan is perhaps the most well-known example about a mathematician with miraculous gifts. He told immediately answers to difficult mathematical questions - ordinary mortals had to to hard computational work to check that the answer was right. Many of the extremely intricate mathematical formulas of Ramanujan have been proved much later by using advanced number theory. Ramanujan told that he got the answers from his personal Goddess. A possible TGD based explanation of this feat relies on the idea that in zero energy ontology (ZEO) quantum computation like activity could consist of steps consisting quantum computation and its time reversal with long-lasting part of each step performed in reverse time direction at opposite boundary of causal diamond so that the net time used would be short at second boundary.
The adelic picture about state function reduction in ZEO suggests that it might be possible to have direct sensory experience about prime factorization of integers (see this). What about partitions of integers to sums of primes? For years ago I proposed that symplectic QFT is an essential part of TGD. The basic observation was that one can assign to polygons of partonic 2-surface - say geodesic triangles - Kähler magnetic fluxes defining symplectic invariance identifiable as zero modes. This assignment makes sense also for string world sheets and gives rise to what is usually called Abelian Wilson line. I could not specify at that time how to select these polygons. A very natural manner to fix the vertices of polygon (or polygons) is to assume that they correspond ends of fermion lines which appear as boundaries of string world sheets. The polygons would be fixed rather uniquely by requiring that fermions reside at their vertices.
The number 1 is the only prime for addition so that the analog of prime factorization for sum is not of much use. Polygons with n=3,4,5 vertices are special in that one cannot decompose them to non-degenerate polygons. Non-degenerate polygons also represent integers n>2. This inspires the idea about numbers 3,4,5 as "additive primes" for integers n>2 representable as non-degenerate polygons. These polygons could be associated many-fermion states with negentropic entanglement (NE) - this notion relate to cognition and conscious information and is something totally new from standard physics point of view. This inspires also a conjecture about a deep connection with arithmetic consciousness: polygons would define conscious representations for integers n>2. The splicings of polygons to smaller ones could be dynamical quantum processes behind arithmetic conscious processes involving addition.
For details see the chapter Unified Number Theoretical Vision or the article Number Theoretical Feats and TGD Inspired Theory of Consciousness.