The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A193573 Least happy number with next happy number of distance n. 0

%I

%S 31,68,7,19,23,1,219,293,70,193,208,32,748,1233,1457,973,263,338,49,

%T 109,763,5606,239,1487,8884,1933,1636,139,1607,3932,409,18280,17966,

%U 4366,4960,16181,33464,3564,18899,496,4995,566

%N Least happy number with next happy number of distance n.

%C The next term, a(43), equals 144164. [From Harvey P. Dale, Aug 27 2011]

%H Weisstein, Eric E.: <a href="http://mathworld.wolfram.com/HappyNumber.html">MathWorld -- Happy Number</a>

%e a(1) = 31 since next happy number is 32 with distance 1.

%e a(2) = 68 since next happy number is 70 with distance 2.

%e a(3) = 7 since next happy number is 10 with distance 3.

%t hapQ[n_]:=Last[NestWhileList[Total[IntegerDigits[#]^2]&,n, !MemberQ[{0, 1, 4,16,20, 37,42,58,89,145}, #]&]]==1; Transpose[With[ {hapnos= Partition[ Select[Range[34000], hapQ],2,1]}, Table[First[Select[ hapnos,Last[#]-First[#]==n&]],{n,42}]]][[1]] (* _Harvey P. Dale_, Aug 27 2011 *)

%Y Cf. A007770.

%K nonn,base

%O 1,1

%A _Martin Renner_, Jul 31 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified July 29 02:36 EDT 2021. Contains 346340 sequences. (Running on oeis4.)