Jump to content

Talk:Happy number

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

New Comment: 4 is not Happy

[edit]

The secion, "Happy Primes" previously stated that adding 3 or 9 to 10 raised to a power always produces "Happy" numbers. However, 4 (= 100 + 3 ) is not. Further, the explanation for why 10 is Happy is flawed.

  • I restated it to:

All numbers, and therefore all primes, of the form and for n greater than 0 are Happy. To see this, note that

  • All such numbers will have at least 2 digits;
  • The first digit will always be 1 = 10n
  • The last digit will always be either 3 or 9.
  • Any other digits will always be 0 (and therefore will not contribute to the sum of squares of the digits).
    • The sequence for adding 3 is: 12 + 32 = 10 → 12 = 1
    • The sequence for adding 9 is: 12 + 92 = 82 → 64 + 4 = 68 → 100 -> 1

Explanation

[edit]

All numbers, and therefore all primes, of the form and are happy.

This original statement is incorrect for instances below 10 as follows.

  • 4 fits the case yet is not Happy. The sequence for 4 is: 4 → 16 → 37 → 58 → 89 → 145 → 42 → 20 → 4 (rinses and repeat, never progressing towards 1).
    • The originally stated rationale is, alas, flawed for numbers under 10:

note that these numbers yield values of either 12 + 02 + 02 + ... + 02 + 02 + 32 = 10 → 12 + 02 = 1

  • In this mathematically trivial case, 4 does not yield: 12 + 3, it yields simply 42.
  • The trivial case for adding 9 remains OK (as 1 + 9 = 10 → easily Happy), but the supporting statement remains inaccurate

12 + 02 + 02 + ... + 02 + 02 + 92 = 82 → 82 + 22 = 68 → 62 + 82 = 100 → 12 + 02 + 02 = 1

12 + 02 + 02 + ... + 02 + 02 + 92 = 82 → 82 + 22 = 68 → 62 + 82 = 100 → 12 + 02 + 02 = 1

old comment

[edit]

I removed the text:

It can be shown mathematically that no matter what the initial number t is, the sequence t0,t1,t2,.. will eventually settle between 1 and 163. What happens to this sequence after it is inside this interval can be estimated by a simple computation.
It turns out that the only alternative to ending up at 1 is to be stuck in the cycle
4, 16, 37, 58, 89, 145, 42, 20, 4, ...

as I couldn't find these claims in either reference, and I strongly doubt they've been proved. dbenbenn | talk 21:23, 28 Jan 2005 (UTC)

The second part is in the references. The first one I proved. I did not know on Wikpedia you must submit the proofs. What is a good way of proceeding about that? Assuming that the text fragment is accurate, and since it adds value to the article, maybe it should be left. What do you think? Oleg Alexandrov | talk 21:39, 28 Jan 2005 (UTC)
I should have given you more time to explain yourself. :) I got your message. I think, in the fragment above I said that it can be proved that things will settle between 1 to 163, and only from there on one can do some computerized checking. So, you want me to include the proof? It is not that hard.
Which reference do these facts appear in? Note that the second claim implies the first. I agree that if you can show any number eventually goes below 163, then it's simply a matter of checking those cases. dbenbenn | talk 21:48, 28 Jan 2005 (UTC)
OK, I made a mistake. In those references it was mentioned only that we either are in the cycle 4, 16, .... 4, or otherwise end up at 1.
You are right, it was not mentioned that you get stuck in 1 to 163, and what happens next.
So, I can prove that you get stuck in 1 to 163, and I had written a code to show what happens next, but that one was voted for deletion (which I think was appropriate).
So, we have 2 options. (a) Keep things the way they are now. (b) Put back the statement with the proof. What to do about the "fact" of what happens after you are between 1 to 163 I don't know. That can be checked only computationally.
Suggestions welcome. Oleg Alexandrov | talk 21:54, 28 Jan 2005 (UTC)
Are you referring to the MathWorld article? It says
"Unhappy numbers have eventually periodic sequences ... which do not reach 1 (e.g., 4, 16, 37, 58, 89, 145, 42, 20, 4, ...)."
E.g. means for example. The article does not say that unhappy numbers always end up in the 4, 16, ... cycle.
If you have a proof of this fact, I suggest that you should publish it. You're a postdoc, you need to publish papers! And once it's been peer reviewed, we can refer to it here no problem.
Additionally, I invite you to write your proof here on this talk page. I would be interested in seeing it. But I don't think it would be appropriate to include in the article until it's been peer reviewed. dbenbenn | talk 22:06, 28 Jan 2005 (UTC)
Got it! I did not know you guys are so strict about things, but that makes sense. So, let's drop it.
About the proof. The idea is quite simple. If you start with a large number, and sum the squares of its digits, then, as you might guess, what you get is much smaller than the original. If you do it several times, you keep on getting much smaller number each time, until you are between 1 and 1000. From there on, a bit more care is needed with calculations (but is still simple) to see how much further you can drop. For example, for 999 you end up after one step with 81+81+81 obviously, which is 243. From the range 1-243 the number with the largest sum of squares of digits is 199, for which you get 1+81+81=163. And from here on, a little program can check where you end up after several iterations.
This could make a nice math competition problem. But I agree with you, not worth the trouble puttin on Wikipedia. Oleg Alexandrov | talk 23:07, 28 Jan 2005 (UTC)

Er, um, let me back-pedal please. I hadn't actually thought about this sequence at all when I wrote the above. I had just assumed that things were difficult. Now having thought about it for a few minutes, I agree it's quite simple. Any number above 999 goes to a number with fewer digits, so you eventually get to something 999 or below. Then it's just a matter of checking. This level of reasoning can certainly go in the article. I'll start adding it right now. dbenbenn | talk 23:18, 28 Jan 2005 (UTC)

Done. For what it's worth, it was never about strictness. The problem was simply that no justification for the claims at the top of this thread were given. dbenbenn | talk 23:54, 28 Jan 2005 (UTC)

