Hacker News new | comments | ask | show | jobs | submit login
An Illustrated Theory of Numbers (2017) (illustratedtheoryofnumbers.com)
167 points by earthicus 33 days ago | hide | past | web | favorite | 44 comments

I hope you enjoy the book -- the AMS sale does give a great price! Part of the reason I went with the AMS was that they're a nonprofit and their prices are reasonable for a hardcover book printed (offset, not digital on-demand) in color.

As the author, I'll add a few remarks and answer some questions about the book.

1. I made a book webpage at illustratedtheoryofnumbers.com. The errata are there. Also you can find a series of programming tutorials, if you wish to learn number theory with Python. I go from programming basics to primality-testing, RSA, etc.

2. I didn't provide solutions in the book. :( But there's always online discussion boards. Someday I'll write many more exercises and provide some solutions.

3. It's been used as a textbook for undergraduate number theory, e.g. at Rice, UC San Diego, next semester at Georgia Tech I think, etc.

4. No full e-book version is planned. It's all very old-fashioned, but I spent a lot of time on page layout, optimizing for print, etc.

5. I took a stronger stance on zero being a natural number in an early draft. Now I just try to make it clear that it's the convention I choose. If it's good for Bourbaki, it's good for me.

Feel free to drop a note if you have more questions about the book. My email is not hard to find.

Happy holidays! Marty Weissman

I’m apprecticative of the amount of work and effort you put into the book. Please consider the self-learner and those that don’t have access to solutions, a classmate, a TA, or a professor.

I know you probably don’t want to expose solutions to the exercises so they can be used in a classroom, but for people like me, I don’t want to create an online discussion to every problem I attempt just to check my work.

I prefer to read textbooks that have solutions, so I can know for sure my answers are correct.

I don’t really buy the “you know when your solutions are correct”. The beginner can easily fool themself into thinking their solutions are correct, when they aren’t.

Due to that, I won’t be buying your book.

That's cool -- you might like Underwood Dudley's book on Elementary Number Theory. It has a similar set of topics, and I think it has more exercises and contains some solutions. And it's inexpensive!

Thanks! I’ll check that out.

>Due to that, I won’t be buying your book.

I'm on the same boat as you. I might still buy this book, it seems beautiful.

In the days of online autodidactic zeitgeists, it's a shame not to include the solutions. I understand the author wants to monetize his hard work and ensure it'll make money as a textbook and I believe textbooks can provide some income as long as they become the mainstay of a particular subjects.

That being said, I wonder if there is a future option for creating a problem/solution booklet exclusive for the teachers and opening up the solutions to this book so the entire world could possibly learn from this book.

Yes -- that is a future option. It's a time commitment, but perhaps next summer I'll post a new section on the book webpage with more exercises and solutions to existing ones. (Those who have taught with the book asked for more problems too.)

Thank you, from the sample pages it looks really interesting and beautiful, uses the printed page very well and looks like it would be a joy to hold.

The table of contents looks interesting — how did you choose which topics to cover? Were they influenced by what would be easy to illustrate? My knowledge of number theory is limited to the (very) early chapters of Burton's Elementary Number Theory or Niven & Zuckerman's book, so I'm wondering how this book differs in its choice of contents. (The presentation of course is outstanding.)

The contents kind of evolved from everything I had taught in undergraduate number theory, and a few other courses (a 2-week course for high-school students, some work with K-12 teachers, etc.). First, I wanted to cover the core topics of an elementary number theory course: Euclidean algorithm, prime decomposition, multiplicative functions, modular arithmetic, quadratic reciprocity.

Add to that Gaussian/Eisenstein integers, because they're pretty, open the door to algebraic number fields, and might help the reader understand that uniqueness of prime decomposition is not obvious.

Add to that mediant fractions and Ford circles, because they give a really nice perspective on Diophantine approximation (the only approach which really stuck with me). They're also good for future K-12 teachers to better understand fractions.

For quadratic reciprocity, I like teaching with Zolotarev's proof... so add that. (I think I'll give a more traditional proof, in an extra few pages, in a future edition.)

