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 A381762 #19 Mar 15 2025 12:28:00 %S A381762 1,3,7,9,559,745,993 %N A381762 Numbers k such that S(k) sets a new record, where S(k) denotes the sum of the reciprocals of odd elements in the Collatz sequence which starts at k. %C A381762 This sequence is conjectured to be finite. %t A381762 f[n_] := Total[1/Select[NestWhileList[If[OddQ[#], 3*# + 1, #/2] &, n, # > 1 &], OddQ]]; seq[lim_] := Module[{s = {}, fm = 0, f1}, Do[f1 = f[n]; If[f1 > fm, fm = f1; AppendTo[s, n]], {n, 1, lim}]; s]; seq[1000] (* _Amiram Eldar_, Mar 06 2025 *) %o A381762 (Python) %o A381762 from fractions import Fraction %o A381762 def S(n): %o A381762 arr = [] %o A381762 while True: %o A381762 n //= (n - (n & (n - 1))) %o A381762 arr.append(n) %o A381762 if n == 1: %o A381762 break %o A381762 n = 3 * n + 1 %o A381762 return sum(Fraction(1, x) for x in arr) %o A381762 m = 0 %o A381762 for n in range(1, 1000): %o A381762 k = S(n) %o A381762 if m < k: %o A381762 m = k %o A381762 print(n) %Y A381762 Cf. A304174. %Y A381762 Cf. A127789. %K A381762 nonn,more %O A381762 1,2 %A A381762 _Barak Manos_, Mar 06 2025