Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A161225
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A161225 a(n) = number of distinct integers that can be constructed by removing one or more 0's from the binary representation of n, and concatenating while leaving the remaining digits in their same order. +0
1
0, 1, 0, 2, 1, 1, 0, 3, 2, 3, 1, 2, 1, 1, 0, 4, 3, 5, 2, 5, 3, 3, 1, 3, 2, 3, 1, 2, 1, 1, 0, 5, 4, 7, 3, 8, 5, 5, 2, 7, 5, 7, 3, 5, 3, 3, 1, 4, 3, 5, 2, 5, 3, 3, 1, 3, 2, 3, 1, 2, 1, 1, 0, 6, 5, 9, 4, 11, 7, 7, 3, 11, 8, 11, 5, 8, 5, 5, 2, 9, 7, 11, 5, 11, 7, 7, 3, 7, 5, 7, 3, 5, 3, 3, 1, 5, 4, 7, 3, 8, 5, 5, 2 (list; graph; listen)
OFFSET

1,4

EXAMPLE

20 in binary is 10100. By removing one, two, or three 0's from this, we can come up with these distinct integers written in binary: 1100, 1010, 110, 101, 11. There are five of these, so a(20) = 5.

PROGRAM

(MAGMA) ndi:=function(n) a:=Intseq(n, 2); p:=1; c:=1; for j:=1 to #a do if a[j] eq 0 then c+:=1; else p*:=c; c:=1; end if; end for; return p-1; end function; [ ndi(n): n in [1..103] ]; [From Klaus Brockhaus (klaus-brockhaus(AT)t-online.de), Jun 10 2009]

CROSSREFS

Cf. A007088 (numbers written in base 2). [From Klaus Brockhaus (klaus-brockhaus(AT)t-online.de), Jun 10 2009]

Sequence in context: A023416 A080791 A124748 this_sequence A119513 A085815 A088234

Adjacent sequences: A161222 A161223 A161224 this_sequence A161226 A161227 A161228

KEYWORD

base,nonn

AUTHOR

Leroy Quet (q1qq2qqq3qqqq(AT)yahoo.com), Jun 06 2009

EXTENSIONS

Extended by Ray Chandler (rayjchandler(AT)sbcglobal.net), Jun 09 2009

More terms from Klaus Brockhaus (klaus-brockhaus(AT)t-online.de), Jun 10 2009

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 December 6 22:55 EST 2009. Contains 170429 sequences.


AT&T Labs Research