There is a problem with proof. You see, you focus too much on what happens over 100. If you are at 99, you jump up to 162. And then, if you drop below 100 again with your reasoning, you can come back later. So it is not clear if you ever get stuck under 100. So I think you should say we are stuck between 1 and 162 and leave it that way. What do you think?Oleg Alexandrov | talk 05:44, 29 Jan 2005 (UTC)
I disagree. The computer program proves (presumably; I haven't actually checked it) that every number 1 to 99 is either happy or goes to 4. And every number above 99 eventually goes into the range 1–99. So (I think) the proof as I modified it is still correct.
The interesting fact, which I was trying to get at in my edits, is that 99 is the last number that gets bigger, which is why it's "special" with respect to this process. 162 isn't special in that sense. If you're going to stop at 162, I think you might as well stop at 1000. But the extra analysis to get down to 99 reveals some interesting structure in the sequences. dbenbenn | talk 06:24, 29 Jan 2005 (UTC)
If you put it that way you are right. And emphasizing 99 is good too. What I got confused about was the following: I would have really liked to not even talk about what happens under 163 (over 100 versus under 100), as there things jump around quite a bit. For comparison, while once we are in 1 to 163, we are dead stuck there. Your proof was not wrong, I misread it expecting something else. Oleg Alexandrov | talk 16:36, 29 Jan 2005 (UTC)

Checking up to 163

[edit]

The following program in MATLAB, by User:Oleg Alexandrov, can be used to check the claim in the article about 1 to 163:

% Find the happy numbers, and the cycles which do not lead to happy numbers.
% Assume that we start at some integer between 1 and 163.
% It can be proved that the sequence t_0, t_1, ... as in the article,
% always stabilizes in this interval.

function main(m)

   A=zeros(163, 20); % row i will store the cyclical sequence starting at i
   
   for i=1:163
      N=i; % current term
      for j=1:20 % can prove that at most 18 iterations are necessary to start repeating the cycle
	 A(i, j)=N;
	 N=sum_digits(N);
      end
      
      if  (N ~= 1 & N ~= 4  & N~= 16  & N ~=  37 & N ~=    58 & N ~=    89 & N ~=   145   & N ~=  42   & N ~=  20   & N ~=   4)
	 disp('We have a problem! We neither got a happy number nor are we');
	 disp('in the cycle 4    16    37    58    89   145    42    20     4 ');
      end
   end

   
   A(1:163, 1:20) % display a table showing in each row the with all the cycles (please ignore the trailing zeros)

function sum=sum_digits(m)

   sum=0;
   p=floor(log(m)/log(10)+0.1)+1; % number of digits
   for i=1:p
      d=rem(m, 10);
      sum=sum+d^2;
      m=(m-d)/10;
   end

Dear dbenbenn, I took so much of your time. I am flattered. Thanks. Oleg Alexandrov | talk 00:45, 29 Jan 2005 (UTC)

That's what Wikipedia's all about. Thanks for explaining it to me, and I'm sorry I misunderstood at first. dbenbenn | talk 03:17, 29 Jan 2005 (UTC)
Could anyone mind telling what programming language the above code is made in? --213.89.179.53 (talk) 14:43, 3 August 2009 (UTC)[reply]
I checked the page history and the edit summary [1] says MATLAB. PrimeHunter (talk) 15:38, 3 August 2009 (UTC)[reply]
O_o knew I had forgotten to look somewhere... anyway, tnx, and I added the info about MATLAB to the source-codes header. --213.89.179.53 (talk) 18:33, 3 August 2009 (UTC)[reply]

Checking up to "anywhere"

[edit]

The following tiny C program checks up to "any" number (< MAXINT), which can be given as optional argument (default=99), to see that no number gives an infinite loop, but always ends up at 1 (happy) or 4 (unhappy)).

It prints a message "xxx is (un)happy" for each number, unless an additional second argument is given (e.g. "silent"), in which case only the currently checked number is displayed (without linefeed).

In view of the highly non-optimized code (KISS principle), it takes about 20 sec on my PC to check up to 107 (ten million) (but maybe most time is spent in printf calls).

/* happy.c */

 sum(int i){ /* (recursively) calculate sum of squares of digits */
  return(( i<10 ) ? i*i : sum( i/10 ) + sum( i % 10 ));
 }

 happy(int i){ /* count iterations needed to reach 1 or 4 */
  int c=1;
  for ( ; i > 1; c++ ) if ( i==4 ) return( -c ); else i = sum(i);
  return( c );
 }

 main(int c,char**v){
  int i, h, max = ( c>1 ? atoi( v[1] ) : 99);
  for( i=1; i<=max; i++ ){
   printf( "%15d\r", i); h = happy(i);
   if( c<3 ) printf( "\t\t is found to be %s after %d iterations.\n",
               (h>0 ? "happy":"unhappy"), abs(h)-1 );
  }
 }

Enjoy... — MFH 23:34, 9 Mar 2005 (UTC)

A thought about proofs using computers

[edit]

The proof on the main page has some quite developed (and interesting) reasoning concerning numbers below 1000, and terminates by "a computer program can easily verify that in the range 1 to 99...". Now,

  • first, the computer program checks as easily (in less than a millisecond) up to 999, thus making the longest part of the proof superfluous. (Understand me well, I find this part nevertheless most interesting!)
  • secondly, it cannot be checked by reading the proof whether this statement (about 1..99) is true or false. In order to have a "complete" proof, one would need the explicit list of the sequences for the remaining numbers (where the sequences could be truncated whenever a number less than the "starting point" is attained).

Of course, for the latter (explicitly displayed list) the difference between 99 and 999 is crucial. Thus, in some sense, the "lack" or "necessity" of what is missing in the end (in order to have a complete proof) justifies what is (without it) "superfluous" at the beginning. Quite remarkable! MFH: Talk 17:20, 29 September 2005 (UTC)[reply]

unhappy 42

[edit]

I made a program that prints the sequences obtained for the numbers 1..99, but only up to the point where a number less than its predecessor is obtained (i.e. the point from which on the sequence is no more increasing). I noticed that most often this point was the number 42. More precisely, I counted for each number how many times it plays the role of such a "breakpoint" (for 1..99). Here are the results:

   1: 5.    2: 1.    4: 1.    5: 2.    8: 1.    9: 1.   10: 7.   11: 2.   13: 2.   16: 3.   17: 1.
  18: 1.   20: 2.   25: 5.   26: 1.   29: 2.   32: 1.   34: 3.   36: 1.   37: 4.   40: 1.   41: 5.
 42: 14.   45: 1.   49: 1.   50: 2.   51: 2.   52: 2.   53: 2.   58: 2.   61: 3.   64: 2.   65: 5.
  68: 2.   69: 1.   73: 1.   74: 1.   80: 1.   81: 2.   82: 1.   85: 1.   90: 1.    All others: 0.

I.e., while 42 is the breakpoint for 14 numbers, all other numbers are breakpoints for at most 7 numbers.

Of course this result is related to the choice of the first 100 numbers, but I don't think this is very important. (In fact, 42 remains the favourite taking into account all numbers up to 999, but the distribution becomes more homogenious for the others.) Strange, this 42.... MFH: Talk 22:21, 29 September 2005 (UTC)[reply]

It's the meaning of life :-) --HappyCamper 02:42, 5 November 2005 (UTC)[reply]
I wonder if that's why they chose to reference these numbers in the Doctor Who episode "42"? :-) 81.178.232.81 15:52, 20 May 2007 (UTC)[reply]
All unhappy numbers go into the loop 4, 16, 37, 58, 89, 145, 42, 20. What you're observing is that, for the eighty unhappy numbers from 2 to 99, fourteen of them enter the loop at one of 4, 16, 37, 58, 89, or 145 without first decreasing (4, 16, 37, 58, and 89 themselves plus 2, 5, 11, 16, 25, 29, 77, 85, and 98). Once in the loop, they decrease first when going from 145 to 42. The only unhappy number, of the first eighty (in the range 2 to 99) that enters the loop at 42 is 42 itself. Taking the first million unhappy numbers, less than 1% of them enter the loop at the number 42, at the lowest rate among the eight in the loop (the number 89 claims over 46%; the number 20 competes with 42 for least frequent at under 1.8%). Of course, 42 is thus an interesting unhappy number (and unique in its place in the "miserable" loop), but for slightly different reasons. --Peter Kirby (talk) 08:06, 31 May 2008 (UTC)[reply]

History?

[edit]

So who first defined happy numbers? How did they come up with the name? What significance (if any) has the research of happy numbers had?--AlexSpurling 20:21, 5 October 2006 (UTC)[reply]

