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.

Showing 1-10 of 18 results. Next

A152206 a(n) = sum of base-2 digits of A037308(n) = sum of base-10 digits of A037308(n).

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 4, 5, 6, 7, 5, 6, 5, 6, 5, 6, 7, 8, 5, 6, 7, 8, 5, 6, 6, 7, 6, 7, 4, 5, 7, 8, 8, 9, 7, 8, 8, 9, 7, 8, 5, 6, 4, 5, 9, 10, 6, 7, 8, 9, 10, 11, 6, 7, 5, 6, 6, 7, 9, 10, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 9, 10, 7, 8, 10, 11, 10, 11, 7, 8, 6, 7, 6, 7, 7, 8, 8, 9, 5, 6, 7, 8, 9, 10, 10, 11, 5, 6, 6
Offset: 0

Views

Author

Zak Seidov, Nov 29 2008

Keywords

Crossrefs

Cf. A037308, Sum of base-2 digits of n = sum of base-10 digits of n.

A135121 Numbers such that the digital sum base 2 and the digital sum base 3 and the digital sum base 5 all are equal.

Original entry on oeis.org

0, 1, 6, 7, 10, 11, 60, 61, 180, 181, 285, 300, 301, 575, 687, 754, 826, 827, 882, 883, 900, 901, 910, 911, 1254, 1305, 1311, 1326, 1327, 1335, 1377, 1383, 1386, 1387, 1395, 1431, 1506, 1507, 1532, 1626, 1627, 1650, 1651, 1890, 1891, 1955, 2013, 2036, 2040
Offset: 1

Views

Author

Hieronymus Fischer, Dec 31 2007

Keywords

