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.

A359226 a(n) is the least k >= 0 such that A006370^k(A070167(n)) = n (where A006370^k denotes the k-th iterate of A006370).

This page as a plain text file.
%I A359226 #22 Dec 23 2022 11:22:38
%S A359226 0,0,0,5,2,0,0,4,0,1,2,0,7,2,0,3,4,0,0,9,0,1,2,0,0,6,0,1,2,0,5,2,0,3,
%T A359226 4,0,0,2,0,8,2,0,0,4,0,1,7,0,5,2,0,5,6,0,0,2,0,1,2,0,92,4,0,1,2,0,7,2,
%U A359226 0,3,9,0,0,7,0,1,2,0,0,8,0,1,2,0,5,2,0
%N A359226 a(n) is the least k >= 0 such that A006370^k(A070167(n)) = n (where A006370^k denotes the k-th iterate of A006370).
%C A359226 If we travel the Collatz tree backwards, we will observe no further branching, whenever we have reached a number divisible by three. This is the reason why a(n) will be zero in all cases where n is divisible by three, because in this case no smaller number can exist further upward in the Collatz tree, as the actual branch will progress in numbers of the form 3*m*2^k. - _Thomas Scheuerle_, Dec 22 2022
%H A359226 Rémy Sigrist, <a href="/A359226/b359226.txt">Table of n, a(n) for n = 1..10000</a>
%H A359226 Rémy Sigrist, <a href="/A359226/a359226.gp.txt">PARI program</a>
%H A359226 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>
%F A359226 a(n) = 0 iff n belongs to A177729.
%F A359226 If a(n) > 0 and n is odd, then a(n*3+1) - a(n) = 1. If a(n) > 0 and n is even, then a(n*3+1) - a(n*6+2) = 1. - _Thomas Scheuerle_, Dec 22 2022
%e A359226 The Collatz sequence starting from 1 is: 1.
%e A359226 So a(1) = 0.
%e A359226 The Collatz sequence starting from 2 is: 2, 1.
%e A359226 So a(2) = 0.
%e A359226 The Collatz sequence starting from 3 is: 3, 10, 5, 16, 8, 4, 2, 1.
%e A359226 So a(3) = 0, a(10) = 1, a(5) = 2, a(16) = 3, a(8) = 4, a(4) = 5.
%t A359226 nn = 87; c[_] = -1; c[0] = 0; Do[(MapIndexed[If[c[#1] == -1, Set[c[#1], First[#2] - 1]] &, #]; -1 + Length[#]) &@ NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, c[#] == -1 && # > 1 &], {n, 0, nn}]; Array[c, nn] (* _Michael De Vlieger_, Dec 23 2022 *)
%o A359226 (PARI) See Links section.
%Y A359226 Cf. A006370, A070167, A177729.
%K A359226 nonn
%O A359226 1,4
%A A359226 _Rémy Sigrist_, Dec 22 2022