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!)
A085058 a(n) = A001511(n+1) + 1. 11
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
Number of divisors of 2n+2 of the form 2^k. - Giovanni Teofilatto, Jul 25 2007
Number of steps for iteration of map x -> (3/2)*ceiling(x) to reach an integer when started at 2*n+1.
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
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
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
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
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
LINKS
J. C. Lagarias and N. J. A. Sloane, Approximate squaring, Experimental Math., 13 (2004), 113-128.
FORMULA
a(n) = A007814(3^(n+1) - (-1)^(n+1)) = A007814(A105723(n+1)). - Reinhard Zumkeller, Apr 18 2005
a(n) = A001511(n+1) + 1 = A001511(2*n+2). - Ray Chandler, Jul 29 2007
a(n) = A007814(5^(n+1) - 1). - Ivan Neretin, Jan 15 2016
a(n) = A007814(4*(n+1)) = A007814(n+1) + 2. - Ruud H.G. van Tol, Sep 11 2023
MAPLE
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;
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
MATHEMATICA
g = 3 Ceiling[ # ]/2 &; f[n_?OddQ] := Length @ NestWhileList[ g, g[n], !IntegerQ[ # ] & ]; Table[ f[n], {n, 1, 210, 2}]
PROG
(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
(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
(PARI) a(n) = valuation(n+1, 2)+2; \\ Michel Marcus, Jan 15 2016
(Magma) [Valuation(n+1, 2)+2: n in [0..100]]; // Vincenzo Librandi, Jan 16 2016
(Python)
def A085058(n): return (~(n+1) & n).bit_length()+2 # Chai Wah Wu, Apr 14 2023
CROSSREFS
Sequence in context: A324507 A123725 A089080 * A183152 A210942 A368925
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Aug 11 2003
EXTENSIONS
Edited by Franklin T. Adams-Watters, Dec 09 2013
STATUS
approved

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 April 23 12:44 EDT 2024. Contains 371913 sequences. (Running on oeis4.)