Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Happy number
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Numbers with a certain property involving recursive summation}} {{distinguish|text=[[Harshad number]] (derived from Sanskrit ''harśa'' meaning "great joy")}} {{Use dmy dates|date=October 2020}} [[File:DessinArbreHeureux01.png|thumb|Tree showing all happy numbers up to 100, with 130 seen with 13 and 31]] In [[number theory]], a '''happy number''' is a number which eventually reaches 1 when the number is replaced by the sum of the square of each digit. For instance, 13 is a happy number because <math>1^2+3^2=10</math>, and <math>1^2+0^2=1</math>. On the other hand, 4 is not a happy number because the sequence starting with <math>4^2=16</math> and <math>1^2+6^2=37</math> eventually reaches <math>2^2+0^2=4</math>, the number that started the sequence, and so the process continues in an infinite cycle without ever reaching 1. A number which is not happy is called '''sad''' or '''unhappy'''. More generally, a <math>b</math>-'''happy number''' is a [[natural number]] in a given [[number base]] <math>b</math> that eventually reaches 1 when iterated over the [[Perfect digital invariant|perfect digital invariant function]] for <math>p = 2</math>.<ref>{{cite web|url=http://mathworld.wolfram.com/SadNumber.html|title=Sad Number|publisher=Wolfram Research, Inc.|access-date=2009-09-16}}</ref> The origin of happy numbers is not clear. Happy numbers were brought to the attention of [[Reg Allenby]] (a British author and senior lecturer in [[pure mathematics]] at [[Leeds University]]) by his daughter, who had learned of them at school. However, they "may have originated in Russia" {{harvcol|Guy|2004|p=§E34}}.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)