The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A271519 Let n = (2*i + 1)*2^j; then a(n) = i + j. 1
0, 1, 1, 2, 2, 2, 3, 3, 4, 3, 5, 3, 6, 4, 7, 4, 8, 5, 9, 4, 10, 6, 11, 4, 12, 7, 13, 5, 14, 8, 15, 5, 16, 9, 17, 6, 18, 10, 19, 5, 20, 11, 21, 7, 22, 12, 23, 5, 24, 13, 25, 8, 26, 14, 27, 6, 28, 15, 29, 9, 30, 16, 31, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
n appears n + 1 times.
LINKS
FORMULA
a(n) = A025480(n-1) + A007814(n).
a(2*n+1) = n, a(2*n) = A025480(n-1) + A001511(n).
PROG
(PARI) a(n) = my(j = valuation(n, 2), i = ((n/2^j)-1)/2); i+j; \\ Michel Marcus, Apr 09 2016
(Python)
def A271519(n): return (n-1>>(m:=(~n&n-1).bit_length())+1)+m # Chai Wah Wu, Jul 13 2022
CROSSREFS
Sequence in context: A155216 A064144 A338295 * A077105 A173752 A153847
KEYWORD
nonn
AUTHOR
Gionata Neri, Apr 09 2016
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 June 4 19:35 EDT 2024. Contains 373102 sequences. (Running on oeis4.)