According to Unsolved problems in Nymber Theory by Richard Guy, Reg. Allenby's daughter thought of them. They have little significance, just are interesting. Bubba73 (talk), 21:05, 5 October 2006 (UTC)[reply]
Can you add that to the article, with the reference? (I don't have the book) That's an interesting tidbit. - DavidWBrooks 15:09, 6 October 2006 (UTC)[reply]
done. I wish I knew her actual name though. Bubba73 (talk), 15:25, 6 October 2006 (UTC)[reply]

unhappy 23

[edit]

23 is NOT happy: 23²=529
5²+2²+9²=110
1²+1²+0²=2
2²=4
4²=16
1²+6²=37
3²+7²=58
5²+8²=89
8²+9²=145
1²+4²+5²=42
4²+2²=20
2²+0²=4
Please feedback if i'm wrong or not!!! *********** (March 30, 2007)

Wrong. 23 -> 2²+3² = 13, not 23². Sum of the square of the digits. Bubba73 (talk), 14:54, 30 March 2007 (UTC)[reply]
Sorry!

Trivia

[edit]

Note: this conversation has been moved from the editors' Talk pages, to bring it to wider attention. It concerns a Dr. Who episode mention and whether it belongs in the article. - DavidWBrooks 21:37, 20 May 2007 (UTC)[reply]

Hi. I've taken the Doctor Who reference back out of the Happy number article. Wikipedia's trivia policy explicitly mentions "popular culture" sections as a prime example of what not to do in an article. It's very cool that happy numbers got mentioned on Doctor Who, I agree, but it's a fact about a Doctor Who episode, really - it doesn't help anyone who came to Wikipedia to find out about happy numbers. --HughCharlesParker (talk - contribs) 19:15, 20 May 2007 (UTC)[reply]

True, but you're overlooking another sector of readership: those who didn't come to wikipedia to find out about happy numbers, who probably don't know they exist, but who encounter them via a Dr. Who search - and therefore learn about them. Which is exactly why the reference should be in the article. If there were lots of such references then you wouldn't want them - e.g., you wouldn't include every TV-show reference to "pi" - but this is so unusual and unexpected that it's just the kind of thing wikipedia does well. Over-literal trivia-stomping in this case cuts off a route of spreading a little recreational mathematics to a world that needs all the math help it can get. - DavidWBrooks 19:24, 20 May 2007 (UTC)[reply]
Hi again. I've moved the conversation here to keep it together. You're right about people coming to the article because of the Doctor Who episode - that's why I read it. People like me, though, who came to it that way, already know it was in the doctor who episode. I'm not sure what you mean about people who didn't come to wikipedia to find out about happy numbers - if you didn't want to find out about them, why would you be reading the article? I think I must have misunderstood you - what have I missed? --HughCharlesParker (talk - contribs) 19:54, 20 May 2007 (UTC)[reply]
PS - I don't think I've pointed you to the most helpful policy page Handling Trivia is more helpful. The paragraph about pink-eye and Mir sums up what I'm on about. --HughCharlesParker (talk - contribs) 19:58, 20 May 2007 (UTC)[reply]
Here's what I have clumsily tried to convey: "trivia" mentions are an entry into many serious articles that might draw in people and enlarge their knowledge. A Dr. Who fan might stumble on this article, be intrigued about Happy Numbers, learn more about them, become a mathematician and solve all of Hilbert's Problems! OK, maybe that's a stretch ... but I love serendipity and think it should be encouraged, even if it litters some articles. - DavidWBrooks 21:37, 20 May 2007 (UTC)[reply]
I think it definitely merits some mention in this article - one or two sentences, at least. I'm not sure about having much more than that, but a lot of articles have a section "XYZ in popular culture", etc. There definitely should be some mention about it here. Bubba73 (talk), 23:22, 20 May 2007 (UTC)[reply]
I certainly think it's worth mentioning. Instead of a popular culture section which had one entry (and might never get a second), I have placed it in the tiny happy prime section where it belongs naturally in agreement with WP:TRIVIA. Note also that WP:TRIVIA is not policy but a guideline. And WP:HTRIV is neither; it's an essay. I don't think the paragraph there about pink-eye and Mir is a good analogy to happy numbers. Mir is an extremely notable topic with huge amounts of notable information "competing" for space. Happy numbers are a rather obscure topic which have a small article and may never have been mentioned in popular culture until they suddenly got this high-profile reference which probably greatly increases the number of people who have ever heard about happy primes. By the way, I did not know about the Doctor Who reference until an editor inserted mention in Happy number which I watch, and I enjoyed hearing about it. I look forward to see the episode when it airs on a channel I can see. PrimeHunter 23:51, 20 May 2007 (UTC)[reply]
I think the line about Dr. Who is hard to see in the article. If it shouldn't go in its own section, then I suggest making it a subsection of Happy Primes, so it appears in the table of contents and is set apart a little from the rest of the text. Bubba73 (talk), 00:25, 21 May 2007 (UTC)[reply]
The happy primes section is only five lines and the only place primes are mentioned. I don't think the last two lines should be the only subsection in the article, and I don't think it's necessary to show this reference in the table of contents. PrimeHunter 00:53, 21 May 2007 (UTC)[reply]
Bubba73: you're right, a lot of articles have a section "XYZ in popular culture" - but they shouldn't. Check out what wikipedia isn't and the trivia guideline. An increasing number of the "popular culture" sections have the trivia template at the top. --HughCharlesParker (talk - contribs) 18:18, 21 May 2007 (UTC)[reply]
Not everybody agres with this point of view, however; it's a guideline not a requirement. Many (most?) "pop culture" sections or their equivalent are, indeed, pointless collections of distracting fancruft. But not all. The template shouldn't be indiscriminatly slapped down on every section. - DavidWBrooks 19:27, 21 May 2007 (UTC)[reply]
It is so unusual for something like this to be mentioned (other than in the TV show Numb3rs), that I think it should certainly be in this article. I've known about happy numbers 20 years or so, and I think they are fairly well known in math circles. Bubba73 (talk), 19:45, 21 May 2007 (UTC)[reply]
:) Happy numbers: As Seen On TV!! Oh well. I guess this isn't going to bring down the project. --HughCharlesParker (talk - contribs) 19:48, 21 May 2007 (UTC)[reply]
Currently it is only one sentence. i think there is a consensus to let it stand as it is, right? Bubba73 (talk), 19:51, 21 May 2007 (UTC)[reply]
If we'd reached a consensus we'd all agree. I'm not agreeing (would Encyclopedia Brittanica include this line? Why not?) - I'm giving up. I just don't think that one short sentence is worth the effort when wikipedia is, as you point out, riddled with trivia. --HughCharlesParker (talk - contribs) 20:02, 21 May 2007 (UTC)[reply]
Wikipedia:Consensus says "Consensus does not mean that everyone agrees with the outcome; instead, it means that everyone agrees to abide by the outcome." It certainly looks like we have reached consensus with this short mention in the happy prime section and no trivia-like section. PrimeHunter 20:41, 21 May 2007 (UTC)[reply]

(unindent) I'm sorry, I misinterpreted your comments. We've written dozens of sentences about whether or not one sentence should remain. There is no "trivia" section now. Someone added a link to it in the article about Dr. Who episode. Bubba73 (talk), 20:32, 21 May 2007 (UTC)[reply]

