This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A240849 #22 May 28 2020 05:27:25 %S A240849 1,5,7,11,19,23,25,27,33,35,41,43,49,51,55,79,81,83,91,93,95,99,103, %T A240849 109,115,119,121,123,125,127,133,135,141,143,149,153,157,159,161,165, %U A240849 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 A240849 Quinary happy numbers. %C A240849 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 A240849 Amiram Eldar, <a href="/A240849/b240849.txt">Table of n, a(n) for n = 1..10000</a> %H A240849 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 A240849 19 is a quinary happy number because 19=34_5 -> 3^2 + 4^2 = 25 = 100_5 -> 1+0+0 = 1. %p A240849 isA240849 := proc(n) %p A240849 t := SqrdB5(n) ; %p A240849 tloo := {} ; %p A240849 for i from 1 do %p A240849 if t = 1 then %p A240849 return true; %p A240849 end if; %p A240849 if t in tloo then %p A240849 return false; %p A240849 end if; %p A240849 tloo := tloo union {t} ; %p A240849 t := A276191(t) ; %p A240849 end do: %p A240849 end proc: %p A240849 for n from 1 to 300 do %p A240849 if isA240849(n) then %p A240849 printf("%d,",n) ; %p A240849 end if; %p A240849 end do: # _R. J. Mathar_, Aug 24 2016 %t A240849 happyQ[n_, b_] := NestWhile[Plus @@ (IntegerDigits[#, b]^2) &, n, UnsameQ, All] == 1; Select[Range[250], happyQ[#, 5] &] (* _Amiram Eldar_, May 28 2020 *) %Y A240849 Cf. A007770, A239320. %K A240849 nonn,base,easy %O A240849 1,2 %A A240849 _Jiri Klepl_, Apr 13 2014