|
|
A240849
|
|
Quinary happy numbers.
|
|
3
|
|
|
1, 5, 7, 11, 19, 23, 25, 27, 33, 35, 41, 43, 49, 51, 55, 79, 81, 83, 91, 93, 95, 99, 103, 109, 115, 119, 121, 123, 125, 127, 133, 135, 141, 143, 149, 153, 157, 159, 161, 165, 169, 171, 173, 175, 181, 189, 193, 197, 201, 203, 205, 209, 213, 215, 217, 219, 221, 223, 229, 231, 233, 237, 241, 243, 245, 249
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Numbers for which the repeated application of the operation "Sum the squares of the digits of the base-5 representation" is trapped by (ends at) the fixed point 1.
|
|
LINKS
|
|
|
EXAMPLE
|
19 is a quinary happy number because 19=34_5 -> 3^2 + 4^2 = 25 = 100_5 -> 1+0+0 = 1.
|
|
MAPLE
|
isA240849 := proc(n)
t := SqrdB5(n) ;
tloo := {} ;
for i from 1 do
if t = 1 then
return true;
end if;
if t in tloo then
return false;
end if;
tloo := tloo union {t} ;
end do:
end proc:
for n from 1 to 300 do
if isA240849(n) then
printf("%d, ", n) ;
end if;
|
|
MATHEMATICA
|
happyQ[n_, b_] := NestWhile[Plus @@ (IntegerDigits[#, b]^2) &, n, UnsameQ, All] == 1; Select[Range[250], happyQ[#, 5] &] (* Amiram Eldar, May 28 2020 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|