Numerical Brain Teasers
Exercise Your Mind
by Erica Sadun
Version: P1.0 (January 2023)
Copyright 2023 The Pragmatic Programmers, LLC. This book is licensed to the individual who purchased it. We don't copy-protect it because that would limit your ability to use it for your own purposes. Please don't break this trustyou can use this across all of your devices but please do not share this copy with other members of your team, with friends, or via file sharing services. Thanks.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and The Pragmatic Programmers, LLC was aware of a trademark claim, the designations have been printed in initial capital letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic Programmer, Pragmatic Programming, Pragmatic Bookshelf and the linking g device are trademarks of The Pragmatic Programmers, LLC.
Every precaution was taken in the preparation of this book. However, the publisher assumes no responsibility for errors or omissions, or for damages that may result from the use of information (including program listings) contained herein.
About the Pragmatic Bookshelf
The Pragmatic Bookshelf is an agile publishing company. Were here because we want to improve the lives of developers. We do this by creating timely, practical titles, written by programmers for programmers.
Our Pragmatic courses, workshops, and other products can help you and your team create better software and have more fun. For more information, as well as the latest Pragmatic titles, please visit us at http://pragprog.com.
Our ebooks do not contain any Digital Restrictions Management, and have always been DRM-free. We pioneered the beta book concept, where you can purchase and read a book while its still being written, and provide feedback to the author to help make a better book for everyone. Free resources for all purchasers include source code downloads (if applicable), errata and discussion forums, all available on the book's home page at pragprog.com. Were here to make your life easier.
New Book Announcements
Want to keep up on our latest titles and announcements, and occasional special offers? Just create an account on pragprog.com (an email address and a password is all it takes) and select the checkbox to receive newsletters. You can also follow us on twitter as @pragprog.
About Ebook Formats
If you buy directly from pragprog.com, you get ebooks in all available formats for one price. You can synch your ebooks amongst all your devices (including iPhone/iPad, Android, laptops, etc.) via Dropbox. You get free updates for the life of the edition. And, of course, you can always come back and re-download your books when needed. Ebooks bought from the Amazon Kindle store are subject to Amazon's polices. Limitations in Amazon's file format may cause ebooks to display differently on different devices. For more information, please see our FAQ at pragprog.com/#about-ebooks. To learn more about this book and access the free resources, go to https://pragprog.com/book/esbrain, the book's homepage.
Thanks for your continued support,
The Pragmatic Bookshelf
The team that produced this book includes: Dave Rankin (CEO) Janet Furlow (COO) Tammy Coron (Managing Editor) Brian MacDonald (Development Editor) L. Sakhi MacMillan (Copy Editor) Potomac Indexing, LLC (Indexing) Gilson Graphics (Layout) Andy Hunt and Dave Thomas (Founders)
For customer support, please contact .
For international rights, please contact .
Table of Contents
Copyright 2023, The Pragmatic Bookshelf.
Early Praise for Numerical Brain Teasers
Enhance your numerical skills while enjoying pitting your wits against deceptively simple puzzles. I like the short descriptions of how the puzzles arose, and occasional hints of deeper mathematics lurking just below the surface. Engaging, attractive, and tremendous fun. Educational, too!
Ian Stewart |
Emeritus Professor of Mathematics, University of Warwick |
These were fun to solve one by one, but the real fun was in writing solvers for each class of problem.
Ricardo Signes |
CTO, Fastmail |
A delicious way of wasting timewhich makes it not a waste at all.
Jon Skeet |
International Author and Speaker |
I was skeptical at first, but this book really has my number.
Jill Rouleau |
Ansible Cloud Architect |
Thirty seconds after opening this book I was scribbling on a scratch pad to work on these crunchy puzzles. Irresistable!
Mike Pope |
Technical Writer and Editor |
This is a wonderful collection of math puzzles, some traditional, others new. Theres plenty here to challenge the most seasoned puzzle solver.
Walt Mankowski |
Senior Data Analyst, University of Pennsylvania |
Acknowledgments
Thank you to all the subscribers of the @pragprog Twitter account who made this book possible by viewing, liking, and interacting with my puzzle tweets. Its been so much fun creating and sharing these brain teasers with you and Im grateful to have an audience thats as excited about them as I am.
Thank you, as well, to my development editor, Brian MacDonald, who knows the difference between Spidermen and Spider-Men and is willing to put up with my quirky authorship.
Thank you to my technical reviewers, who graciously put in the time working through my puzzles, my logic, and my storytelling to make sure I was as accurate as possible. All mistakes are my own. Many of my correct statements are due to them. Specifically, thank you to Frances Buontempo, Trevor Burnham, Zulfikar Dharmawan, Michael Fazio, Derek Graham, Andy Lester, Daivid Morgan, Jason Pike, Karl Stolley, and Roman Zabicki.
Additional thanks to Dave Rankin, Pragmatic CEO, and the one who said, Why dont you put those puzzle things all together in a book? I did and thats why this book exists.
To my husband and children, I can only do this because you make it possible. Thank you all for being yourselves and enriching my life.
Copyright 2023, The Pragmatic Bookshelf.
Introduction
I have always loved puzzles. From the time I was a child, my extended family surrounded me with them. They would put aside clippings from newspapers for us kids and indulge us with small books of collected puzzles. Recently, my dad was under the weather. I sent him a family care package: some snacks and a book of word-find puzzles.
Theres something comforting about engaging the mind. Each solution brings diversion and, possibly, a dash of endorphins or some other brain chemical, helping lift you up as you conquer every challenge. Theyre a wonderful way to get your brain going when youre starting work, to divert you during a short break, or to help you transition back to normal life when your workday ends.
A good puzzle has a bit of crunch to it. It challenges, rewards, and then allows you to move on with life, having entertained yourself or learned something. Puzzles are momentary delights. My best-selling iOS apps were built around number-, word-, and logic-puzzles.
This book collects styles of number-based puzzles. Its full of quick brain-teasing games. Its a mix of puzzles and storytelling so I can share my delight of these numeric conundrums with you.