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
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
KEYWORD
nonn
AUTHOR
STATUS
approved