Clear[happyPrimeN]; happyPrimeN[2000] = 137653; happyPrimeN[2000] // AbsoluteTiming
{0., 137653}
But seriously, here's a memoised, recursive happyQ that can be used with Leonid's happyPrimeN
Clear[sos, happyQ]; sos[k_Integer] := sos[k] = Plus @@ (#^2 & /@#.# IntegerDigits[k]);&[IntegerDigits[k]]; happyQ[k_Integer] := happyQ[k] = happyQ[k, {}]; happyQ[1, history_List] := True; happyQ[k_Integer, history_List] := With[{h = sos[k]}, If[h == 1, True, If[MemberQ[history, h], False, happyQ[h, Prepend[history, h]]]]];h]]]]; happyPrimeN[2000] // AbsoluteTiming happyPrimeN[2000] // AbsoluteTiming
{21.18750004531250, {12814, 137653}}
{0.0468750, {12814, 137653}}
(Edit: now even faster with more memoisation)