Abstract
At one time, when the famous mathematician Carl Friedrich Gauss was in primary school, his teacher asked the pupils to add all the integers from 1 to 100 (or, at least, that’s the most common version of the story). No doubt, the teacher expected this to occupy his students for a while, but Gauss produced the result almost immediately. This might seem to require lightning-fast mental arithmetic, but the truth is, the actual calculation needed is quite simple; the trick is really understanding the problem.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Agrawal, M., Kayal, N., and Saxena, N. (2004). PRIMES is in P. The Annals of Mathematics, 160(2):781–793.
Akra, M. and Bazzi, L. (1998). On the solution of linear recurrence equations. Computational Optimization and Applications, 10(2):195–210.
Benjamin, A. T. and Quinn, J. (2003). Proofs that Really Count: The Art of Combinatorial Proof. The Mathematical Association of America.
Graham, R. L., Knuth, D. E., and Patashnik, O. (1994). Concrete Mathematics: A Foundation for Computer Science. Addison-Wesley Professional, second edition.
Rights and permissions
Copyright information
© 2010 by Magnus Lie Hetland
About this chapter
Cite this chapter
Hetland, M.L. (2010). Counting 101. In: Python Algorithms: Mastering Basic Algorithms in the Python Language. Apress. https://doi.org/10.1007/978-1-4302-3238-4_3
Download citation
DOI: https://doi.org/10.1007/978-1-4302-3238-4_3
Publisher Name: Apress
Print ISBN: 978-1-4302-3237-7
Online ISBN: 978-1-4302-3238-4
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)