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!)
A089262 a(n) = 2^floor(log_2(n)) - 2^floor(log_2(n*2/3)). 0
0, 0, 1, 0, 2, 2, 0, 0, 4, 4, 4, 4, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
LINKS
FORMULA
a(2n) = 2*a(n) + [n==1], a(2n+1) = 2*a(n).
G.f.: 1/(1-x) * Sum_{k>=0} 2^k*(t^2 - t^3) where t = x^(2^k).
PROG
(PARI) a(n)=if(n<1, 0, if(n%2==0, 2*a(n/2)+(n/2==1), 2*a((n-1)/2)))
(PARI) a(n)=2^floor(log(n)/log(2))-2^floor(log(n*2/3)/log(2))
CROSSREFS
Cf. A053644.
Sequence in context: A268584 A119332 A335683 * A325788 A240509 A344901
KEYWORD
nonn,easy
AUTHOR
Ralf Stephan, Oct 30 2003
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 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)