cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A376079 #12 Aug 24 2025 11:53:52
%S A376079 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 A376079 12,36,54,1944,16,18,12,54,12,56,30,66,20,1944,22,48,8,68,54,1944,24,
%U A376079 38,18,78,14,80,1944,1944,12,24,30,66,54,54,1944,1944,32,48,12
%N A376079 a(n) is the largest difference of adjacent elements in the sorted list of the Collatz trajectory elements of n.
%C A376079 Trajectories end when they reach 1.
%H A376079 Markus Sigg, <a href="/A376079/b376079.txt">Table of n, a(n) for n = 2..10001</a>
%e A376079 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.
%t A376079 Table[Max[Differences[Sort[NestWhileList[If[EvenQ[#],#/2,3#+1]&,n,#>1&]]]],{n,2,70}] (* _Harvey P. Dale_, Aug 24 2025 *)
%o A376079 (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 A376079 Cf. A220237 (sorted trajectory), A008908, A025586.
%K A376079 nonn,changed
%O A376079 2,2
%A A376079 _Markus Sigg_, Sep 09 2024