Articles For Educators

Lesson plans and classroom activities in the areas of mathematics, social studies, lanaguage arts, science, technology, and more.

Share with Other Teachers!

You are here: Directory > Mathematics > Fun With Numbers > Article

Mathematical Fun With Happy Numbers

When I was in high school, a friend of mine--who happened to also be a foe from a rival math team--introduced me to the concept of a Happy Number.

"A Happy Number," she said, "is a number that, if you square its digits, and add them together, and then take the result and square its digits and add them together, and keep doing that over and over again, you come down to the number 1."



Clear? Well, I didn't get what she was saying until she gave me an example. So, let's try the number 32.

32: 32 + 22 = 9 + 4 = 13
13: 12 + 32 = 1 + 9 = 10
10: 12 + 02 = 1 + 0 = 1

Ah-ha! It comes down to the number 1, so that means 32 is a Happy Number! (It also means that 13 and 10 are Happy Numbers as well, right?)



Well, that raised a question in my mind: How many times do you have to go through that cycle? What if it never comes down to 1? How will you know?

Her answer was simple: If it never comes down to 1, it will come down to 4 instead. (Presumably, that's an UN-happy number!)

So here's an example of an Unhappy Number:

25: 22 + 52 = 4 + 25 = 29
29: 22 + 92 = 4 + 81 = 85
85: 82 + 52 = 64 + 25 = 89
89: 82 + 92 = 64 + 81 = 145
145: 12 + 42 + 52 = 1 + 16 + 25 = 42
42: 42 + 22 = 16 + 4 = 20
20: 22 + 02 = 4 + 0 = 4

She was right! It came down to 4!

Do Happy Numbers have any practical application in the real world? Probably not. But there are some interesting questions and activities that are related to these numbers. Some are for advanced students, some are not. Here are some things you might want to have your students try. The first list is great for students who are struggling with addition facts and multiplication facts. The second list is for more advanced students.

Math Fact Drilling
  • Is your telephone number a happy number?
  • Is your street address a happy number?
  • What about your weight, age, height? Are they happy?
  • Find all the happy numbers between 1 and 20
  • When you're going for a ride in the car, check out the license plate numbers. Can you figure out any of them in your head? (This is a challenge, but makes a great travel game.)


Theoretical Problems
  • Are there an infinite number of happy numbers?
  • Are there an infinite number of unhappy numbers?
  • Ellen told me that every number comes down to either one or four--can you prove it? (Hint: I wrote a computer program to help me with this one.)
  • Can you find any patterns in the sequence of happy umbers?
  • Does the ratio of happy to unhappy numbers approach a limit?

Finally, I will leave you with a unique number, which is called a Happy Cube. The number is 153. Watch what happens when you do the happy number process, only cubing instead of squaring.

153: 13 + 53 + 33 = 1 + 125 + 27 = 153

As far as I know, 1 and 153 are the only numbers that behave this way--when you sum the cubes of the digits, you get the number you started with. Can you find any others?



Member Comments

Comment by Humphrey Nowlin on Feb 25, 2005
Hi there, I just got done reading your "HAPPY NUMBERS" article, and just wanted to say, you DON'T have all the happy cubes.

Of course, zero works, but that's trivial.

There are also 370, 371 and 407!

Is that all of them?
Comment by Douglas Twitchell on Feb 25, 2005
Thanks for pointing that out. I must not have actually looked for other happy cubes, because I would have done it by writing a computer program, and I wouldn't have missed any.

Is there egg on my face?

Quote
There are also 370, 371 and 407!

Is that all of them?


If no one checks this out in the next couple weeks I'll crank out a proof.

*waits with bated breath for someone else to provide a proof*
Comment by Humphrey Nowlin on Feb 25, 2005
Can you give me a suggestion on how to get started with this? If I had an idea how to begin, maybe I could figure it out myself.
Comment by Douglas Twitchell on Feb 25, 2005
Well, I would find a value X such that for all Y>X, F(Y)<X, where F(Y) is the value you get by summing the cubes of the digits of Y.

Once you've done that, you just need to write a computer program to find all happy cubes less than X, and you're done!
Comment by Humphrey Nowlin on Feb 25, 2005
Thanks!
Comment by MartynJohnston on Aug 26, 2005
I wrote something a while ago that told me that there are only 5 'Happy Cubes'.
These are 1, 153, 370, 371, and 407. It also told me I didn't need to look any higher than 2916 to determine that there weren't any more (but I can't remember why that was).
Comment by MartynJohnston on Aug 26, 2005
There are also several 'Happy (whatever you call something to the power of 4)'.
ie. when you sum the fourth power of the digits, you get the number you started with.
I reckon that 1 (of course), 1634, 8208, and 9474 are the only ones (I stopped looking beyond 33000).
Comment by MartynJohnston on Aug 26, 2005
There are also several 'Happy (whatever you call something to the power of 5)'.
ie. when you sum the fifth power of the digits, you get the number you started with.
I reckon that 1 (of course), 4150, 4151, 54748, 92727, 93084 and 194979 are the only ones (I stopped looking beyond 355,000).
Comment by MartynJohnston on Aug 26, 2005
There are also several 'Happy (whatever you call something to the power of 6)'.
ie. when you sum the sixth power of the digits, you get the number you started with.
I reckon that 1 (of course) and 548834 are the only ones (I stopped looking beyond 3,721,000).
Comment by MartynJohnston on Aug 26, 2005
I can't find any 'Happy (whatever you call something to the power of 7)'.
ie. when you sum the seventh power of the digits, you get the number you started with.
I've looked up to 4,000,000, and reckon I've got to check up to 38,263,752 to prove whether there are any or not.
Comment by MartynJohnston on Aug 26, 2005
I just found a Happy Seventh Power thing.
4,210,818 seems to work.
ie. when you sum the seventh power of the digits, you get the number you started with.
Are there any others ?
Comment by Michael Dehmlow on Nov 4, 2005
1,1741725,9800817,9926315,14459929
Comment by Douglas Twitchell on Nov 16, 2005
wow! You guys have been busy! Thanks for those posts. Martyn, there was a problem with the forum the day you posted those, and several of your posts got lost...but they're all back now.

Thanks again.
Comment by Douglas Twitchell on Jan 18, 2014
To the best of my knowledge there is not a simple pattern, which is why I wrote a computer program to do it for me!

Submit a comment

Please keep comments courteous and on-topic. All comments are moderated by the article author.


Returning Member

Username


Password



Remember me

New Member

Email Address


Username


Password


Confirm Password


  

Common Destinations

Click an icon below for some of the commonly accessed pages at Articles for Educators
Click here to read questions submitted by other teachers, and help them out from your own experiences.
Write up a lesson plan, or just a paragraph or two about your favorite teaching trick.
Articles for Educators provides high quality resources for teachers, administrators and students.

Resource Search


Keep in Touch

It's easy to stay up-to-date; just Like us on Facebook!