I've just noticed this 18-month-old conversation after removing what I considered to be trivia from the article, and then saw it re-instated. I won't remove it again, although I still consider it to be trivia, not only in terms of the article's subject but also in terms of Doctor Who. I have some problems with the arguments above: if a DW fan were to stumble on the article, it would either be (a) through knowing that there is a reference in the series (third season?), (b) by accident or (c) by hearing about it some other way. In none of those cases does it help that user to appreciate happy numbers (or primes) or to know more about the subject. The serendipitous link would be from Doctor Who to happy number, meaning the link backwards is unnecessary (unless you want happy number fans to serendipitously find out about Doctor Who!)! Also, "in popular culture" should (IMO) really reflect instances where an article's subject is actually been notable in popular culture rather than as a trivial quiz question in a drama series! But "I guess this isn't going to bring down the project" as someone else said above... Stephenb (Talk) 15:58, 7 October 2008 (UTC)[reply]

I'm going to scum up this conversation by mentioning that this has got to be the most high-profile mention of happy numbers ever. That sounds like notability to me. 129.237.90.25 (talk) 02:58, 24 March 2009 (UTC)[reply]

Doctor Who brought me here. Never new about happy numbers until then.... Praise Him :) Andy_Howard (talk) 03:42, 15 December 2011 (UTC)[reply]

Dr Who repeats go on forever. It brought me here to something I had never heard of as someone who is not a expert in serious maths, but it has piqued my interest in finding out more about primes even at age 74... And at 74 one is never totally happy :-) 193.116.244.4 (talk) 10:48, 6 November 2024 (UTC)[reply]

definition issue

[edit]

User:UKPhoenix79 seems to be taking issue with the definition (the first sentence of the article). I think it is clear: the process ends in 1, or in an infinite loop; those numbers that end in 1 are happy, other numbers are not. User:UKPhoenix79 has twice removed the correct explanation of the process. I would like User:UKPhoenix79 to explain any intended changes here before making any further changes, so we can fix this problem. Others are welcome to chime in, of course. -- Doctormatt 23:42, 21 May 2007 (UTC)[reply]

Perhaps the confusion comes in because if you continued the process on 1, it would be an infinite loop to itself. However, the definition states that you stop the stop the process once you hit 1. Maybe it would be clearer if it stated that the infinite loop doesn't include 1. Bubba73 (talk), 23:50, 21 May 2007 (UTC)[reply]
Yes, I think that certainly doesn't help. Would anyone mind if I broke the first sentence into a couple of sentences, so the iterative process is clearly defined first, and then happy numbers are defined based on that? Something like this:
Starting with any positive whole number, the following process can be applied: replace the number by the sum of the squares its digits, and repeat until the number equals 1 (where it will stay), or it loops endlessly in a cycle which does not include 1. Those numbers for which this process ends in 1 are happy numbers and those that do not are unhappy numbers.
How does that sound? Doctormatt 00:07, 22 May 2007 (UTC)[reply]
I think that is good and makes it clearer, except I'd probably say that the process stops or terminates if you reach 1. Or you could state it that it goes to an infinite loop on 1 if it is happy, and an infinite loop not including 1 is not happy. Bubba73 (talk), 00:52, 22 May 2007 (UTC)[reply]

Mathematical Proof of fallacy of current statement on Happy Numbers

[edit]

Take the sum of the squares of its digits continue iterating this process until it yields 1, or produces an infinite loop.

According to this statement a number is happy once it produces reduces to a 1 or produces an infinite loop. If that is so and making the assumption that the current sentence is correct we will prove that this statement is incorrect this by testing two known unhappy numbers and check the results.

Lets try 2
2² = 4 ← infinite loop start
4² = 16
1² + 6² = 37
3² + 7² = 58
5² + 8² = 89
8² + 9² = 145
1² + 4² + 5² = 42
4² + 2² = 20
2² + 0² = 4 ← infinite loop end

Lets Try 1979
1² + 9² + 7² + 9² = 212
2² + 1² + 2² = 9
9² = 81
8² + 1² = 65
6² + 5² = 61
6² + 1² = 37 ← infinite loop start
3² + 7² = 58
5² + 8² = 89
8² + 9² = 145
1² + 4² + 5² = 42
4² + 2² = 20
2² + 0² = 4
4² = 16
1² + 6² = 37 ← infinite loop end

Note that neither number is listed as a happy number here and in fact the smallest happy number aside from 1 is 7. This statement is then false and needs to be corrected. As it is blatantly false as it currently stands and actually stating (unintentionally) that EVERY number is happy. Actually an infinite loop is what defines an unhappy number. -- UKPhoenix79 08:08, 22 May 2007 (UTC)[reply]

Your initial quote omitted the first sentence which is what defined happy numbers in the article. What the article really said before each of your 3 changes [2][3][4] was:
A happy number is any number that eventually reduces to 1 when the following process is used: take the sum of the squares of its digits, and continue iterating this process until it yields 1, or produces an infinite loop. Numbers that are not happy are called unhappy numbers. [5]
I haven't seen anybody claim that you get a happy number if the process gives an infinite loop. Hopefully you will not revert the new extended definition which looks fine to me. PrimeHunter 17:21, 22 May 2007 (UTC)[reply]
I can see how that original statment can be ambiguous. Bubba73 (talk), 18:26, 22 May 2007 (UTC)[reply]

Question

[edit]

I've heard a few names for the numbers 4, 16, 37, 58, 89, 145, 42, and 20. The most common being "miserable numbers". I can't find any source for these numbers have a special name as they relate to the whole Happy number thing. Has anyone else seen a source that has these numbers named specifically?

This is all I know. Bubba73 (talk), 02:26, 15 June 2007 (UTC)[reply]

base 16?

[edit]

Sorry, but it seems to me that base 16 (AKA "hex") _does_ have a number less than 16 ("10" in hex); in hex: 2 -> 4 -> 10 -> 1 : done.

So base 16 should not be on the list of "the first few such are...", right?

Maybe someone should check that whole list.

- Abe —Preceding unsigned comment added by 66.114.69.71 (talkcontribs)

Thanks for pointing this out. I removed the sentence as it is uncited, appears to be OR, and best of all, is incorrect. Doctormatt 07:48, 20 July 2007 (UTC)[reply]

Is there a point to this?

[edit]

Does this concept have any practical applications? I'm no mathematician, and I wonder about the point of it all. __meco (talk) 23:12, 19 February 2008 (UTC)[reply]

There are no practical applications (unless you are trying to unlock a sealed door on a spaceship falling into a star, and somebody chose a type of happy numbers as door code). Note that the bottom of the article shows it is in Category:Recreational mathematics. You can read about that in recreational mathematics. Some people enjoy such things (me for example). It's not relevant to Wikipedia whether something has practical applications. It matters whether it satisfies things like Wikipedia:Notability. PrimeHunter (talk) 23:32, 19 February 2008 (UTC)[reply]
I can see that it can be a useful preoccupation in the pursuit of heightened numeracy. In fact, when I was going to sleep last night I was playing with a few numbers (13,11,12,10) to see how they fared in this respect.
Also, I considered the existence of practical applications in a general perspective, and I came to the conclusion that such must exist, even though they have yet not been discovered (and I could present proof involving interference patterns, God, his angels and the tasks at hand in the Kingdom of God, but I shall abstain here).
But is there any reason not to consider number series based on cubed instead of squared digits, or factorializing the digits (or some other operation which may exist beyond my awareness) for such pursuits? __meco (talk) 09:20, 20 February 2008 (UTC)[reply]
There is often no good reason to choose certain rules like those for happy numbers. See OEIS:A035504 for the similar but less notable sequence with cubes. Squares are "simpler" than cubes and simplicity is often preferred by those inventing and studying recreational sequences. A large number of integer sequences based on the digits of a number have been studied for recreational purposes. If a sequence satisfies Wikipedia:Notability then Wikipedia may have an article about it, for example in Category:Base-dependent integer sequences. Other bases than 10 are sometimes studied. In more serious mathematics there is nothing special about base 10, but it's the base humans are used to and usually preferred in recreational mathematics. —Preceding unsigned comment added by PrimeHunter (talkcontribs) 23:01, 20 February 2008 (UTC)[reply]
actually, it is of utmost relevance to wikipedia to provide encyclopedic content, including indications of context. k kisses 03:43, 9 July 2017 (UTC)[reply]

