|
|
A161871
|
|
Smallest happy number > 1 in base n.
|
|
2
|
|
|
2, 3, 2, 5, 6, 7, 8, 3, 7, 11, 12, 13, 14, 15, 2, 17, 2, 5, 2, 21, 22, 23, 24, 5, 26, 27, 28, 3, 2, 31, 32, 33, 3, 35, 6, 31, 38, 39, 40, 13, 42, 43, 44, 45, 46, 47, 48, 7, 50, 51, 52, 31, 54, 53, 56, 57, 58, 59, 54, 61, 62, 63, 8, 65, 66, 67, 12, 69, 70, 71, 72
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,1
|
|
LINKS
|
|
|
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
|
Cf. A007770 (happy numbers in base 10).
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|