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-4 of 4 results.

A037301 Numbers whose base-2 and base-3 expansions have the same digit sum.

Original entry on oeis.org

0, 1, 6, 7, 10, 11, 12, 13, 18, 19, 21, 36, 37, 46, 47, 58, 59, 60, 61, 86, 92, 102, 103, 114, 115, 120, 121, 166, 167, 172, 173, 180, 181, 198, 199, 216, 217, 222, 223, 261, 273, 282, 283, 285, 298, 299, 300, 301, 306, 307, 309, 318
Offset: 1

Views

Author

Keywords

Comments

If Sum_{i=0..k} (binomial(k,i) mod 2) == Sum_{i=0..k} (binomial(k,i) mod 3) then k is in the sequence. (The converse does not hold.) - Benoit Cloitre, Nov 16 2003
Problem: To prove that the sequence is infinite. A generalization: Let s_m(k) denote the sum of digits of k in base m; does the Diophantine equation s_p(k) = s_q(k), where p,q are fixed distinct primes, have infinitely many solutions? - Vladimir Shevelev, Jul 30 2009
Also, numbers k such that the exponent of the largest power of 2 dividing k! is exactly twice the exponent of the largest power of 3 dividing k!. - Ivan Neretin, Mar 08 2015
a(5) = 10, a(6) = 11, a(7) = 12 and a(8) = 13 is the first time that four consecutive terms appear in this sequence. Conjecture: There is no occurrence of five or more consecutive terms of a(n). Tested by exhaustive search up to a(n) = 3^29. - Thomas König, Aug 15 2020

Crossrefs

Programs

  • Mathematica
    Select[ Range@ 320, Total@ IntegerDigits[#, 2] == Total@ IntegerDigits[#, 3] &] (* Robert G. Wilson v, Oct 24 2014 *)
  • PARI
    is(n)=sumdigits(n,3)==hammingweight(n) \\ Charles R Greathouse IV, May 21 2015

Formula

A053735(a(n)) = A000120(a(n)); A180017(a(n)) = 0. - Reinhard Zumkeller, Aug 06 2010

Extensions

Zero prepended by Zak Seidov, May 31 2010

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.

A180019 Difference of sums of digits of n in decimal and in ternary representation.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Aug 06 2010

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sumdigits(n) - sumdigits(n, 3); \\ Michel Marcus, Nov 06 2022

Formula

a(n) = A007953(n) - A053735(n);
a(A037315(n)) = 0;
a(A011557(n)) = 1 - A053735(A011557(n));
a(A000244(n)) = A007953(A000244(n)) - 1;
a(A002283(n)) = A008591(n) - A053735(A002283(n));
a(A024023(n)) = A007953(A024023(n)) - 2*n.

A375257 Numbers whose sum of base-2 digits is 1 more than their sum of base-3 digits.

Original entry on oeis.org

3, 9, 15, 28, 29, 39, 45, 57, 82, 83, 84, 85, 94, 95, 99, 110, 118, 119, 123, 135, 162, 163, 165, 174, 175, 183, 207, 219, 248, 297, 303, 315, 324, 325, 334, 335, 342, 343, 363, 382, 383, 406, 407, 411, 423, 435, 441, 447, 459, 488, 494, 496, 497, 502, 503, 506, 508, 509, 543, 570, 571, 573, 603
Offset: 1

Views

Author

Robert Israel, Aug 07 2024

Keywords

Comments

Numbers k such that A000120(k) = A053735(k) + 1.

Examples

			a(3) = 15 is a term because 15 = 1111_2 = 120_3 so A000120(15) = 1+1+1+1 = 4 and A053735(15) = 1+2+0 = 3.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) convert(convert(n,base,2),`+`) = convert(convert(n,base,3),`+`)+1 end proc:
    select(filter, [$1..1000]);
  • Mathematica
    Select[Range[600], Subtract @@ DigitSum[#, {2, 3}] == 1 &] (* Amiram Eldar, Aug 08 2024 *)
  • PARI
    isok(k) = sumdigits(k,2) == 1 + sumdigits(k, 3); \\ Michel Marcus, Aug 08 2024
  • Python
    from sympy.ntheory import digits
    def ok(n): return sum(digits(n, 2)[1:]) == sum(digits(n, 3)[1:]) + 1
    print([k for k in range(604) if ok(k)]) # Michael S. Branicky, Aug 08 2024
    
Showing 1-4 of 4 results.