Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A117891
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A117891 Numbers n such that both the number of non-leading 0's in the binary representation of n and the number of 1's in the binary representation of n divide n. +0
2
2, 4, 6, 10, 12, 16, 18, 24, 36, 40, 42, 48, 55, 60, 80, 84, 108, 110, 120, 126, 132, 144, 156, 172, 180, 184, 192, 204, 212, 216, 222, 228, 232, 240, 246, 252, 256, 276, 300, 318, 324, 336, 340, 360, 366, 378, 414, 420, 438, 440, 444, 460, 462, 474, 480, 486 (list; graph; listen)
OFFSET

1,1

EXAMPLE

24 is 11000 in binary. This binary representation has three 0's, and 3 divides 24. Also, the binary representation has two 1's, and 2 also divides 24. So 24 is in the sequence.

PROGRAM

(C) #include <stdio.h> int main(int argc, char *argv[]) { for(int n=1; n< 500 ; n++) { int digs[2] ; int nshifted=n ; digs[0]=digs[1]=0 ; while(nshifted) { digs[ nshifted & 1]++ ; nshifted >>= 1 ; } if ( digs[0] && digs[1]) if( ( n % digs[0]) == 0 && (n %digs[1]) ==0) printf("%d, ", n) ; } } - R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Apr 03 2006

CROSSREFS

Cf. A049445, A117890.

Sequence in context: A075728 A006093 A127965 this_sequence A072752 A036634 A005942

Adjacent sequences: A117888 A117889 A117890 this_sequence A117892 A117893 A117894

KEYWORD

easy,nonn

AUTHOR

Leroy Quet (qq-quet(AT)mindspring.com), Mar 30 2006

EXTENSIONS

More terms from R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Apr 03 2006

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 August 29 17:54 EDT 2008. Contains 143238 sequences.


AT&T Labs Research