OFFSET
2,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 2..1001
MATHEMATICA
happyQ[n_, b_] := NestWhile[Plus @@ (IntegerDigits[#, b]^2) &, n, UnsameQ, All] == 1; a[b_] := Module[{k=2}, While[!happyQ[k, b], k++]; k]; Array[a, 100, 2] (* Amiram Eldar, May 28 2020 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jud McCranie, Jun 20 2009
STATUS
approved