%I #22 May 28 2020 05:27:25
%S 1,5,7,11,19,23,25,27,33,35,41,43,49,51,55,79,81,83,91,93,95,99,103,
%T 109,115,119,121,123,125,127,133,135,141,143,149,153,157,159,161,165,
%U 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
%N Quinary happy numbers.
%C 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.
%H Amiram Eldar, <a href="/A240849/b240849.txt">Table of n, a(n) for n = 1..10000</a>
%H H. G. Grundmann, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL13/Grundman/grundman7.html">Semihappy Numbers</a>, J. Int. Seq. 13 (2010), 10.4.8.
%e 19 is a quinary happy number because 19=34_5 -> 3^2 + 4^2 = 25 = 100_5 -> 1+0+0 = 1.
%p isA240849 := proc(n)
%p t := SqrdB5(n) ;
%p tloo := {} ;
%p for i from 1 do
%p if t = 1 then
%p return true;
%p end if;
%p if t in tloo then
%p return false;
%p end if;
%p tloo := tloo union {t} ;
%p t := A276191(t) ;
%p end do:
%p end proc:
%p for n from 1 to 300 do
%p if isA240849(n) then
%p printf("%d,",n) ;
%p end if;
%p end do: # _R. J. Mathar_, Aug 24 2016
%t happyQ[n_, b_] := NestWhile[Plus @@ (IntegerDigits[#, b]^2) &, n, UnsameQ, All] == 1; Select[Range[250], happyQ[#, 5] &] (* _Amiram Eldar_, May 28 2020 *)
%Y Cf. A007770, A239320.
%K nonn,base,easy
%O 1,2
%A _Jiri Klepl_, Apr 13 2014