Examples

			a(2)=6, since ds_2(6)=ds_3(6)=ds_5(6), where ds_x=digital sum base x.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0,3000],Length[Union[Total/@IntegerDigits[#,{2,3,5}]]]==1&] (* Harvey P. Dale, Sep 04 2014 *)

Extensions

Added 0, Stanislav Sykora, May 06 2012

A135127 Numbers such that the digital sums in bases 2, 3, 5 and 7 all are equal.

Original entry on oeis.org

0, 1, 882, 883, 1386, 1387, 2502, 2503, 3453, 7555, 7652, 7665, 7931, 9751, 10101, 12250, 12251, 16893, 17010, 17011, 17515, 17550, 17551, 18285, 20301, 22050, 22051, 24406, 24407, 25053, 27503, 31654, 40930, 40931, 41951, 50878, 50879
Offset: 1

Views

Author

Hieronymus Fischer, Dec 31 2007

Keywords

Examples

			a(2)=882, since ds_2(882 )=ds_3(882 )=ds_5(882 )=ds_7(882 )=6, where ds_x=digital sum base x.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 32000], Total[IntegerDigits[#, 2]] == Total[IntegerDigits[#, 3]] == Total[IntegerDigits[#, 5]] == Total[IntegerDigits[#, 7]] &] (* G. C. Greubel, Sep 27 2016 *)
    Select[Range[0,51000],Length[Union[Total/@IntegerDigits[#,{2,3,5,7}]]] == 1&] (* Harvey P. Dale, Sep 18 2019 *)

Extensions

Added 0, Stanislav Sykora, May 06 2012

A180018 Difference of sums of digits of n in decimal and in binary representation.

Original entry on oeis.org

0, 0, 1, 1, 3, 3, 4, 4, 7, 7, -1, -1, 1, 1, 2, 2, 6, 6, 7, 7, 0, 0, 1, 1, 4, 4, 5, 5, 7, 7, -1, -1, 4, 4, 5, 5, 7, 7, 8, 8, 2, 2, 3, 3, 5, 5, 6, 6, 10, 10, 2, 2, 4, 4, 5, 5, 8, 8, 9, 9, 2, 2, 3, 3, 9, 9, 10, 10, 12, 12, 4, 4, 7, 7, 8, 8, 10, 10, 11, 11, 6, 6, 7, 7, 9, 9, 10, 10, 13, 13, 5, 5, 7, 7, 8, 8
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 06 2010

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Total[IntegerDigits[n]]-Total[IntegerDigits[n,2]],{n,0,100}] (* Harvey P. Dale, Dec 27 2015 *)
  • PARI
    a(n) = sumdigits(n) - hammingweight(n); \\ Michel Marcus, Nov 06 2022

Formula

a(n) = A007953(n) - A000120(n);
a(A037308(n)) = 0;
a(A011557(n)) = 1 - A000120(A011557(n));
a(A000079(n)) = A007953(A000079(n)) - 1;
a(A002283(n)) = A008591(n) - A000120(A002283(n));
a(A000225(n)) = A007953(A000225(n)) - n.

A135122 Numbers such that the digital sum base 2 and the digital sum base 3 and the digital sum base 4 all are equal.

Original entry on oeis.org

1, 21, 261, 273, 17748, 17749, 20820, 20821, 65620, 65621, 70740, 70741, 83268, 83269, 86292, 86293, 1066068, 1066069, 1070420, 1135701, 1135893, 1135953, 5326161, 5330001, 5330241, 5330260, 5330261, 5506389, 5525829, 5526801, 5571909, 5574933, 5592321
Offset: 1

Views

Author

Hieronymus Fischer, Dec 31 2007

Keywords

Examples

			a(2)=21, since ds_2(21)=ds_3(21)=ds_10(21)=3, where ds_x=digital sum base x.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[5600000],Length[Union[Table[Total[IntegerDigits[#,n]],{n,2,4}]]]==1&] (* Harvey P. Dale, Aug 14 2013 *)
  • PARI
    isok(n) = my(sd2=sumdigits(n, 2)); (sd2==sumdigits(n, 3)) && (sd2==sumdigits(n, 4)); \\ Michel Marcus, Aug 08 2018

Extensions

a(31)-a(33) from Giovanni Resta, Aug 06 2018

A108580 Numbers whose sum of bits when written in binary > sum of decimal digits.

Original entry on oeis.org

10, 11, 30, 31, 100, 101, 102, 103, 110, 111, 120, 121, 200, 201, 210, 211, 220, 221, 300, 301, 310, 311, 500, 501, 510, 511, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1010, 1011, 1012, 1013, 1014, 1015, 1020, 1021, 1022, 1023, 1100, 1101, 1102, 1103
Offset: 1

Views

Author

John L. Drost, Jul 25 2005

Keywords

Comments

The sequence is infinite because 10^n, n = 1,2,3, .... are terms. - Marius A. Burtea, Sep 07 2019

Examples

			1103 is on the list since 1103 is 10001001111 (sum=6), 1+1+0+3=5.
		

Crossrefs

Subsequence of A325483.

Programs

  • Magma
    [n:n in [1..1200]| &+Intseq(n,2) gt &+Intseq(n,10)];  // Marius A. Burtea, Sep 07 2019
    
  • Mathematica
    Select[Range[1103], Total@IntegerDigits[#, 2] > Total@IntegerDigits[#, 10] &] (* Amiram Eldar, Sep 07 2019 *)
  • PARI
    isok(n) = hammingweight(n) > sumdigits(n); \\ Michel Marcus, Sep 07 2019
    
  • Python
    def ok(n): return sum(map(int, str(n))) < bin(n).count('1')
    print(list(filter(ok, range(1104)))) # Michael S. Branicky, Oct 11 2021

Extensions

a(36) added by Marius A. Burtea, Sep 07 2019

A325483 Numbers whose sum of their decimal digits is less than or equal to the sum of the digits of their binary representation.

Original entry on oeis.org

0, 1, 10, 11, 20, 21, 30, 31, 100, 101, 102, 103, 110, 111, 120, 121, 122, 123, 200, 201, 202, 203, 210, 211, 220, 221, 222, 223, 230, 231, 300, 301, 302, 303, 310, 311, 410, 411, 500, 501, 502, 503, 510, 511, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007
Offset: 1

Views

Author

Keywords

Crossrefs

Supersequence of A037308 and A108580.

Programs

  • Maple
    q:= n-> (f-> is(f(n, 10)<=f(n, 2)))((x, b)
              -> add(i, i=convert(x, base, b))):
    select(q, [$0..1500])[];  # Alois P. Heinz, Sep 06 2019
  • Mathematica
    Select[Range[0,1007], Total[IntegerDigits[#]]<=Total[IntegerDigits[#,2]]&] (* Metin Sariyar, Sep 14 2019 *)
  • PARI
    isok(n) = sumdigits(n, 10) <= sumdigits(n, 2); \\ Michel Marcus, Sep 07 2019
  • Python
    x=0
    #Adjust the inequality below to generate more numbers of the sequence
    while(x<100):
        x = x+1
        Number = int(bin(x)[2:])
        Bin_Sum = 0
        while(Number > 0):
            Reminder = Number % 10
            Bin_Sum = Bin_Sum + Reminder
            Number = Number //10
        Number = x
        Sum = 0
        while(Number > 0):
            Reminder = Number % 10
            Sum = Sum + Reminder
            Number = Number //10
        if (Sum <= Bin_Sum):
            print(x)
    
  • Python
    def ok(n): return sum(map(int, str(n))) <= bin(n).count('1')
    print(list(filter(ok, range(1008)))) # Michael S. Branicky, Oct 11 2021
    

Formula

{ A037308 } union { A108580 }.

A135123 Numbers such that the digital sum base 2 and the digital sum base 3 and the digital sum base 6 all are equal.

Original entry on oeis.org

1, 12, 13, 114, 115, 366, 367, 477, 687, 864, 865, 876, 877, 1086, 1087, 1305, 1326, 1327, 1386, 1387, 1596, 1597, 1626, 1627, 1656, 1657, 1746, 1747, 1836, 1837, 1956, 1957, 2595, 2607, 2646, 2647, 3276, 3277, 3906, 3907, 3948, 3949, 4068, 4069, 5438
Offset: 1

Views

Author

Hieronymus Fischer, Dec 31 2007

Keywords

Examples

			a(2)=12, since ds_2(12)=ds_3(12)=ds_6(12), where ds_x=digital sum base x.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[5000], Total[IntegerDigits[#, 2]] == Total[IntegerDigits[#, 3]] == Total[IntegerDigits[#, 6]] &] (* G. C. Greubel, Sep 26 2016 *)

A135124 Numbers such that the digital sums in base 2, base 4 and base 8 are all equal.

Original entry on oeis.org

1, 64, 65, 4096, 4097, 4160, 4161, 262144, 262145, 262208, 262209, 266240, 266241, 266304, 266305, 16777216, 16777217, 16777280, 16777281, 16781312, 16781313, 16781376, 16781377, 17039360, 17039361, 17039424, 17039425, 17043456
Offset: 1

Views

Author

Hieronymus Fischer, Dec 31 2007, Dec 31 2008

Keywords

Comments

Written as base 64 numbers the sequence is 1,10,11,100,101,110,111,1000,1001, ... (cf. A007088)

Examples

			a(7)=4161, since ds_2(4161 )=ds_4(4161 )=ds_8(4161 ), where ds_x=digital sum base x.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[500000], Total[IntegerDigits[#, 2]] == Total[IntegerDigits[#, 4]] == Total[IntegerDigits[#, 8]] &] (* G. C. Greubel, Sep 26 2016 *)
    With[{k = 64}, Rest@ Map[FromDigits[#, k] &, Tuples[{0, 1}, 5]]] (* Michael De Vlieger, Oct 28 2022 *)
    Select[Range[171*10^5],Length[Union[Total/@IntegerDigits[#,{2,4,8}]]]==1&] (* Harvey P. Dale, May 14 2025 *)
  • PARI
    a(n) = fromdigits(binary(n),64); \\ Kevin Ryde, Apr 02 2025

Formula

a(n) = (1/2)*Sum_{k=0..floor(log_2(n))} (1-(-1)^floor(n/2^k))*64^k.
G.f.: (1/(1-x))*Sum_{k>=0} 64^k*x^(2^k)/(1+x^(2^k)).

Extensions

Edited by N. J. A. Sloane, Jan 17 2009

A135125 Numbers such that the digital sum base 2 and the digital sum base 5 and the digital sum base 10 all are equal.

Original entry on oeis.org

1, 1300, 1301, 5010, 5011, 7102, 7103, 10050, 10051, 10235, 11135, 12250, 12251, 14015, 16102, 16103, 20060, 20061, 20206, 20207, 23230, 23231, 32012, 32013, 32302, 32303, 32410, 32411, 44000, 44001, 45010, 45011, 50012, 50013, 50300
Offset: 1

Views

Author

Hieronymus Fischer, Dec 31 2007

Keywords

Examples

			a(2)=1300, since ds_2(1300)=ds_5(1300)=ds_10(1300), where ds_x=digital sum base x.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10000], Total[IntegerDigits[#, 2]] == Total[IntegerDigits[#, 5]] == Total[IntegerDigits[#, 10]] &] (* G. C. Greubel, Sep 27 2016 *)
Showing 1-10 of 18 results. Next