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

A065413 Number of positive solutions to "numbers that are n times their number of binary 1's".

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 3, 1, 0, 0, 2, 1, 1, 1, 1, 1, 1, 1, 0, 1, 2, 0, 1, 1, 2, 1, 1, 1, 1, 3, 0, 1, 0, 0, 1, 0, 2, 2, 0, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 2, 0, 2, 1, 1, 2, 1, 0, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 1, 1, 2, 1, 2, 3, 1, 0, 0, 1, 0, 0, 1, 0, 2, 1, 0, 0, 2
Offset: 1

Views

Author

Henry Bottomley, Nov 23 2001

Keywords

Comments

Equivalently, this is the number of ways to write n as an arithmetic mean of distinct powers of 2. [Brian Kell, Mar 01 2009]

Examples

			a(23)=3 since 69, 92 and 115 are written in binary as 1000101, 1011100 and 1110011 and 69=23*3, 92=23*4 and 115=23*5.
		

Crossrefs

Cf. A000120, A037478, A058898, A272797 (greedy inverse).

Programs

  • Maple
    N:= 1000: # to get a(1) to a(N)
    A:= Vector(N):
    for x from 1 while x/(1+ilog2(x)) <= N do
      v:= x/convert(convert(x,base,2),`+`);
      if v::integer and v <= N then
        A[v]:= A[v]+1
      fi
    od:
    seq(A[i],i=1..N); # Robert Israel, May 06 2016
    # alternative program
    read("transforms") :
    A065413 := proc(n)
        local bdgs,a,x;
        a := 0 ;
        for bdgs from 1 do
            x := n*bdgs ;
            # x must have bdgs bits set, so x =bdgs*n >= 2^bdgs-1.
            if n < (2^bdgs-1)/x then
                break;
            elif wt(x) = bdgs then
                a := a+1 ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, May 11 2016

A058913 Smallest number k such that x/(sum of digits of x) = k has exactly n solutions.

Original entry on oeis.org

62, 2, 26, 13, 4, 157, 187, 64, 73, 1, 82, 19, 28, 46, 172, 37, 1702, 10234, 16687, 104302, 171586, 174286, 858601, 36803224, 139109014, 80151508, 1098060598, 1097980606, 28932657301, 26609796712, 118985118985
Offset: 0

Views

Author

David W. Wilson, Jan 10 2001

Keywords

Crossrefs

Smallest inverse of A037478.

Extensions

Corrected offset and a(19)-a(25) from Bert Dobbelaere, Jan 15 2020
a(26)-a(29) from Giovanni Resta, Jan 15 2020
a(30) from Giovanni Resta, Jan 16 2020

A065118 Numbers which are 19 times the sum of their digits.

Original entry on oeis.org

114, 133, 152, 171, 190, 209, 228, 247, 266, 285, 399
Offset: 0

Views

Author

Henry Bottomley, Nov 20 2001

Keywords

Comments

The digit sums of the first 10 numbers are consecutive: 6, 7, 8, 9, 10, 11, 12, 13, 14, 15. [Howard Berman (howard_berman(AT)hotmail.com), Apr 25 2009]
From Bruno Berselli, Nov 29 2013: (Start)
Numbers which are k times the sum of their digits:
k = 1: 1, 2, 3, 4, 5, 6, 7, 8, 9;
k = 2: 18;
k = 3: 27;
k = 4: 12, 24, 36, 48;
k = 5: 45;
k = 6: 54;
k = 7: 21, 42, 63, 84;
k = 8: 72;
k = 9: 81;
k = 10: 10, 20, 30, 40, 50, 60, 70, 80, 90;
k = 11: 198;
k = 12: 108;
k = 13: 117, 156, 195;
k = 14: 126;
k = 15: 135;
k = 16: 144, 192, 288;
k = 17: 153;
k = 18: 162;
k = 19: this sequence;
k = 20: 180;
k = 21: 378;
k = 22: 132, 264, 396;
k = 23: 207;
k = 24: 216;
k = 25: 150, 225, 375;
k = 26: 234, 468;
k = 27: 243, 486;
k = 28: 112, 140, 224, 252, 280, 308, 336, 364, 392, 448, 476, 588;
k = 29: 261;
k = 30: 270.
Also, k = 37 (prime) generates the list: 111, 222, 333, 370, 407, 444, 481, 518, 555, 592, 629, 666, 777, 888, 999. (End)

Examples

			114 = 19*(1+1+4), 133 = 19*(1+3+3) etc.
		

Crossrefs

Cf. A037478.

Programs

  • Mathematica
    Select[Range[400],#==19*Total[IntegerDigits[#]]&] (* Harvey P. Dale, Feb 17 2018 *)
Showing 1-3 of 3 results.