OFFSET
1,1
COMMENTS
LINKS
V. Barbera, Table of n, a(n) for n = 1..50
FORMULA
EXAMPLE
For n=2, the second Mersenne prime is A000668(2) = 7 and there ate a(2) = 5 tripling steps on its way to 1.
MATHEMATICA
a[n_] := -1 + Count[NestWhileList[If[OddQ[#], 3*# + 1, #/2] &, 2^MersennePrimeExponent[n] - 1, # > 1 &], _?OddQ]; Array[a, 20] (* Amiram Eldar, Nov 21 2025 *)
PROG
(Python)
# Exponents p with 2^p - 1 prime (A000043), for p <= 127
mersenne_prime_exponents = [2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127]
def collatz_tripling_steps(n: int) -> int: # A006667(n)
steps, x = 0, n
while x != 1:
if x % 2 == 0:
x //= 2
else:
x = 3*x + 1
steps += 1
return steps
print([collatz_tripling_steps((1 << p) - 1) for p in mersenne_prime_exponents])
CROSSREFS
KEYWORD
nonn
AUTHOR
Stephen R. Campbell, Nov 20 2025
EXTENSIONS
a(18)-a(30) from Amiram Eldar, Nov 21 2025
a(31)-a(35) from Sean A. Irvine, Nov 29 2025
a(36)-a(39) from Jinyuan Wang, Dec 07 2025
STATUS
approved
