login
a(n) = A001511(n+1) + 1.
11

%I #69 Sep 13 2024 06:57:49

%S 2,3,2,4,2,3,2,5,2,3,2,4,2,3,2,6,2,3,2,4,2,3,2,5,2,3,2,4,2,3,2,7,2,3,

%T 2,4,2,3,2,5,2,3,2,4,2,3,2,6,2,3,2,4,2,3,2,5,2,3,2,4,2,3,2,8,2,3,2,4,

%U 2,3,2,5,2,3,2,4,2,3,2,6,2,3,2,4,2,3,2,5,2,3,2,4,2,3,2,7,2,3,2,4,2,3,2,5,2

%N a(n) = A001511(n+1) + 1.

%C Number of divisors of 2n+2 of the form 2^k. - _Giovanni Teofilatto_, Jul 25 2007

%C Number of steps for iteration of map x -> (3/2)*ceiling(x) to reach an integer when started at 2*n+1.

%C Also number of steps for iteration of map x -> (3/2)*floor(x) to reach an integer when started at 2*n+3. - _Benoit Cloitre_, Sep 27 2003

%C The first time that a(n) = e+1 is when n is of the form 2^e - 1. - _Robert G. Wilson v_, Sep 28 2003

%C Let 2^k(n) = largest power of 2 dividing tangent number A000182(n). Then a(n-1) = 2*n - k(n). - _Yasutoshi Kohmoto_, Dec 23 2006

%C a(n) is the number of integers generated by b(i+1) = (3+2n)*(b(i) + b(i-1))/2, following these two initial values, b(0) = b(1) = 1. Thereafter only non-integers are generated. - _Richard R. Forberg_, Nov 09 2014

%C a(n) is the 2-adic valuation of 4*n+4, which is equal to the number of trailing 1-bits of 4*n+3 in binary. - _Ruud H.G. van Tol_, Sep 11 2023

%H Antti Karttunen, <a href="/A085058/b085058.txt">Table of n, a(n) for n = 0..16383</a>

%H J. C. Lagarias and N. J. A. Sloane, <a href="http://projecteuclid.org/euclid.em/1086894093">Approximate squaring</a>, Experimental Math., 13 (2004), 113-128.

%F a(n) = A007814(3^(n+1) - (-1)^(n+1)) = A007814(A105723(n+1)). - _Reinhard Zumkeller_, Apr 18 2005

%F a(n) = A001511(n+1) + 1 = A001511(2*n+2). - _Ray Chandler_, Jul 29 2007

%F a(n) = A007814(5^(n+1) - 1). - _Ivan Neretin_, Jan 15 2016

%F a(n) = A007814(4*(n+1)) = A007814(n+1) + 2. - _Ruud H.G. van Tol_, Sep 11 2023

%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3. - _Amiram Eldar_, Sep 13 2024

%p f := x->(3/2)*ceil(x); g := proc(n) local t1,c; global f; t1 := f(n); c := 1; while not type(t1, 'integer') do c := c+1; t1 := f(t1); od; RETURN([c,t1]); end;

%p a := n -> A001511(n+1) + 1: A001511 := n -> padic[ordp](2*n, 2): seq(a(n), n=0..104); # _Johannes W. Meijer_, Dec 22 2012

%t g = 3 Ceiling[ # ]/2 &; f[n_?OddQ] := Length @ NestWhileList[ g, g[n], !IntegerQ[ # ] & ]; Table[ f[n], {n, 1, 210, 2}]

%o (PARI) A085058(n)=if(n<0,0,c=2*n+7/2; x=0; while(frac(c)>0,c=3/2*floor(c); x++); x) \\ _Benoit Cloitre_, Sep 27 2003

%o (PARI) A085058(n)=if(n<0,0,c=(2*n+1)*3/2; x=1; while(frac(c)>0,c=3/2*ceil(c); x++); x) \\ _Benoit Cloitre_, Sep 27 2003

%o (PARI) a(n) = valuation(n+1,2)+2; \\ _Michel Marcus_, Jan 15 2016

%o (Magma) [Valuation(n+1, 2)+2: n in [0..100]]; // _Vincenzo Librandi_, Jan 16 2016

%o (Python)

%o def A085058(n): return (~(n+1) & n).bit_length()+2 # _Chai Wah Wu_, Apr 14 2023

%Y Cf. A001511, A085060, A007814, A105723, A000182.

%K nonn,easy

%O 0,1

%A _N. J. A. Sloane_, Aug 11 2003

%E Edited by _Franklin T. Adams-Watters_, Dec 09 2013