Finally, Conway's topographs give a beautiful approach to binary quadratic forms, which are often not taught in a first course (outside of Pell's equation). Learning and teaching Conway's approach has influenced my own research, and it's beautiful and visual. That's the last part of the book.

Thanks for stopping by! I'd like to ask a question / make a request. Unlike most of the people here, I was trained in mathematics but am just learning how to program, so I was wondering if you had any desire to expand the online algorithms material. In particular the 'generic programming' technique illustrated by Alexander Stepanov in these lectures (Four Algorithmic Journeys) [1] and book [2] caught my attention. He takes a simple number theoretic algorithm, considers what properties are required for it to work, then generalizes it and applies it in other useful and surprising cases.

For example, Stepanov starts with the problem of multiplying two integers n * m using the Ancient Egyptian Multiplication algorithm from the Rhind Papyrus (which runs in log n if i remember correctly), then observes the only property needed for the algorithm is associativity, so that it can run on any semi-group: mult(n,s) is n repetitions of the semi-group element s, using the semi-group operation. Useful and surprising applications are (1) matrix exponentiation to solve systems of linear recurrences in log n steps (no stupid Fibonacci implementation here!), and (2) encode a graph in your matrix, with elements in a tropical semi-ring, then matrix exponentiation solves shortest path. Not too bad for a 4,000 year old multiplication algorithm.

A second example is the euclidean algorithm, which he extends first to polynomials following Stevin, then to Gaussian integers, then to euclidean domains. A surprising application was to permutation algorithms managing memory.

Anyhow, I think it would be really cool if you showed these kind of applications of number-theoretic algorithms as well as the cryptography stuff. Unfortunately basically all of the modern algorithms literature seems to avoid even the tiniest hint of abstraction; it makes the subject so much harder to hold in your head! So providing a new set of examples that is more accessible than Stepanov would be doing the world a great service, i think.

[1] https://www.youtube.com/user/A9Videos/playlists

[2] https://www.amazon.com/Elements-Programming-Alexander-Stepan...

I would like to expand the programming tutorials, though I doubt I'll go as abstract as Stepanov. I do provide some discussion of algorithms that generalize, e.g. the Euclidean algorithm and Pingala's algorithm for exponentiation. But I don't present these in such a generic form.

I've got a grant application out right now... if it goes through, I'll have some funding to support expansion of programming tutorials. I'd like to include more depth in both programming and number theory. On the programming side, I'd include classes, recursion, memoization, visualization. On the number theory side, I'd include Gaussian/Eisenstein/polynomials, Pollard rho and maybe SQUFOF for factorization.

Just bought it! Looking forward. Thanks very much.

Seems like a great book, thank you!

> 4. No full e-book version is planned. It's all very old-fashioned, but I spent a lot of time on page layout, optimizing for print, etc.

It is very strange choice for a book written in 2017.

Why no full e-book version, if I may ask?

I'm submitting this beautiful book right now because the American Mathematical Society (AMS) is having a large sale, it's 40% off until the 17th. (You have to make an AMS account).

Table of contents (pdf): https://bookstore.ams.org/mbk-105/~~FreeAttachments/mbk-105-...

Sample Chapter (pdf): https://bookstore.ams.org/mbk-105/~~FreeAttachments/mbk-105-...

I presume you need to be a AMS member to get the discounted price? Creating an account with the bookstore doesn't seem to get you the sale price.

It did for me. Just click "Register" at the top of the checkout page.

It didn't appear to work for me until I hit Next and went to Checkout. Right before I entered my credit card, it had the discounted price.

It did for me.

But it has an only paper version, right?

> In some time past (long before 3000bce), a shepherd paired sheep and pebbles: as the first sheep walked by, he placed down the first pebble; the second sheep walked by and down went the second pebble. At the end of the day, the number of pebbles placed down equaled the number of sheep that walked past. Whether sheep and pebbles, or red dots and blue dots, equality of numbers is defined by pairing off.

Good one.

More concisely: sets of numbers are equivalent if there exists a bijection between them.

EDIT: Oh, the sample chapter actually mentions this exact point in a footnote. I guess I can still be clever by saying, "Sets of numbers are equivalent if they're isomorphic." :)

