|
| |
|
|
A007770
|
|
Happy numbers: numbers whose trajectory under iteration of sum of squares of digits map includes 1.
|
|
57
|
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
|
OFFSET
|
1,2
|
|
|
COMMENTS
|
Sometimes called friendly numbers, but this usage is deprecated.
Gilmer shows that the lower density of this sequence is < 0.1138 and the upper density is > 0.18577. [Charles R Greathouse IV, Dec 21 2011]
Corrected the upper and lower density inequalities in the comment above. - Nathan Fox, Mar 14 2013
|
|
|
REFERENCES
|
E. El-Sedy and S. Siksek, On happy numbers, Rocky Mountain J. Math. 30 (2000), 565-570.
R. K. Guy, Unsolved Problems Number Theory, Sect. E34.
J. N. Kapur, Reflections of a Mathematician, Chap. 34 pp. 319-324, Arya Book Depot New Delhi 1996.
|
|
|
LINKS
|
Jud McCranie, Table of n, a(n) for n = 1..143071
Justin Gilmer, On the density of happy numbers (2011).
Hao Pan, Consecutive happy numbers
W. Schneider, Happy Numbers (Includes list of terms below 10000)
Eric Weisstein's World of Mathematics, Happy Number
Eric Weisstein's World of Mathematics, Digitaddition
Wikipedia, Happy number
|
|
|
EXAMPLE
|
1 is OK. 2 --> 4 --> 16 --> 37 --> ... --> 4, which repeats with period 8, so never reaches 1, so 2 (and 4) are unhappy.
A correspondent suggested that 98 is happy, but it is not.
|
|
|
MATHEMATICA
|
f[n_] := Total[IntegerDigits[n]^2]; Select[Range[400], NestWhile[f, #, UnsameQ, All] == 1 &] (* T. D. Noe, Aug 22 2011 *)
Select[Range[1000], FixedPoint[Total[IntegerDigits[#]^2]&, #, 10]==1&] (* Harvey P. Dale, Oct 09 2011 *)
|
|
|
PROG
|
(Haskell)
a007770 n = a007770_list !! (n-1)
a007770_list = filter ((== 1) . a103369) [1..]
-- Reinhard Zumkeller, Aug 24 2011
(PARI) ssd(n)=n=digits(n); sum(i=1, #n, n[i]^2)
is(n)=while(n>6, n=ssd(n)); n==1 \\ Charles R Greathouse IV, Nov 20 2012
|
|
|
CROSSREFS
|
Cf. A001273, A035497 (happy primes), A046519, A031177, A002025, A050972, A050973, A074902, A003132, A103369, A035502, A068571, A072494, A124095, A219667.
Sequence in context: A096678 A026319 A120153 * A212979 A114961 A219045
Adjacent sequences: A007767 A007768 A007769 * A007771 A007772 A007773
|
|
|
KEYWORD
|
nonn,base,nice,easy,changed
|
|
|
AUTHOR
|
N. J. A. Sloane, A.R.McKenzie(AT)bnr.co.uk
|
|
|
STATUS
|
approved
|
| |
|
|