login
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.
0
1, 3, 7, 9, 559, 745, 993
OFFSET
1,2
COMMENTS
This sequence is conjectured to be finite.
MATHEMATICA
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 *)
PROG
(Python)
from fractions import Fraction
def S(n):
arr = []
while True:
n //= (n - (n & (n - 1)))
arr.append(n)
if n == 1:
break
n = 3 * n + 1
return sum(Fraction(1, x) for x in arr)
m = 0
for n in range(1, 1000):
k = S(n)
if m < k:
m = k
print(n)
CROSSREFS
Cf. A304174.
Cf. A127789.
Sequence in context: A118559 A189244 A127789 * A112105 A065501 A144385
KEYWORD
nonn,more
AUTHOR
Barak Manos, Mar 06 2025
STATUS
approved