Talk:Happy number

message: 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)
replies: text: 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)
replies: text: Could anyone mind telling what programming language the above code is made in? --213.89.179.53 (talk) 14:43, 3 August 2009 (UTC)
replies: text: I checked the page history and the edit summary  says MATLAB. PrimeHunter (talk) 15:38, 3 August 2009 (UTC)

text: 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)
thread_title:  Checking up to 163 

message: 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)
thread_title:  Checking up to "anywhere" 

message: 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)
thread_title:  A thought about proofs using computers 

message: 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)
replies: text: It's the meaning of life :-) --HappyCamper 02:42, 5 November 2005 (UTC)
replies: text: 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)

text: 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)
thread_title:  unhappy 42 

message: 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)
replies: text: 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)
replies: text: 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)
replies: text:  done.  I wish I knew her actual name though.  Bubba73 (talk), 15:25, 6 October 2006 (UTC)
thread_title:  History? 

message: 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)
replies: text: 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)
replies: text: 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)

text: 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)
replies: text:  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)
replies: text:  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)

text: 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)
replies: text:  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)
replies: text: 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)
replies: text: 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)
replies: text: 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)
replies: text:  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)
replies: text:  :) 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)
replies: text:  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)
replies: text: 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)
replies: text: 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)

text: 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)
thread_title:  Trivia 

message: 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)
thread_title: Question

message: 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 (talk • contribs) 
: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)
thread_title:  base 16? 

message: 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 (talk • contribs) 21:19, 8 May 2009 (UTC)
replies: text: 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)
replies: text: It's called a sun in the episode. 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)
replies: text: 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)
thread_title:  'a sun'????????? 

message: 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)
replies: text: 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)
replies: text: 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)
replies: text:  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)
replies: text: 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)
replies: text:  "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)
replies: text: 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)
replies: text:  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)
replies: text: 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)
replies: text:  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)
thread_title:  Origin 

message: 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, 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)
replies: text: 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)
replies: text: So the last edit of this article was incorrect? - DavidWBrooks (talk) 02:07, 2 December 2010 (UTC)
replies: text:  Yes, because there is such a thing as a "zeroless pandigital number".  Bubba73 You talkin' to me? 02:10, 2 December 2010 (UTC)
thread_title:  Zeroless pandigital 

message: 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)
replies: text: 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)
replies: text:  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)
replies: text: 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)
replies: text: 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)
replies: text:  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)
thread_title:  Citations needed for programs 

message: 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)
replies: text: 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)
replies: text:  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)
replies: text:  I see your point.  Using a one-digit number example makes it unclear.  Bubba73 You talkin' to me? 15:55, 18 July 2011 (UTC)
thread_title:  Unhappy 392 

message: 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)
replies: text: 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)
thread_title:  Overveiw Edit 

message: 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)
thread_title:  Checking up to 99 

message: 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)
replies: text: I agree.  Bubba73 You talkin' to me? 17:54, 21 December 2013 (UTC)
replies: text: 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  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)
thread_title:  cubing 

message: 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)
thread_title:  Blacklisted Links Found on the Main Page 

message: 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)
replies: text: 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)
thread_title:  Formula 

message: 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)
replies: text: 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)
replies: text:  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)
thread_title:  Happy Mersenne prime 

message: 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)
replies: text: It isn't happy. Bubba73 You talkin' to me? 03:15, 10 November 2021 (UTC)
thread_title: Zero

message: 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/en.wikipedia.org/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/en.wikipedia.org/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)
replies: text: 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)
thread_title:  Failed To Parse Errors