login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A376079
a(n) is the largest difference of adjacent elements in the sorted list of the Collatz trajectory elements of n.
1
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,2
COMMENTS
Trajectories end when they reach 1.
EXAMPLE
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.
PROG
(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]));
CROSSREFS
Cf. A220237 (sorted trajectory), A008908, A025586.
Sequence in context: A011331 A155687 A021618 * A085589 A259931 A333350
KEYWORD
nonn
AUTHOR
Markus Sigg, Sep 09 2024
STATUS
approved