A349876 If n is divisible by 3, a(n) = n; otherwise n = 3k + r with r in {1, 2} and a(n) = a(5k + r + 3). a(n) = -1 if no multiple of three will be ever reached by iterating A353314.
0, 9, 6144, 3, 9, 6144, 6, 75, 15, 9, 6144, 60, 12, 24, 75, 15, 144, 30, 18, 6144, 60, 21, 39, 69, 24, 75, 45, 27, 84, 144, 30, 54, 159, 33, 6144, 60, 36, 309, 519, 39, 69, 1560, 42, 210, 75, 45, 225, 135, 48, 84, 144, 51, 150, 90, 54, 159, 450, 57, 99, 6144, 60, 294, 105, 63
Offset: 0
Examples
a(1) = a(3*0 + 1) = a(5*0 + 1 + 3) = a(4) a(4) = a(3*1 + 1) = a(5*1 + 1 + 3) = a(9) a(9) = 9 Trajectory of a(1): 4, 9 a(7) = a(3*2 + 1) = a(5*2 + 1 + 3) = a(14) a(14) = a(3*4 + 2) = a(5*4 + 2 + 3) = a(25) a(25) = a(3*8 + 1) = a(5*8 + 1 + 3) = a(44) a(44) = a(3*14 + 2) = a(5*14 + 2 + 3) = a(75) a(75) = 75 Trajectory of a(7): 14, 25, 44, 75 Trajectory of a(2): 5, 10, 19, 34, 59, 100, 169, 284, 475, 794, 1325, 2210, 3685, 6144.
Links
- Antti Karttunen, Table of n, a(n) for n = 0..19683
- Nick Drozd, A Busy Beaver Champion Derived from Scratch.
- Shawn Ligocki, Collatz-like behavior of Busy Beavers.
- Pascal Michel, Busy Beaver competition and Collatz-like problems, Arch. Math. Logic (1993), 32:351-367.
Programs
-
Mathematica
a[n_] := a[n] = Module[{qr = QuotientRemainder[n, 3]}, If[qr[[2]] == 0, n, a[5*qr[[1]] + qr[[2]] + 3]]]; Array[a, 64, 0] (* Amiram Eldar, Jan 04 2022 *)
-
PARI
a(n) = my(d=divrem(n, 3)); if (d[2], a(5*d[1]+d[2]+3), n); \\ Michel Marcus, Dec 05 2021
-
Python
def a(n): while True: quot, rem = divmod(n, 3) if rem == 0: return n n = (5 * quot) + rem + 3
Formula
If A010872(n) = 0 [when n is a multiple of 3], a(n) = n, otherwise a(n) = a(A353314(n)). [Here one may also use A353313 instead of A353314] - Antti Karttunen, Apr 14 2022
Extensions
Formal escape clause added to the definition by Antti Karttunen, Apr 14 2022
Comments