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!)
A265158 a(1) = 1, a(2*n) = 2*a(n), a(2*n+1) = floor(a(n)/2). 2
1, 2, 0, 4, 1, 0, 0, 8, 2, 2, 0, 0, 0, 0, 0, 16, 4, 4, 1, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 8, 8, 2, 8, 2, 2, 0, 8, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 16, 16, 4, 16, 4, 4, 1, 16, 4, 4, 1, 4, 1, 0, 0, 16, 4, 4, 1, 4, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
All terms are either zero or a power of 2;
a(2^k) = 2^k; for k > 1: a(2^k+1) = 2^(k-2); a(2^k-1) = 0;
A264784 gives lengths of runs of zeros.
LINKS
PROG
(Haskell)
import Data.List (transpose)
a265158 n = a265158_list !! (n-1)
a265158_list = 1 : concat
(transpose [map (* 2) a265158_list, map (flip div 2) a265158_list])
(PARI) a(n) = if (n==1, 1, if (n%2, a(n\2)\2, 2*a(n\2))); \\ Michel Marcus, Jan 22 2022
CROSSREFS
Sequence in context: A019215 A326799 A112081 * A366907 A210444 A226949
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Dec 04 2015
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 25 07:41 EDT 2024. Contains 371964 sequences. (Running on oeis4.)