Does the book discuss foundations of numbers? Peano's axioms, etc. It does not look like from the contents or the sample chapter.

Nope -- I didn't take an axiomatic approach, or give a set-theoretic construction of different sets of numbers. Instead, I take basic arithmetic and algebra and properties of real numbers as a starting point. I do dwell on things like division with remainder and prime decomposition.

Looks interesting. On the page I noticed a sale price of ~$41 in red text but upon checkout it is $69. I don’t mind paying $69, but just want to confirm I’m not missing some opening sale.

Create an account by clicking "Register" at the top of the checkout page. You should then see the discounted price, at least until tomorrow (it seems the sale runs until then).


This looks great, but are solutions provided? Books like this are almost worthless for me to self-study since I don’t have access to a classroom or professors and no way to check my solutions.

It's a nice book, but I wouldn't use it for study or as a textbook. And solutions are not provided as far as I can tell. I'm afraid you're going to have a difficult time finding books which contain solutions to their problems.

Thanks. I won’t bother buying it then. Do you have any recommendations on good math books to work through on my own that have solutions floating online, so I can check my work? I’m looking for a theoretical math book to work through. Primarily looking for intro to proofs or algebra related books. But anything will do. I just want something proof-y aimed at beginners.

Polya & Velleman are classics. They're about problem solving & proof writing techniques, but won't teach you any abstract math. I've only ever heard good things but i've actually never read them myself! Some other suggestions:

Niven - The Theory of Numbers. Contains hints for some of the proof based exercises, and answers for many of the computational exercises. I used it for my undergrad course, I remember it being reasonably beginner friendly.

Pressley - Elementary Differential Geometry. Has terse answers to every exercise! The subject is a nice mixture of concrete and abstract, calculation and proofs, and there's some interesting work using differential geometry in CS via computational geometry. Also i think it's used in robotics and a few other things? This book is very beginner friendly, it will get you about 1/2 way to General Relativity.

The differential geometry book sounds awesome. Thanks!

I should probably point out the prerequisites. You need to know basic multivariable calculus, and basic matrix algebra.

I think Velleman's "How To Prove It" might be useful.

This looks great. Thanks.

LibGen appears to have instructor's manuals for several common non-honors texts, including Fraleigh and Gallian (abstract algebra), Rosen (number theory), and Bartle/Sherbert (analysis).

> I don’t have access to a classroom or professors and no way to check my solutions,

I think if I were you I'd try math.stackexchange.com.

Is there a full ebook available somewhere?

Are there sample pages available?

In this text, we declare: 0 is a natural number

It's nice that they got that right, on the first page!

Eh, I think it's fair to consider the natural numbers as either the non-negative, nonzero integers or the non-negative integers. As long as an author declared which use they intend front and center, I don't think one or the other is more "right." Very established texts and papers alternate freely between including and not including 0.

As the author says, it's a matter of taste. The author's good taste is "right" in the same sense that e.g. 0-indexed arrays are "right": it avoids problems that not including zero causes. How many elements are in the empty set? Why shouldn't the natural numbers be able to answer that question?

What is 0 minus 1? Why isn't that a natural number? Why shouldn't the nth natural number be N?

The author's own book discusses the 1st prime, in chapter 0, which begins on page 1. How is this natural?

Problem 0.4 Add the odd numbers between 1 and 30." Why would you say 1 and 30 instead of 0 and 30, since 0 is natural?

Getting hung up on notation and arguing over conventions will hold you back from learning math.

Offsets (0) and ordinals (1) aree both useful in arrays. The only thing wrong* is not saying which you mean.


You shouldn't consider offsets ("0-indexed") more valid or right than ordinals ("1-indexed"). Doing so imposes unnecessary restrictions and narrows your scope of discussion to the programming context instead of broader mathematics. You can come up with any arbitrary case where it alternatively makes sense or doesn't make sense to include 0 in the natural numbers.

If something is a matter of taste, it really doesn't make sense to say one taste is "right" over another. It's more important to define your terms and be consistent for the context you're working in.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact