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.

Previous Showing 11-13 of 13 results.

A371470 Triangle read by rows: for 1 <= k <= n, T(n,k) is the least sum of decimal digits of numbers with n binary digits and binary weight k.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 1, 2, 6, 7, 2, 3, 3, 4, 5, 4, 5, 6, 7, 9, 10, 8, 1, 2, 2, 3, 10, 11, 4, 2, 3, 4, 5, 7, 12, 13, 5, 4, 3, 4, 5, 6, 6, 7, 8, 7, 8, 6, 7, 1, 2, 3, 4, 6, 7, 5, 4, 2, 3, 2, 3, 3, 4, 6, 13, 14, 6, 5, 3, 4, 4, 3, 4, 6, 7, 8, 18, 19, 5, 6, 6, 5, 6, 6, 6, 7, 8, 9, 14, 19, 20, 7, 8, 5
Offset: 1

Views

Author

Robert Israel, May 31 2024

Keywords

Examples

			T(5,3) = 3 because the numbers with 5 binary digits of which 3 are 1 are 19, 21, 22, 25, 26 and 28, and the least sum of decimal digits of these is 3 (for 21).
Triangle starts:
  1;
  2, 3;
  4, 5, 7;
  8, 1, 2, 6;
  7, 2, 3, 3, 4;
  5, 4, 5, 6, 7, 9;
		

Crossrefs

Programs

  • Maple
    M:= proc(n,k) local i,R,m,r,v;
       R:= ListTools:-Reverse(map(t -> 2^(n-1)+add(2^(n-1-t[i]),i=1..k-1), combinat:-choose(n-1,k-1 )));
       m:= infinity;
       for r in R do
         v:= convert(convert(r,base,10),`+`);
         if v < m then m:= v fi;
       od;
       m
    end proc:
    for n from 1 to 12 do
      seq(M(n,k),k=1..n)
    od;

Formula

a(n) = A007953(A373289(n)).
T(A123384(i),A118738(i)) = 1.

A373289 Triangle read by rows: for 1 <= k <= n, T(n,k) is a number with n binary digits and binary weight k whose sum of decimal digits is least; in case of a tie, choose the least such number.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 10, 11, 15, 16, 20, 21, 30, 31, 32, 40, 41, 51, 61, 63, 64, 80, 100, 101, 110, 111, 127, 128, 130, 200, 201, 211, 221, 223, 255, 256, 320, 400, 300, 301, 311, 501, 510, 511, 512, 520, 521, 600, 601, 1000, 1001, 1011, 1021, 1023, 1024, 1040, 1030, 1100, 1101, 2000, 2001, 2010
Offset: 1

Views

Author

Robert Israel, May 30 2024

Keywords

Examples

			T(5,3) = 21 because 21 = 10101_2 has 5 binary digits of which 3 are 1, and it has a lower sum of decimal digits, 3, than the other numbers (19, 22, 25, 26 and 28) with 5 binary digits of which 3 are 1.
Triangle starts
   1;
   2,  3;
   4,  5,  7;
   8, 10, 11, 15;
  16, 20, 21, 30, 31;
  32, 40, 41, 51, 61, 63;
		

Crossrefs

Programs

  • Maple
    M:= proc(n,k) local i,R,m,b,r,v;
       R:= ListTools:-Reverse(map(t -> 2^(n-1)+add(2^(n-1-t[i]),i=1..k-1), combinat:-choose(n-1,k-1 )));
       m:= infinity;
       for r in R do
         v:= convert(convert(r,base,10),`+`);
         if v < m then b:= r; m:= v fi;
       od;
       b
    end proc:
    for n from 1 to 12 do
      seq(M(n,k),k=1..n)
    od;

Formula

T(A123384(i),A118738(i)) = 10^i.
T(m,1) = 2^(m-1).
T(m,m) = 2^m - 1.

A025740 Index of 10^n within sequence of numbers of form 2^i*10^j.

Original entry on oeis.org

1, 5, 12, 22, 36, 53, 73, 97, 124, 154, 188, 225, 265, 309, 356, 406, 460, 517, 577, 641, 708, 778, 852, 929, 1009, 1093, 1180, 1270, 1364, 1461, 1561, 1664, 1771, 1881, 1994, 2111, 2231, 2354, 2481, 2611, 2744, 2881, 3021, 3164, 3311, 3461, 3614, 3771, 3931
Offset: 1

Views

Author

Keywords

Comments

Positions of zeros in A025639. - R. J. Mathar, Jul 06 2025

Crossrefs

Partial sums of A123384.
Previous Showing 11-13 of 13 results.