login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) is the largest difference of adjacent elements in the sorted list of the Collatz trajectory elements of n.
1

%I #10 Sep 10 2024 21:33:28

%S 1,6,2,8,6,12,4,12,6,12,4,20,12,54,8,14,12,30,6,32,12,54,8,18,14,1944,

%T 12,36,54,1944,16,18,12,54,12,56,30,66,20,1944,22,48,8,68,54,1944,24,

%U 38,18,78,14,80,1944,1944,12,24,30,66,54,54,1944,1944,32,48,12

%N a(n) is the largest difference of adjacent elements in the sorted list of the Collatz trajectory elements of n.

%C Trajectories end when they reach 1.

%H Markus Sigg, <a href="/A376079/b376079.txt">Table of n, a(n) for n = 2..10001</a>

%e The trajectory of 3 is (3,10,5,16,8,4,2,1), the sorted list of the trajectory elements is (1,2,3,4,5,8,10,16), the list of differences is (1,1,1,1,3,2,6) with maximum 6, so a(3) = 6.

%o (PARI) a(n) = my(L = List([n])); while(n > 1, n = if(n % 2 == 0, n/2, 3*n + 1); listput(L, n)); listsort(L); vecmax(vector(#L - 1, i, L[i+1] - L[i]));

%Y Cf. A220237 (sorted trajectory), A008908, A025586.

%K nonn

%O 2,2

%A _Markus Sigg_, Sep 09 2024