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!)
A186437 Maximal number of squarings in an evaluation scheme for x^n achieving the minimal number of operations. 1
0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 4, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
a(n) is also the maximal number of doublings in a shortest addition chain for n.
LINKS
FORMULA
We have a(n) = floor(log_2(n)) for all n ≤ 60 except 23, 39, 43 and 46.
EXAMPLE
For n=5, we can evaluate x^5 using only 3 operations in 2 ways:
x^2 = (x)^2; x^3 = x * x^2; x^5 = x^2 * x^3
x^2 = (x)^2; x^4 = (x^2)^2; x^5 = x * x^4
The second way achieves the maximal number of doublings, which is a(5) = 2.
CROSSREFS
Sequence in context: A072750 A235037 A347966 * A345376 A029835 A074280
KEYWORD
nonn
AUTHOR
Laurent Thévenoux and Christophe Mouilleron, Feb 23 2011
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 05:20 EDT 2024. Contains 371906 sequences. (Running on oeis4.)