Happy bases

[edit]

To what point have bases been checked for happiness? I have no expertise on this subject, so I was hoping that someone could find this out and put a statement about it in the article. 128.12.41.37 (talk) 00:32, 24 July 2008 (UTC)[reply]

We definitely need a WP:Reliable source for the happy base stuff. Bubba73 (talk), 23:43, 12 November 2008 (UTC)[reply]
The first sentence on happy numbers in other bases is a little confusing to me: "The definition of happy numbers depends on the decimal (i.e., base 10) representation of the numbers. The definition can be extended to other bases." To me (I'm not a native speaker of english, though, nor very adept at math) this sounds as if the definition of a happy number is really only valid in the decimal system - is that the case? I don't see any reason why it should be, as the process of finding a happy number is really the same in any base (though the results for any given number vary). I would have said that "The definition of happy numbers depends on the numbering system employed" or something like that? Or, now that I think about it, maybe the fact that in other bases there may be several different unhappy loops or numbers that loop back on themselves makes another definition necessary after all?
If you say "happy number" without saying the base, it is assumed to be base 10. You can define the same type of numbers in other bases ("happy numbers in base X") but you get a different set of numbers that are happy in that base. Bubba73 You talkin' to me? 16:31, 10 March 2011 (UTC)[reply]
The lead doesn't mention the base but in practice it assumes base 10 and only defines one set of happy numbers: Those with base-10 representation 1, 7, 10, 13, 19, 23, 28, 31, .... Generally, if you say "digits" without saying a base, it is assumed to be base 10. The lead definition says "Starting with any positive integer, replace the number by the sum of the squares of its digits". This is generally considered equivalent to "Starting with any positive integer, replace the number by the sum of the squares of the digits in the base 10 representation of the number". Given the lead definition we could for example say "the number of days in January is a happy number" without writing the number at all or specifying how we normally prefer to write it. Later we have to explicitly mention other bases in order to extend the definition. PrimeHunter (talk) 17:01, 10 March 2011 (UTC)[reply]
Hm, OK. Does anyone know if there is any base that has no happy numbers besides the obvious 1,10,100 etc.? —Preceding unsigned comment added by 80.69.116.39 (talk) 18:34, 10 March 2011 (UTC)[reply]
I just wrote a little program to check bases 1 through 50...it's not exhaustive, but it samples a few thousand random numbers in each base and checks them for happiness. All numbers in base 2 and 4 are happy, but everything else has a mix of .5% happy to 50% happy...the distribution is actually pretty interesting, because some bases (like 16, 18, 19, and 30) have a very high percentage of happy numbers and I'm not sure why...anyway, the bases that don't seem to contain anything other than trivial examplea are base 22, 28, 31, 32, 38, 39, 43, 44, 47, 48, and 49. Not sure why, but that's what I found. EDIT: oh, and if someone wants to do a more exhaustive search, you might find this helpful: I discovered that in each base, the number of unique terminals (that is, numbers that will loop back on themselves instead of getting down to 1) varies all over the place, but the largest unique terminal for any base can be no larger than the expression n(base-1)^2, provided that this number is smaller than (base^n)-1. There may be an even smaller way to bound this, but that was easy enough for my purposes.129.164.27.85 (talk) 13:23, 22 December 2014 (UTC)stile129.164.27.85 (talk) 13:23, 22 December 2014 (UTC)[reply]

'a sun'?????????

[edit]

The article says, 'In the Docter Who episode "42", a sequence of happy primes (313, 331, 367, 379) is used as a code for unlocking a sealed door on a space ship about to collide with 'a sun'. Shouldn't it be 'the sun'? I don't watch Doctor Who or anything so I haven't changed anything yet but 'a sun' just doesn't make sense. The term 'sun' is usually only used to refer to the star our 8 planets revolve around, so if it were some other star, (and the nearest star is light years away) it wouldn't really matter to them. Unless there were some weird aliens living on a planet orbiting that star that they wanted to save. And if that were true in the show, then the article should at least say that! Also, i think that the subsection 'Use in popular (whatever the subsection which that sentence was in, because I forgot) shouldn't even be there. It's just one sentence... it doesn't matter. It should be moved to the article about Doctor Who, if there is one. —Preceding unsigned comment added by Fffgg (talkcontribs) 21:19, 8 May 2009 (UTC)[reply]

No, the second definition of "sun" is "A star that is the center of a planetary system". Bubba73 (talk), 00:22, 9 May 2009 (UTC)[reply]
It's called a sun in the episode.[6] It's a A living organism and not a normal star so we shouldn't change the term they chose (I don't know know whether the episode ever calls it a star). PrimeHunter (talk) 01:24, 9 May 2009 (UTC)[reply]
They don't call it a star, but they do call it a sun, in the episode.--213.89.179.53 (talk) 14:56, 3 August 2009 (UTC)[reply]

i know old comment but adding detail to it: the definition of star vs sun differs greatly but generally when dealing with any source of light in the sky it is a star (hence why venus is labeled the evening star unless dealing with the planet specifically), "a sun" is rarely used more often "our sun" or "the sun" is used but when dealing with any galactic system or within earths orbit of a star the termonology switches to sun. there is no scientific reason for the change but it is common across all forms of media and science fiction (star trek being a large offender for this)152.91.9.153 (talk) 01:07, 18 December 2012 (UTC)[reply]

Cubes?

[edit]

What happens if you do the happy number with cubes? Biquadrates? nth powers? Professor M. Fiendish, Esq. 13:00, 25 August 2009 (UTC)[reply]

Cubes give oeis:A035504. I don't know whether there are any OEIS sequences for higher powers. My computation says biquadrates (4th powers) give:
1, 10, 100, 1000, 10000, 11123, 11132, 11213, 11231, 11312, 11321, 12113, 12131, 12311, 13112, 13121, 13211, 21113, 21131, 21311, 23111, 31112, 31121, 31211, 32111, 44688, 44868, ...
Unsolved Problems in Number Theory has mention of powers above 2. See [7]. PrimeHunter (talk) 15:58, 25 August 2009 (UTC)[reply]

Origin

[edit]

The section on the origin of happy numbers doesn't make sense. I don't have access to the reference, but the way the section is worded, it's unclear whether Reg Allenby is creditted with the concept or whether its just an anecdote about an interaction between him and his daughter. If she learnt about them at school, I don't understand what his role in the origin is. Presumably someone else had already thought of it - the daughter's teacher, if nobody else. Then there is almost a throw away remark that they may have originated in Russia. It really doesn't make sense. Can someone who has access to the reference tidy up the section? Wikipeterproject (talk) 01:59, 14 February 2010 (UTC)[reply]

