Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A090996
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A090996 Number of leading 1's in binary expansion of n. +0
3
0, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 1, 2, 2, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2 (list; graph; listen)
OFFSET

0,4

FORMULA

a(2^k-1)=k; a(A004754(k))=1; a(A004758(k))=2.

a(2^k-1)=k; for any other n, a(n) = a(floor(n/2)).

a(n) = f(n, 0) with f(n, x) = if n < 2 then n + x else f([n/2], (x+1)*(n mod 2)). - Reinhard Zumkeller, Feb 02 2007

EXAMPLE

In binary : 14=1110 and there are 3 leading 1's, so a(14)=3.

CROSSREFS

a(n) = A007814(1+A030101(n)).

Sequence in context: A136256 A159864 A144790 this_sequence A089309 A126387 A038374

Adjacent sequences: A090993 A090994 A090995 this_sequence A090997 A090998 A090999

KEYWORD

base,nonn

AUTHOR

Benoit Cloitre (benoit7848c(AT)orange.fr), Feb 29 2004

EXTENSIONS

Edited and corrected by Frank Adams-Watters (FrankTAW(AT)Netscape.net), Apr 08 2006. Sequence had accidentally been shifted left by one step, which was corrected and term a(0)=0 added by Antti Karttunen (His-Firstname.His-Surname(AT)gmail.com), Jan 01 2007.

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 30 13:13 EST 2009. Contains 167758 sequences.


AT&T Labs Research