Recognising a good idea when he sees one, William Stein has put the source code to his Springer-published undergraduate textbook Elementary Number Theory: Primes, Congruences, and Secrets: A Computational Approach on GitHub.
The book introduces classical elementary number theory and elliptic curves, with lots of Sage code to encourage you to play around with the structures involved. If you want a physical copy, you can still get one from Springer-Verlag for £29.99.
If you don’t already know Stein, he’s the director of the Sage project to create a viable open source alternative to software such as Mathematica and Maple. At the moment he’s working on cloud.sagemath.com, a browser-based Sage environment hosted in the cloud. I think it’s pretty good!
Get the source code: Elementary Number Theory: Primes, Congruences, and Secrets on GitHub.
Announced by William Stein on Google+.
Requesting the entire book as pdf gets an error message. (It’s too big.)
That error message is GitHub saying it won’t display the file in the current page. Clicking the “View Raw” link gets you the pdf.
Stein has put books on github before (and even before HoTT I think), such as this one https://github.com/williamstein/rh/.