A376079 a(n) is the largest difference of adjacent elements in the sorted list of the Collatz trajectory elements of n.
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, 12, 36, 54, 1944, 16, 18, 12, 54, 12, 56, 30, 66, 20, 1944, 22, 48, 8, 68, 54, 1944, 24, 38, 18, 78, 14, 80, 1944, 1944, 12, 24, 30, 66, 54, 54, 1944, 1944, 32, 48, 12
Offset: 2
Examples
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.
Links
- Markus Sigg, Table of n, a(n) for n = 2..10001
Programs
-
Mathematica
Table[Max[Differences[Sort[NestWhileList[If[EvenQ[#],#/2,3#+1]&,n,#>1&]]]],{n,2,70}] (* Harvey P. Dale, Aug 24 2025 *)
-
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]));
Comments