This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A004257 a(n) = round(log_2(n)). 4
 0, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 LINKS T. D. Noe, Table of n, a(n) for n = 1..10000 FORMULA a(n) = floor(log_2(sqrt(2)*n)). - Velin Yanev, Dec 11 2016 a(n) = A000523(n^2) - A000523(n). - Mikhail Kurkov, Sep 11 2019 MATHEMATICA Round[Log[2, Range[90]]] (* Harvey P. Dale, Aug 26 2014 *) PROG (PARI) a(n) = round(log(n)/log(2)); \\ Michel Marcus, Dec 11 2016 (PARI) a(n) = {logint(n^2, 2) - logint(n, 2)} \\ Andrew Howroyd, Sep 11 2019 (MAGMA) [Round(Log(2, n)):n in [1..90]]; // Marius A. Burtea, Aug 02 2019 CROSSREFS Cf. A000523 (floored). Sequence in context: A106432 A227923 A029836 * A276611 A238598 A156684 Adjacent sequences:  A004254 A004255 A004256 * A004258 A004259 A004260 KEYWORD nonn,changed AUTHOR STATUS approved

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

Last modified September 18 17:45 EDT 2019. Contains 327178 sequences. (Running on oeis4.)