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.

A225089 a(n) = floor(2^A006666(m)/3^A006667(m)) - m, where m = 2n + 1.

This page as a plain text file.
%I A225089 #7 Apr 29 2013 12:27:04
%S A225089 0,0,0,0,0,1,1,0,2,0,1,2,1,2,1,0,1,4,3,1,0,3,2,4,4,2,5,5,4,3,5,0,6,3,
%T A225089 2,8,7,6,8,2,7,0,10,6,5,4,7,8,10,9,8,4,3,10,9,11,14,9,12,7,6,10,9,0,
%U A225089 14,13,12,7,6,5,10,17,13,15,0,13,12,16,15,5,8
%N A225089 a(n) = floor(2^A006666(m)/3^A006667(m)) - m, where m = 2n + 1.
%C A225089 A006666 and A006667 are the number of halving and tripling steps to reach 1 in 3x+1 problem.
%C A225089 Properties of this sequence:
%C A225089 a(m) = 0 for m =  A211981(m).
%H A225089 Michel Lagneau, <a href="/A225089/b225089.txt">Table of n, a(n) for n = 1..10000</a>
%e A225089 a(9) = 3 because floor(2^A006666(19)/3^A006667(19)) - 19 = floor(2^14 /3^6) - 19 = floor(22.474622) - 19 = 22 - 19 = 3.
%p A225089 A:= proc(n) if type(n, 'even') then n/2; else 3*n+1 ; end if; end proc:
%p A225089 B:= proc(n) a := 0 ; x := n ; while x > 1 do x := A(x) ; a := a+1 ; end do; a ; end proc:
%p A225089 C:= proc(n) a := 0 ; x := n ; while x > 1 do if type(x, 'even') then x := x/2 ; else x := 3*x+1 ; a := a+1 ; end if; end do; a ; end proc:
%p A225089 D:= proc(n) C(n) ; end proc:
%p A225089 A006666:= proc(n) B(n)- C(n) ; end:
%p A225089 A006667:= proc(n) C(n)- D(n) ; end:
%p A225089 G:= proc(n) floor(2^A006666 (n)/3^A006667 (n)) ; end:
%p A225089 for i from 1 to 100 do: printf(`%d, `, G(i)-i):od:
%t A225089 Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; nn = 100; t = {}; n = 0; While[Length[t] < nn, n++; c = Collatz[n]; ev = Length[Select[c, EvenQ]]; od = Length[c] - ev - 1; AppendTo[t, Floor[2^ev/3^od]-n]]; t
%Y A225089 Cf. A006666, A006667, A211981, A075680.
%K A225089 nonn
%O A225089 1,9
%A A225089 _Michel Lagneau_, Apr 27 2013