login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A050603 A001511 with every term repeated. 8

%I #53 Sep 15 2022 02:23:07

%S 1,1,2,2,1,1,3,3,1,1,2,2,1,1,4,4,1,1,2,2,1,1,3,3,1,1,2,2,1,1,5,5,1,1,

%T 2,2,1,1,3,3,1,1,2,2,1,1,4,4,1,1,2,2,1,1,3,3,1,1,2,2,1,1,6,6,1,1,2,2,

%U 1,1,3,3,1,1,2,2,1,1,4,4,1,1,2,2,1,1,3,3,1,1,2,2,1,1,5,5,1,1,2,2,1,1,3,3,1,1,2,2,1,1,4

%N A001511 with every term repeated.

%C Column 2 of A050600: a(n) = add1c(n,2).

%C Absolute values of A094267.

%C Consider the Collatz (or 3x+1) problem and the iterative sequence c(k) where c(0)=n is a positive integer and c(k+1)=c(k)/2 if c(k) is even, c(k+1)=(3*c(k)+1)/2 if c(k) is odd. Then a(n) is the minimum number of iterations in order to have c(a(n)) odd if n is even or c(a(n)) even if n is odd. - _Benoit Cloitre_, Nov 16 2001

%H James Spahlinger, <a href="/A050603/b050603.txt">Table of n, a(n) for n = 0..10000</a>

%H Cristian Cobeli, Mihai Prunescu, and Alexandru Zaharescu, <a href="http://arxiv.org/abs/1511.04315">A growth model based on the arithmetic Z-game</a>, arXiv:1511.04315 [math.NT], 2015.

%H Francis Laclé, <a href="https://hal.archives-ouvertes.fr/hal-03201180v2">2-adic parity explorations of the 3n+ 1 problem</a>, hal-03201180v2 [cs.DM], 2021.

%F Equals A053398(2, n).

%F G.f.: (1+x)/x^2 * Sum(k>=1, x^(2^k)/(1-x^(2^k))). - _Ralf Stephan_, Apr 12 2002

%F a(n) = A136480(n+1). - _Reinhard Zumkeller_, Dec 31 2007

%F a(n) = A007814(n + 2 - n mod 2). - _James Spahlinger_, Oct 11 2013, corrected by _Charles R Greathouse IV_, Oct 14 2013

%F a(2n) = a(2n+1). 1 <= a(n) <= log_2(n+2). - _Charles R Greathouse IV_, Oct 14 2013

%F a(n) = A007814(n+1)+A007814(n+2).

%F a(n) = (-1)^n * A094267(n). - _Michael Somos_, May 11 2014

%F a(n) = A007814(floor(n/2)+1). - _Chai Wah Wu_, Jul 07 2022

%F Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=0..m} a(k) = 2. - _Amiram Eldar_, Sep 15 2022

%t With[{c=Table[Position[Reverse[IntegerDigits[n,2]],1,1,1],{n,110}]// Flatten}, Riffle[c,c]] (* _Harvey P. Dale_, Dec 06 2018 *)

%o (PARI) a(n)=valuation(n+2-n%2,2) \\ _Charles R Greathouse IV_, Oct 14 2013

%o (PARI) {a(n) = my(A); if( n<0, 0, A = sum(k=1, length( binary(n+2)) - 1, x^(2^k) / (1 - x^(2^k)), x^3 * O(x^n)); polcoeff( A * (1 + x) / x^2, n))}; /* _Michael Somos_, May 11 2014 */

%o (Python)

%o def A050603(n): return ((m:=n>>1)&~(m+1)).bit_length()+1 # _Chai Wah Wu_, Jul 07 2022

%Y Bisection gives column 1 of A050600: A001511.

%Y Cf. A007814, A053398, A094267, A136480.

%K nonn,easy

%O 0,3

%A _Antti Karttunen_ Jun 22 1999

%E Definition simplified by _N. J. A. Sloane_, Aug 27 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 19 06:56 EDT 2024. Contains 370953 sequences. (Running on oeis4.)