The way that paragraph says is pretty much what the Guy reference says.

"Reg Allenby's daughter came home from school in Britain with the concept of happy numbers. The problem may have originated in Russia."

Bubba73 (You talkin' to me?), 02:09, 14 February 2010 (UTC)[reply]

Hmmm. That's a bit ambiguous isn't it? It doesn't say anything about the origin except that it might be from Russia. Reading the quote logically, the school was teaching the concept, the daughter told her dad about it...and...? What did Allenby do with it? The only thing that's clear about the origin is that it's not Allenby (he got it from his daughter) and not the daughter (she got it from school). I don't see the point of including the first part of the quote at all, really. Wikipeterproject (talk) 02:16, 14 February 2010 (UTC)[reply]
Well that is all that is known about the origin. Reg Allenby may have done some research. He is mentioned again in the reference. At least he must have brought it to the attention of the math community. I doubt the school was teaching about happy numbers. The point is to tell what is known about the origin. Guy (or someone) must think that it may have originated in Russia. Bubba73 (You talkin' to me?), 02:25, 14 February 2010 (UTC)[reply]
Then "the problem may have originated in Russia" is what we can substantiate from the secondary source. The rest is unclear and, in my opinion, we'd be better to leave it out, unless we can find something else that clarifies it. A poor source doesn't have to lead to a bad encyclopedia!! Wikipeterproject (talk) 02:35, 14 February 2010 (UTC)[reply]
"may have originated in Russia" helps some, but it isn't definitive. We know that Allenby's daughter told him about it and he communicated it to the math community. I'm OK with the way it is, because that is what the reference says. Both Guy and Allenby can be contacted by email. Bubba73 (You talkin' to me?), 02:55, 14 February 2010 (UTC)[reply]
I don't want to make this a bigger issue than it is, but just because there is a source, doesn't mean we have to use it. If the source doesn't actually tell us anything, in my opinion it's better not to use it. Contacting either by e-mail would probably amount to original research. Wikipeterproject (talk) 10:34, 14 February 2010 (UTC)[reply]
The source does tell what is known about the origin. I think if that is taken out, people might wonder about the origin. Bubba73 (You talkin' to me?), 17:32, 14 February 2010 (UTC)[reply]
Yes, but even with it in, I am wondering about the origin! It really doesn't tell us much... Wikipeterproject (talk) 19:15, 14 February 2010 (UTC)[reply]
I did some work on happy numbers and refereed a paper about them for publication, but I don't know any more than the above. Bubba73 (You talkin' to me?), 22:54, 14 February 2010 (UTC)[reply]

Zeroless pandigital

[edit]

The pandigital number article has this line:

Two of the zeroless pandigital Friedman numbers are: 123456789 = ((86 + 2 × 7)5 - 91) / 34, and 987654321 = (8 × (97 + 6/2)5 + 1) / 34.

which seems to invalidate the most recent edit of this Happy number article[8], which includes an edit note saying "A number can't be both zeroless and pandigital")

I know nothing about this topic, and await enlightened discussion! - DavidWBrooks (talk) 22:53, 1 December 2010 (UTC)[reply]

A pandigital number is one that has all digits, including zero. So a "zeroless pandigital number" must mean one that has all digits except zero, rather than being the interesection of the zeroless numbers and the pandigital numbers. And the pandigital number article confirms that. Bubba73 You talkin' to me? 01:50, 2 December 2010 (UTC)[reply]
So the last edit of this article was incorrect? - DavidWBrooks (talk) 02:07, 2 December 2010 (UTC)[reply]
Yes, because there is such a thing as a "zeroless pandigital number". Bubba73 You talkin' to me? 02:10, 2 December 2010 (UTC)[reply]

Citations needed for programs

[edit]

Citations are needed for the programs. Otherwise they are original research, not verifyable, and will have to be removed. Bubba73 You talkin' to me? 04:14, 18 April 2011 (UTC)[reply]

I can see your point, but proving program correctness can be very difficult. This seems like a very high bar for a recreational math topic, especially considering the number of example programs in other articles, e.g., Sieve of Eratosthenes that have no citations. In fact, could not the programs be considered a translation of the stated algorithm (which has citations)? I.e., in the programming language, the programs restate the algorithms or properties already cited in the article. IMHO, the value of the included programs for further recreation outweighs their lack of direct citations. Rick21784 (talk) 19:28, 10 July 2011 (UTC)[reply]
The verifiability issue is not about program correctness - it is about is the program from a verifiable source. I suspect that these programs were written by the editor that put them in. That is not allowed because it is original research. The program must be from a published reliable source to be included. The purpose of Wikipedia is not recreation - it is an encyclopedia. Bubba73 You talkin' to me? 05:57, 11 July 2011 (UTC)[reply]
I was hoping you would address my assertion that computer programs are a translation of an already cited algorithm, not original research. I made no assertion about the purpose of Wikipedia. Rick21784 (talk) 15:46, 17 July 2011 (UTC)[reply]
Editors can make source code with simple implementations of known algorithms. There will often be no reliable source with an allowed license. However, there should be at most one implementation of testing happy numbers. See Wikipedia:Manual of Style (mathematics)#Algorithms. In this case I think there should be none. The article is not about an algorithm and there is no encyclopedic reason for source code to illustrate the simple definition of happy numbers. PrimeHunter (talk) 21:03, 17 July 2011 (UTC)[reply]
The RosettaCode site seems to cover them pretty well, so I don't see a need for a bunch of them here. Since one is referenced (with a link to the RosettaCode page), I'm in favor of deleting the rest. Bubba73 You talkin' to me? 02:27, 18 July 2011 (UTC)[reply]

Unhappy 392

[edit]

The article states that 392 is a happy number when in fact it creates an endless cycle on its 13th step.

392^2= 153664
1^2+5^2+3^2+6^2+6^2+4^2=123
1^2+2^2+3^2=14
1^2+4^2=17
1^2+7^2=50 (lets assume the rest of the numbers are squared)
5+0=25
2+5=29
2+9=85
8+5=89
8+9=145
1+4+5=42
4+2=20
2+0=4
4=16
1+6=37
3+7=58
5+8=89
8+9=145
etc etc...
— Preceding unsigned comment added by 70.160.22.169 (talk) 14:16, 18 July 2011 (UTC)[reply]

You start by squaring the digits: 392 -> 3^2+9^2+2^2 = 94, etc. Bubba73 You talkin' to me? 15:01, 18 July 2011 (UTC)[reply]
Oh. The example for 7 in the article makes it seam that you start with the squared number, rather than the sum of the squares. Perhaps there should be an example using a two or three digit number along with the single digit 7? — Preceding unsigned comment added by 70.160.22.169 (talk) 15:13, 18 July 2011 (UTC)[reply]
I see your point. Using a one-digit number example makes it unclear. Bubba73 You talkin' to me? 15:55, 18 July 2011 (UTC)[reply]

Are citations needed for routine calculations?

[edit]

The article states that 986543210 is the largest happy number with no redundant digits, and this statement is flagged as needing a citation. I question the need for a citation in this case, since the statement can be verified by a few minutes of manual calculation. There are only seven larger numbers with no repeated digits: 987654321, 98765432, 98765431, 98765421, 98765321, 98764321, and 98754321. It is easy to verify that these seven numbers are unhappy, and that 986543210 is happy. David Radcliffe (talk) 08:29, 1 October 2011 (UTC)[reply]

