The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Please make a donation to keep the OEIS running. We are now in our 56th year. In the past year we added 10000 new sequences and reached almost 9000 citations (which often say "discovered thanks to the OEIS"). Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A037308 Numbers k such that (sum of base-2 digits of k) = (sum of base 10 digits of k). 19
 0, 1, 20, 21, 122, 123, 202, 203, 222, 223, 230, 231, 302, 303, 410, 411, 502, 503, 1130, 1131, 1150, 1151, 1202, 1203, 1212, 1213, 1230, 1231, 1300, 1301, 1402, 1403, 1502, 1503, 1510, 1511, 2006, 2007, 2032, 2033, 2102, 2103, 2200, 2201, 3006, 3007, 3012 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS n is in the sequence iff n+(-1)^n is in the sequence. [Robert Israel, Mar 25 2013] LINKS Charles R Greathouse IV, Table of n, a(n) for n = 1..10000 FORMULA From Reinhard Zumkeller, Aug 06 2010: (Start) A007953(a(n)) = A000120(a(n)); A180018(a(n)) = 0. (End) EXAMPLE 122 is a member, since digital-sum_2(122) = 5 = digital-sum_10(122). MAPLE N:= 10000; # to get all elements up to N select(x -> (convert(convert(x, base, 10), `+`)-convert(convert(x, base, 2), `+`)=0), [\$0..N]); # Robert Israel, Mar 25 2013 MATHEMATICA Select[Range[0, 5000], Total[IntegerDigits[#, 2]] == Total[IntegerDigits[#, 10]] &] (* Jean-François Alcover, Mar 07 2016 *) PROG (PARI) is(n)=hammingweight(n)==sumdigits(n); \\ Charles R Greathouse IV, Sep 25 2012 (Sage) [n for n in (0..10000) if sum(n.digits(base=2)) == sum(n.digits(base=10))] # Freddy Barrera, Oct 12 2018 CROSSREFS Cf. A000040, A000120, A007953, A054899, A131451, A133620, A133900, A134599, A135110, A180018. Sequence in context: A041826 A041824 A309829 * A041828 A041830 A041832 Adjacent sequences:  A037305 A037306 A037307 * A037309 A037310 A037311 KEYWORD nonn,base AUTHOR EXTENSIONS Edited by N. J. A. Sloane Nov 29 2008 at the suggestion of Zak Seidov STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified November 24 07:50 EST 2020. Contains 338607 sequences. (Running on oeis4.)