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.

A359657 Least k such that A359247(k) = n, or 0 if no such k exists.

This page as a plain text file.
%I A359657 #11 Jan 25 2023 10:01:37
%S A359657 5,1,136,168,141,424,1867,680,3981,5800,2216,13648,5763,2728,8872,
%T A359657 11944,15752,6824,15219,8352,17064,10920,10400,38407,25105,27304,
%U A359657 36879,40501,37077,20323,25635,29073,57611,45795,90197,61741,68735,55319,46645,42549,95412
%N A359657 Least k such that A359247(k) = n, or 0 if no such k exists.
%C A359657 Or least k such that the bottom entry in the absolute difference triangle of the elements in the Collatz trajectory of k is equal to n, or 0 if no such k exists.
%e A359657 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:
%e A359657    168  84  42  21  64  32  16  8  4  2  1
%e A359657     84, 42, 21, 43, 32, 16,  8, 4, 2, 1
%e A359657     42, 21, 22, 11, 16,  8,  4, 2, 1
%e A359657     21,  1, 11,  5,  8,  4,  2, 1
%e A359657     20, 10,  6,  3,  4,  2,  1
%e A359657     10,  4,  3,  1,  2,  1
%e A359657      6,  1,  2,  1,  1
%e A359657      5,  1,  1,  0
%e A359657      4,  0,  1
%e A359657      4,  1
%e A359657      3
%e A359657 with bottom entry = A359247(168) = 3.
%t A359657 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}]
%Y A359657 Cf. A070165, A187203, A359247.
%K A359657 nonn
%O A359657 0,1
%A A359657 _Michel Lagneau_, Jan 10 2023