It's borderline to call that "routine", so a citation would save the interested reader a lot of time. =) Powers T 11:21, 3 October 2011 (UTC)[reply]
At The village pump, an opinion also thinks that a citation is needed. Bubba73 You talkin' to me? 19:07, 3 October 2011 (UTC)[reply]
... though for a different reason. Powers T 21:10, 3 October 2011 (UTC)[reply]
My feeling is that it does need a citation. It is a simple calculation, but it is not something you can punch into your calculator without any thought. Bubba73 You talkin' to me? 22:23, 3 October 2011 (UTC)[reply]
Someone at the Village Pump pointed out that WP:CALC applies, so it needs a citation. Bubba73 You talkin' to me? 17:31, 4 October 2011 (UTC)[reply]

Stumbling over this issue at the policy village pump, I am less concerned about whether this is routine calculation or not but I wonder why this fact should be notable. If anybody would be interested in knowing the "largest happy number with no redundant digits" s/he can easily compute it her/himself. OTOH, if the fact truly is notable you should be able to find a reference. Nageh (talk) 17:56, 4 October 2011 (UTC)[reply]

Yes, that is probably why there is no reference - no one found it notable enough to publish. Bubba73 You talkin' to me?
Same argument applies to the four other numbers as well... DS Belgium (talk) 18:16, 6 October 2011 (UTC)[reply]
You're right. I added it for those. Bubba73 You talkin' to me? 18:56, 6 October 2011 (UTC)[reply]
I'm having doubts again '_', see below.. o_Ô (and looking for emoticon that best represents doubt) ٩(͡๏̯͡๏)۶ DS Belgium (talk) 03:12, 7 October 2011 (UTC)[reply]
@Nageh: I changed my opinion on notability, given WP:NNC:
  • The criteria applied to article content are not the same as those applied to article creation. The notability guidelines do not apply to article or list content (with the exception that some lists restrict inclusion to notable items or people). Content coverage within a given article or list is governed by the principle of due weight and other content policies.
Due weight does not seem to pose a problem either, since it deals with points of view.
  • Neutrality requires that each article or other page in the mainspace fairly represents all significant viewpoints that have been published by reliable sources, in proportion to the prominence of each viewpoint.
Unless someone claims it isn't the Greatest largest happy number with no redundant digits, this wouldn't apply. That leaves the question of WP:NOR and WP:CALC.
  • This policy allows routine mathematical calculations, such as adding numbers, converting units, or calculating a person's age, provided there is consensus among editors that the arithmetic and its application correctly reflect the sources.
Are we to decide on whether the calculations are routine or not, or on concensus? DS Belgium (talk) 02:55, 7 October 2011 (UTC)[reply]
In my opinion, the items in that section are notable enough to include. But I do not think that the calculation is routine enough for it to go in without a reference. If you wanted to give the population (or area) of the Great Lake states, and you had only the population (resp. area) of the individual states, it would be OK to simply add them up. This calculation is beyond that, and takes some thought and decisions by the person. I think WP:OR and WP:CALC apply. Bubba73 You talkin' to me? 03:19, 7 October 2011 (UTC)[reply]
@DS Belgium: If you don't like notability as an argument take WP:DUE. Those special numbers are completely arbitrary. Why not include "largest happy number with a monotonically decreasing sequence of digits" or something similar pointless? You would have to include all of them, but then you would end up with an indiscriminate list of information. Compare this with 2^42643801−1, which is notable for it being the largest currently known happy number. This indiscriminate list should be deleted. Nageh (talk) 08:35, 7 October 2011 (UTC)[reply]


It's not that hard to check;

  • happy numbers below 500 are listed ..193, 203, 208, 219, 226, 230, 236, 239, 262, 263, 280, 291,..
  • first check largest number (without repeating digits): 9876543210:
  • 0+1+4+9+16+25+36+49+64+81=285
  • 285 is not on the list
  • remove one digit and check
  • 285-1=284 no
  • 285-4=281 no
  • 285-9=276 no
  • 285-16=269 no
  • 285-25=260 no
  • 285-36=249 no
  • 285-49=236 YES!
  • 236 is a happy number so the largest one without redundant digits is 986543210 — Preceding unsigned comment added by DS Belgium (talkcontribs) 12:31, 6 October 2011 (UTC)[reply]
"Not that hard" is not the same as "routine". Powers T 12:37, 6 October 2011 (UTC)[reply]
It also seems to be original research. Bubba73 You talkin' to me? 18:56, 6 October 2011 (UTC)[reply]
Applying a known, clear, and relatively simple algorithm can not be original research (in the general sense). Even if it may be useful to have a reference, so that the ones less mathematically inclined can have a reassurance, and those mathematically inclined may double check their own calculation. - Nabla (talk) 23:01, 7 October 2011 (UTC)[reply]

Overveiw Edit

[edit]

There is a discontinuity in content in the section "Overveiw".The text below is the most recent edition:

The happy numbers below 500 are:

1, 7, 10, 13, 19, 23, 28, 31, 32, 44, 49, 68, 70, 79, 82, 86, 91, 94, 97, 100, 103, 109, 129, 130, 133, 139, 167, 176, 188, 190, 192, 193, 203, 208, 219, 226, 230, 236, 239, 262, 263, 280, 291, 293, 301, 302, 310, 313, 319, 320, 326, 329, 331, 338, 356, 362, 365, 367, 368, 376, 379, 383, 386, 391, 392, 397, 404, 409, 440, 446, 464, 469, 478, 487, 490, 496 (sequence A007770 in OEIS). The happiness of a number is preserved by rearranging the digits, and by inserting or removing any number of zeros anywhere in the number.

The unique combinations of above (the rest are just rearrangements and/or insertions of zero digits):

1, 7, 13, 19, 23, 28, 44, 49, 68, 79, 129, 133, 139, 167, 188, 226, 236, 239, 338, 356, 367, 368, 379, 446, 469, 478, 556, 566, 888, 899.

The discontinuity is the first list of numbers are specified as "below 500" and the second list of numbers are supposed to be from the previous list. However, the last for numbers in the second set are larger than 500. I do not know how this is to be resolved, but the easiest edit would be to remove the last four numbers of the second list.Cjripper (talk) 23:51, 9 February 2012 (UTC)[reply]

I think it is beneficial to list those last four, so I'll make some changes. Bubba73 You talkin' to me? 01:38, 10 February 2012 (UTC)[reply]

Checking up to 99

[edit]

My removal of the citation-needed at the omitted proof by exhaustion has been reverted. I submit that such a small number of cases makes the inclusion of each calculation unnecessary, as there is no ambiguity about how to proceed.

For instance:

f(1) = 1

f(2) = 22 = 4

f(3) = 32 = 9. f(9) = 92 = 81. f(81) = 82 + 12 = 65. f(65) = 62 + 52 = 61. f(61) = 62 + 12 = 37. f(37) = 32 + 72 = 58. f(58) = 52 + 82 = 89. f(89) = 82 + 92 = 145. f(145) = 12 + 42 + 52 = 42. f(42) = 42 + 22 = 20. f(20) = 22 + 02 = 4.

and so forth.

Indeed, mathematics often asks the reader to fill in larger and less clear gaps. I cite:

