A359657 Least k such that A359247(k) = n, or 0 if no such k exists.
5, 1, 136, 168, 141, 424, 1867, 680, 3981, 5800, 2216, 13648, 5763, 2728, 8872, 11944, 15752, 6824, 15219, 8352, 17064, 10920, 10400, 38407, 25105, 27304, 36879, 40501, 37077, 20323, 25635, 29073, 57611, 45795, 90197, 61741, 68735, 55319, 46645, 42549, 95412
Offset: 0
Keywords
Examples
a(3) = 168 because the Collatz trajectory of 168 is T = 168 -> 84 -> 42 -> 21 -> 64 -> 32 -> 16 -> 8 -> 4 -> 2 -> 1 and the absolute difference triangle of the elements of T is: 168 84 42 21 64 32 16 8 4 2 1 84, 42, 21, 43, 32, 16, 8, 4, 2, 1 42, 21, 22, 11, 16, 8, 4, 2, 1 21, 1, 11, 5, 8, 4, 2, 1 20, 10, 6, 3, 4, 2, 1 10, 4, 3, 1, 2, 1 6, 1, 2, 1, 1 5, 1, 1, 0 4, 0, 1 4, 1 3 with bottom entry = A359247(168) = 3.
Programs
-
Mathematica
nn=20000; Collatz[n_]:=NestWhileList[If[EvenQ[#],#/2,3#+1]&,n,#>1&]; Flatten[Table[Collatz[n],{n,nn}]]; Do[k=1; Table[d=Collatz[m]; While[Length[d]>1,d=Abs[Differences[d]]]; If[d[[1]]==u&&k==1,Print[u," ",m];k=0],{m,nn}],{u,0,22}]
Comments