cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A117890 Numbers k such that number of non-leading 0's in binary representation of k divides k.

This page as a plain text file.
%I A117890 #24 Jul 16 2025 12:37:04
%S A117890 2,4,5,6,10,11,12,13,14,16,18,22,23,24,26,27,28,29,30,36,40,42,46,47,
%T A117890 48,54,55,58,59,60,61,62,65,75,76,78,80,84,88,90,94,95,99,100,102,104,
%U A117890 105,108,110,111,112,114,118,119,120,122,123,124,125,126,132,140,144,145
%N A117890 Numbers k such that number of non-leading 0's in binary representation of k divides k.
%C A117890 Contains primes of A095078(n) as a subset. Intersection of a(n) with A049445(n) is A117891(n). - _R. J. Mathar_, Apr 03 2006
%H A117890 Reinhard Zumkeller, <a href="/A117890/b117890.txt">Table of n, a(n) for n = 1..10000</a>
%F A117890 a(n) <= A117891(n). - _R. J. Mathar_, Apr 03 2006
%F A117890 a(n) mod A023416(a(n)) = 0. - _Reinhard Zumkeller_, Nov 22 2007
%e A117890 24 is 11000 in binary. This binary representation has three 0's and 3 divides 24. So 24 is in the sequence.
%o A117890 (C)
%o A117890 #include <stdio.h>
%o A117890 int main(int argc, char *argv[]) { for(int n=1; n< 500; n++) { int digs=0; int nshifted=n; while(nshifted) { digs += 1- nshifted & 1; nshifted >>= 1; } if ( digs) if( n % digs == 0 ) printf("%d, ",n); } } // _R. J. Mathar_, Apr 03 2006
%o A117890 (Haskell)
%o A117890 a117890 n = a117890_list !! (n-1)
%o A117890 a117890_list = [x | x <- [1..], let z = a023416 x, z > 0, mod x z == 0]
%o A117890 -- _Reinhard Zumkeller_, Mar 31 2015
%Y A117890 Cf. A049445, A117891.
%Y A117890 Cf. A023416.
%K A117890 easy,nonn
%O A117890 1,1
%A A117890 _Leroy Quet_, Mar 30 2006
%E A117890 More terms from _R. J. Mathar_, Apr 03 2006