Generating_set_of_a_group#Finitely_generated_group - last sentence.

Covering_space#Examples

Yoneda's_lemma#Proof - in particular "The proof in the contravariant case is completely analogous." Here, there are only two cases, yet one is omitted for the sake of space.

Enforcing a policy of walking a user through each logical step in a proof, regardless of ease, would make many, many proofs here very bloated. The only alternative would be to replace the newly-bloated proofs with links to external sources, making the articles less enlightening and more of a collection of theorems proven elsewhere. — Preceding unsigned comment added by 75.83.151.41 (talk) 12:12, 5 May 2012 (UTC)[reply]

Do am I fail the math?

[edit]

"7" is apparently a happy number...


7 squared is 49 ... 4+9 = 13 ... 1+3 = 4

4 squared is 16 ... 1+6 = 7

and round the loop we go.


I thought for it to be happy it had to collapse to "1"? Or is the infinite-loop condition also valid? The introduction suggests looping is "unhappy". Or maybe I should go get some lunch and come back to this?


If instead you're only supposed to do one round of adding per step, then it quickly runs into a different endless loop:


7 squared is 49 ... 4+9 = 13

13 squared is 169 ... 1+6+9 = 16

16 squared is 256 ... 2+5+6 = 13...


?!?!? 193.63.174.211 (talk) 11:58, 9 May 2013 (UTC)[reply]

At the top, when you get 13, repeat the process, 1^2 + 3^2 = 1 + 9 = 10, etc. Bubba73 You talkin' to me? 14:46, 9 May 2013 (UTC)[reply]
Ah yes ... re-reading it I see the mistake. "Sum of the squares" ... not "square of the sum". Buh. However, it wasn't particularly clear in the heading that you had to square each individual digit in the number, it only became plain "below the fold".
(Yes, I've had my lunch now :D) 193.63.174.211 (talk) 15:53, 9 May 2013 (UTC)[reply]

cubing

[edit]

The section "Cubing the digits rather than squaring" appears to be original research; probably correct, certainly interesting, but without a reliable source it doesn't belong here. If I'm wrong - if this is something that is known and worked out/commented on elsewhere - then it needs a reference ... if I'm right, it needs to be removed. - DavidWBrooks (talk) 15:25, 21 December 2013 (UTC)[reply]

I agree. Bubba73 You talkin' to me? 17:54, 21 December 2013 (UTC)[reply]
Searches show OEIS has several sequences. These can source some of the content (I don't have time to work on the article): oeis:A035504, oeis:A055012 (note the first comment), oeis:A046197. There are more related sequences in this search: https://oeis.org/search?q=A035504. The Google search "1, 10, 100, 112, 121, 211, 778" shows the sequence for cubes is in Unsolved Problems in Number Theory. oeis:A219111 is for fourth powers. PrimeHunter (talk) 20:23, 21 December 2013 (UTC)[reply]
[edit]

Cyberbot II has detected that page contains external links that have either been globally or locally blacklisted. Links tend to be blacklisted because they have a history of being spammed, or are highly innappropriate for Wikipedia. This, however, doesn't necessarily mean it's spam, or not a good link. If the link is a good link, you may wish to request whitelisting by going to the request page for whitelisting. If you feel the link being caught by the blacklist is a false positive, or no longer needed on the blacklist, you may request the regex be removed or altered at the blacklist request page. If the link is blacklisted globally and you feel the above applies you may request to whitelist it using the before mentioned request page, or request its removal, or alteration, at the request page on meta. When requesting whitelisting, be sure to supply the link to be whitelisted and wrap the link in nowiki tags. The whitelisting process can take its time so once a request has been filled out, you may set the invisible parameter on the tag to true. Please be aware that the bot will replace removed tags, and will remove misplaced tags regularly.

Below is a list of links that were found on the main page:

  • http://mathsball.blogspot.com.es/2013/07/football-and-happiness.html
    Triggered by \bmathsball\.blogspot\.com\.es on the global blacklist

If you would like me to provide more information on the talk page, contact User:Cyberpower678 and ask him to program me with more info.

From your friendly hard working bot.—cyberbot II NotifyOnline 17:01, 22 December 2013 (UTC)[reply]

Formula

[edit]

I've removed this text:

There is a very interesting recursive formula that allows you to check if number is happy after a number of iterations,
this formula was developed by a mathematician Young native of Fresnillo Zacatecas Mexico named Jose de Jesus Camacho Medina,
who recorded his formula in Online enciplopedia integer under the record: http://oeis.org/A007770.

because the "formula" is merely a restatement of the definition, replacing "sum of squares of digits" with an expression that extracts the kth digit, squares it, and sums on k. This adds nothing new, and I don't think we can consider it interesting in this context. Joule36e5 (talk) 05:58, 27 August 2014 (UTC)[reply]

I agree. It doesn't really say anything new and it may be wp:or. Bubba73 You talkin' to me? 06:17, 27 August 2014 (UTC)[reply]

Happy Mersenne prime

[edit]

Dubious tag: The source does not mention that M42643801 is a happy number; a Google search does not indicate any connection between happy and Mersenne primes (not all Mersenne primes are happy: 127 is not). I can't find a source that indicates that M42643801 is happy, or that anyone has even checked if it is.Renerpho (talk) 07:38, 29 December 2017 (UTC)[reply]

Here, someone claims to have checked that M42643801 is indeed a happy number. 2001:41B8:83C:F901:EA0A:8299:6738:289A (talk) 12:35, 26 July 2018 (UTC)[reply]
Original research, but using the Mathematica code from the OEIS, you can easily check that mersenne prime is indeed happy. Furthermore, all of the larger primes can quickly be confirmed to be sad. N828335 (talk) 04:11, 23 October 2021 (UTC)[reply]
Nah, 52nd is happy again.Tolic lich (talk) 12:19, 7 November 2024 (UTC)[reply]

Zero

[edit]

Is 0 happy or unhappy? — Preceding unsigned comment added by 2604:CB00:12F:B900:3047:2A48:5F65:52B3 (talk) 02:05, 10 November 2021 (UTC)[reply]

It isn't happy. Bubba73 You talkin' to me? 03:15, 10 November 2021 (UTC)[reply]

Failed To Parse Errors

[edit]

I'm seeing two big blocks of red text which seem to indicate some kind of error rendering a math equation.

The first is in the header, right after "1^2 + 3^2 = 10, and" which says "Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "http://localhost:6011/wiki.riteme.site/v1/":): {\displaystyle 1^2+0^2=1}"

The second error is in the "Happy numbers and perfect digital invariants" page, right after "Given the perfect digital invariant function", and it says "Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "http://localhost:6011/wiki.riteme.site/v1/":): {\displaystyle F_{p, b}(n) = \sum_{i=0}^{\lfloor \log_{b}{n} \rfloor} {\left(\frac{n \bmod{b^{i+1}} - n \bmod{b^{i}}}{b^{i}}\right)}^p} ." Graxwell (talk) 00:46, 27 September 2023 (UTC)[reply]

@Graxwell: I'm seeing that too. I think this has been a problem in math articles from time to time over the last few weeks. You might mention it at the Village Pump. Bubba73 You talkin' to me? 01:01, 27 September 2023 (UTC)[reply]

Now the problem has gone away for me. Bubba73 You talkin' to me? 02:54, 27 September 2023 (UTC)[reply]