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.

A212653 Number of steps to reach 1 in the Collatz (3x+1) problem starting with 3^n + 1.

This page as a plain text file.
%I A212653 #14 Oct 20 2019 21:52:45
%S A212653 1,2,6,18,110,21,95,32,75,74,42,134,133,132,131,143,204,128,189,139,
%T A212653 94,93,260,427,90,257,393,330,254,253,389,388,387,461,460,459,458,457,
%U A212653 456,455,454,453,452,500,499,449,497,496,751,494,493,492,747,490,745
%N A212653 Number of steps to reach 1 in the Collatz (3x+1) problem starting with 3^n + 1.
%C A212653 It is interesting to note that the quantity 3^k + 1 appears in the formula: A006577(n + 2^A006666(n)) = A006577(n) + A006577(1 + 3^A006667(n)) where A006577 is the n number of halving and tripling steps to reach 1 in '3x+1' problem, A006666 is the number of halving steps to reach 1 and A006667 the number of tripling steps to reach 1.
%C A212653 For example with n = 19, A006577(19 + 2^14) = A006577(19) + A006577(1 + 3^6) => 115 = 20 + 95.
%H A212653 Harvey P. Dale, <a href="/A212653/b212653.txt">Table of n, a(n) for n = 0..1000</a>
%H A212653 Wikipedia, <a href="http://en.wikipedia.org/wiki/Collatz_conjecture">Collatz conjecture</a>
%F A212653 a(n) = A075487(n) - 1.
%e A212653 a(2) = 6 because 3^2 + 1 = 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1 with 6 iterations.
%t A212653 f[n_] := Module[{a=3^n+1, k=0}, While[a!=1, k++; If[EvenQ[a], a=a/2, a=a*3+1]]; k]; Table[f[n], {n, 100}]
%t A212653 Table[Length[NestWhileList[If[EvenQ[#],#/2,3#+1]&,3^n+1,#!=1&]]-1,{n,0,60}] (* _Harvey P. Dale_, Sep 26 2015 *)
%Y A212653 Cf. A006577, A006666, A006667, A034472, A003462, A075487.
%K A212653 nonn
%O A212653 0,2
%A A212653 _Michel Lagneau_, Feb 14 2013