Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A089310
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A089310 Write n in binary; a(n) = number of 1's in second block of 1's from right. +0
4
0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 2, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 2, 2, 2, 0, 3, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 0, 2, 2, 2, 2, 1, 2, 2, 0, 3, 3, 3, 0, 4, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 3, 1, 1, 0, 2, 2, 2 (list; graph; listen)
OFFSET

0,14

EXAMPLE

13 = 1101 so a(13) = 2.

PROGRAM

(PARI) a(n)=local(b, c, s):b=binary(n):c=length(b):while(!b[c], c=c-1):while(c>0&&b[c], c=c-1): if(c<=0, 0, while(!b[c], c=c-1):s=0:while(c>0&&b[c], c=c-1:s=s+1):s) (from R. Stephan)

CROSSREFS

Cf. A089309-A089313.

Sequence in context: A159459 A143078 A106405 this_sequence A129753 A147693 A070936

Adjacent sequences: A089307 A089308 A089309 this_sequence A089311 A089312 A089313

KEYWORD

nonn,base

AUTHOR

N. J. A. Sloane (njas(AT)research.att.com), Dec 22 2003

EXTENSIONS

More terms from R. Stephan, Feb 01 2004

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 25 20:09 EST 2009. Contains 167514 sequences.


AT&T Labs Research