Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A122953
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A122953 a(n) = number of distinct positive integers represented in binary which are substrings of binary expansion of n. +0
10
1, 2, 2, 3, 3, 4, 3, 4, 4, 4, 5, 6, 6, 6, 4, 5, 5, 5, 6, 6, 5, 7, 7, 8, 8, 8, 8, 9, 9, 8, 5, 6, 6, 6, 7, 6, 7, 8, 8, 8, 8, 6, 8, 10, 9, 10, 9, 10, 10, 10, 10, 11, 10, 10, 11, 12, 12, 12, 12, 12, 12, 10, 6, 7, 7, 7, 8, 7, 8, 9, 9, 8, 7, 9, 10, 10, 11, 11, 10, 10, 10, 10, 11, 9, 7, 11, 11, 13, 13, 12 (list; graph; listen)
OFFSET

1,2

COMMENT

a(n) = A078822(n) if n is of the form 2^k - 1. Otherwise, a(n) = A078822(n) - 1.

First occurrence of k: 1, 2, 4, 6, 11, 12, 22, 24, 28, 44, 52, 56, 88, 92, 112, 116, 186, 184, 220, 232, 244, 368, 376, 440, 472, ...,.

Last occurrence of k: 2^n -1.

LINKS

Leroy Quet, Home Page (listed in lieu of email address)

EXAMPLE

Binary 1 = 1, binary 2 = 10, binary 4 = 100 and binary 9 = 1001 are all substrings of binary 9 = 1001. So a(9) = 4.

MATHEMATICA

f[n_] := Length@ Select[ Union[ FromDigits /@ Flatten[ Table[ Partition[ IntegerDigits[n, 2], i, 1], {i, Floor[ Log[2, n] + 1]}], 1]], # > 0 &]; Array[f, 90]

CROSSREFS

Cf. A078822.

Sequence in context: A066412 A117119 A139141 this_sequence A128998 A137813 A003313

Adjacent sequences: A122950 A122951 A122952 this_sequence A122954 A122955 A122956

KEYWORD

nonn

AUTHOR

Leroy Quet Oct 25 2006

EXTENSIONS

More terms from Robert G. Wilson v Nov 01 2006

page 1

Search completed in 0.007 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 13 23:45 EST 2009. Contains 170824 sequences.


AT&T Labs Research