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-2 of 2 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

A334765 Numbers m such that the numbers of 1's in the binary expansion of m equals the negative sum of balanced ternary trits of m.

Original entry on oeis.org

0, 41, 68, 131, 132, 368, 384, 528, 1095, 1098, 1100, 1106, 1112, 1122, 1124, 1152, 1176, 1346, 1824, 2561, 3282, 3284, 3336, 3344, 3392, 3524, 4098, 4101, 4104, 4112, 4118, 4128, 4172, 4352, 4496, 4739, 4740, 5504, 6224, 9856, 9857, 9869, 9896, 9923, 9924
Offset: 1

Views

Author

Thomas König, May 10 2020

Keywords

Comments

a(116) = 32770, a(117) = 32771 and a(118) = 32772 is the first time that three consecutive numbers appear in this sequence. Conjecture: There is no occurrence of four or more consecutive numbers. Tested by exhaustive search up to a(n) = 3^26. - Thomas König, Jul 19 2020

Examples

			41_10 = 1TTTT_bt = 101001_2, the sum of the digits is 1-1-1-1-1 = -3 for balanced ternary and 1+1+1 = 3 for base 2, so 41 is a term.
		

Crossrefs

Aside from the first term, subsequence of A174657.

Programs

  • Mathematica
    Select[Range[0, 10^4], -Total@ If[First@ # == 0, Rest@ #, #] &[Prepend[IntegerDigits[#, 3], 0] //. {x___, y_, k_ /; k > 1, z___} :> {x, y + 1, -1, z}] == DigitCount[#, 2, 1] &] (* Michael De Vlieger, Jul 08 2020 *)
  • PARI
    bt(n)= if (n==0, return (0)); my(d=digits(n, 3), c=1); while(c, if(d[1]==2, d=concat(0, d)); c=0; for(i=2, #d, if(d[i]==2, d[i]=-1; d[i-1]+=1; c=1))); vecsum(d); \\ A065363
    isok(m) = bt(m) + hammingweight(m) == 0; \\ Michel Marcus, Jun 07 2020

Formula

Integers m such that -A065363(m) = A000120(m).
Showing 1-2 of 2 results.