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 15 results. Next

A003635 Inconsummate numbers in base 10: no number is this multiple of the sum of its digits (in base 10).

Original entry on oeis.org

62, 63, 65, 75, 84, 95, 161, 173, 195, 216, 261, 266, 272, 276, 326, 371, 372, 377, 381, 383, 386, 387, 395, 411, 416, 422, 426, 431, 432, 438, 441, 443, 461, 466, 471, 476, 482, 483, 486, 488, 491, 492, 493, 494, 497, 498, 516, 521, 522, 527, 531, 533, 536
Offset: 1

Views

Author

Keywords

References

  • J. H. Conway, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    For Maple code see A058906.
  • Mathematica
    nmax = 1000; Reap[ Do[k = n; kmax = 100*n; While[ Tr[ IntegerDigits[k]]*n != k && k < kmax, k = k + n]; If[k == kmax, Sow[n]], {n, 1, nmax}]][[2, 1]] (* Jean-François Alcover, Jul 12 2012 *)
  • Python
    from itertools import count, islice, combinations_with_replacement
    def A003635_gen(startvalue=1): # generator of terms >= startvalue
        for n in count(max(startvalue,1)):
            for l in count(1):
                if 9*l*n < 10**(l-1):
                    yield n
                    break
                for d in combinations_with_replacement(range(10),l):
                    if (s:=sum(d))>0 and sorted(str(s*n)) == [str(e) for e in d]:
                        break
                else:
                    continue
                break
    A003635_list = list(islice(A003635_gen(),20)) # Chai Wah Wu, May 09 2023

A052491 Smallest "inconsummate number" in base n: smallest number such that in base n, no number is this multiple of the sum of its digits.

Original entry on oeis.org

13, 17, 29, 16, 27, 30, 42, 46, 62, 68, 86, 92, 114, 122, 147, 154, 182, 192, 222, 232, 266, 278, 314, 326, 367, 380, 422, 436, 482, 498, 546, 562, 614, 632, 688, 704, 762, 782, 842, 862, 926, 948, 1014, 1036, 1107, 1130, 1202, 1226, 1302, 1328, 1406, 1432
Offset: 2

Views

Author

J. H. Conway, Dec 30 2000

Keywords

Examples

			a(10) = 62, from A003635.
		

Crossrefs

Programs

  • Mathematica
    Do[n = 1; While[k = n; While[ Apply[ Plus, IntegerDigits[k, b] ]*n != k && k < 100n, k += n ]; k != 100n, n++ ]; Print[n], {b, 2, 54} ]
  • Python
    from itertools import count, combinations_with_replacement
    from sympy.ntheory import digits
    def A052491(n):
        for k in count(1):
            for l in count(1):
                if (n-1)*l*k < n**(l-1):
                    return k
                for d in combinations_with_replacement(range(n),l):
                    if (s:=sum(d)) > 0 and sorted(digits(s*k,n)[1:]) == list(d):
                        break
                else:
                    continue
                break # Chai Wah Wu, May 09 2023

Extensions

Corrected and extended by David Radcliffe, Jan 08 2001
More terms from David W. Wilson, Jan 10 2001

A058907 Inconsummate numbers in base 12: no number is this multiple of the sum of its digits (in base 12).

Original entry on oeis.org

86, 87, 88, 90, 99, 101, 102, 112, 113, 114, 125, 126, 138, 229, 235, 244, 245, 246, 256, 258, 269, 270, 282, 307, 373, 379, 385, 391, 392, 400, 402, 426, 451, 464, 530, 535, 536, 542, 543, 547, 548, 607, 608, 620, 667, 673, 674, 679, 680, 685
Offset: 1

Views

Author

N. J. A. Sloane, Jan 09 2001

Keywords

Crossrefs

Programs

  • Maple
    For Maple code see A058906.
  • Mathematica
    base=12; Do[k=n; While[Apply[Plus, IntegerDigits[k, base]] n!=k&&k<250n, k+=n]; If[k==250 n, Print[n]], {n, 1, 10^3}] (* Vincenzo Librandi, Sep 23 2017; after N. J. A. Sloane in A058906 *)
  • Python
    from itertools import count, islice, combinations_with_replacement
    from sympy.ntheory import digits
    def A058907_gen(startvalue=1): # generator of terms >= startvalue
        for n in count(max(startvalue,1)):
            for l in count(1):
                if 11*l*n < 12**(l-1):
                    yield n
                    break
                for d in combinations_with_replacement(range(12),l):
                    if (s:=sum(d)) > 0 and sorted(digits(s*n,12)[1:]) == list(d):
                        break
                else:
                    continue
                break
    A058907_list = list(islice(A058907_gen(),20)) # Chai Wah Wu, May 10 2023

A058906 Inconsummate numbers in base 11: no number is this multiple of the sum of its digits (in base 11).

Original entry on oeis.org

68, 70, 79, 80, 82, 92, 104, 200, 202, 212, 214, 224, 225, 248, 260, 314, 320, 332, 380, 392, 452, 458, 464, 490, 502, 508, 512, 513, 514, 518, 520, 524, 530, 562, 568, 574, 578, 579, 580, 584, 585, 590, 592, 595, 598, 599, 622, 628, 634, 635
Offset: 1

Views

Author

N. J. A. Sloane, Jan 09 2001

Keywords

Crossrefs

Programs

  • Maple
    digitsum := proc (n,b) local i; add(i,i=convert(n,base,b)) end; b := 11:N := 43922; L := []: for n from 1 to N do k := digitsum(n,b): if (n mod k)=0 then L := [op(L), n/k] fi: od: M := []: for i from 1 to 1000 do if not(member(i,L)) then M := [op(M),i] fi od: lprint(M);
  • Mathematica
    base = 11; Do[k = n; While[ Apply[ Plus, IntegerDigits[k, base] ]*n != k && k < 250n, k += n]; If[k == 250n, Print[n] ], {n, 1, 10^3} ]
  • Python
    from itertools import count, islice, combinations_with_replacement
    from sympy.ntheory import digits
    def A058906_gen(startvalue=1): # generator of terms >= startvalue
        for n in count(max(startvalue,1)):
            for l in count(1):
                if 10*l*n < 11**(l-1):
                    yield n
                    break
                for d in combinations_with_replacement(range(11),l):
                    if (s:=sum(d)) > 0 and sorted(digits(s*n,11)[1:]) == list(d):
                        break
                else:
                    continue
                break
    A058906_list = list(islice(A058906_gen(),20)) # Chai Wah Wu, May 09 2023

A065880 Largest positive number that is n times the number of 1's in its binary expansion, or 0 if no such number exists.

Original entry on oeis.org

0, 1, 2, 6, 4, 10, 12, 21, 8, 18, 20, 55, 24, 0, 42, 60, 16, 34, 36, 0, 40, 126, 110, 115, 48, 0, 0, 108, 84, 116, 120, 155, 32, 66, 68, 0, 72, 222, 0, 156, 80, 246, 252, 172, 220, 180, 230, 0, 96, 0, 0, 204, 0, 318, 216, 0, 168, 285, 232, 295, 240, 366, 310, 378, 64, 130
Offset: 0

Views

Author

Henry Bottomley, Nov 26 2001

Keywords

Comments

a(n) is bounded above by n*A272756(n), so a program only has to check values up to that point to see if a(n) is zero. - Peter Kagey, May 05 2016

Examples

			a(23)=115 since 115 is written in binary as 1110011 and 115/(1+1+1+0+0+1+1)=23 and there is no higher possibility (if k is more than 127 then k divided by its number of binary 1's is more than 26).
		

Crossrefs

A052489 is the base 10 equivalent.

Programs

  • Mathematica
    Table[SelectFirst[Reverse@ Range@ #, First@ DigitCount[#, 2] == #/n &] &[n SelectFirst[Range[2^12], # > IntegerLength[n #, 2] &]], {n, 80}] /. k_ /; MissingQ@ k -> 0 (* Michael De Vlieger, May 05 2016, Version 10.2 *)

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

A065878 Numbers which are not an integer multiple of their number of binary 1's.

Original entry on oeis.org

3, 5, 7, 9, 11, 13, 14, 15, 17, 19, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 35, 37, 38, 39, 41, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 61, 62, 63, 65, 67, 70, 71, 73, 74, 75, 76, 77, 78, 79, 82, 83, 85, 86, 87, 88, 89, 90, 91, 93, 94, 95, 97, 98, 99, 100
Offset: 1

Views

Author

Henry Bottomley, Nov 26 2001

Keywords

Examples

			5 is in the sequence since 5 = 101_2 and 5 is not a multiple of 1 + 0 + 1 = 2.
		

Crossrefs

Complement of A049445.
The base-10 equivalent is A065877.

Programs

  • Mathematica
    Select[Range[100],!IntegerQ[#/Total[IntegerDigits[#,2]]]&]  (* Harvey P. Dale, Apr 20 2011 *)
  • PARI
    isok(k) = k % hammingweight(k); \\ Amiram Eldar, Aug 04 2025

A065879 a(n) is the smallest positive number that is n times the number of 1's in its binary expansion, or 0 if no such number exists.

Original entry on oeis.org

1, 2, 6, 4, 10, 12, 21, 8, 18, 20, 55, 24, 0, 42, 60, 16, 34, 36, 0, 40, 126, 110, 69, 48, 0, 0, 81, 84, 116, 120, 155, 32, 66, 68, 0, 72, 185, 0, 156, 80, 205, 252, 172, 220, 180, 138, 0, 96, 0, 0, 204, 0, 212, 162, 0, 168, 228, 232, 295, 240, 366, 310, 378, 64, 130
Offset: 1

Views

Author

Henry Bottomley, Nov 26 2001

Keywords

Comments

a(n) is bounded above by n*A272756(n), so a program only has to check values up to that point to see if a(n) is zero. - Peter Kagey, May 05 2016

Examples

			a(23) is 69 since 69 is written in binary as 1000101, 69/(1+0+0+0+1+0+1)=23 and there is no smaller possibility (neither 23 nor 46 are divisible by their number of binary 1's).
		

Crossrefs

A003634 is the base-10 equivalent.

Programs

  • Mathematica
    Table[SelectFirst[Range[2^12], # == n First@ DigitCount[#, 2] &] /. k_ /; MissingQ@ k -> 0, {n, 80}] (* Michael De Vlieger, May 05 2016, Version 10.2 *)

A058899 Inconsummate numbers in base 3: no number is this multiple of the sum of its digits (in base 3).

Original entry on oeis.org

17, 32, 44, 51, 94, 95, 96, 106, 107, 112, 118, 132, 148, 153, 199, 224, 226, 232, 235, 236, 238, 256, 265, 268, 269, 274, 277, 281, 282, 284, 285, 288, 296, 308, 318, 321, 334, 336, 343, 352, 354, 368, 396, 442, 443, 444, 454, 459, 469, 472
Offset: 1

Views

Author

N. J. A. Sloane, Jan 09 2001

Keywords

Crossrefs

Programs

  • Maple
    For Maple code see A058906.
  • Mathematica
    base=3; Do[k=n; While[Apply[Plus, IntegerDigits[k, base]] n!=k&&k<250 n, k+=n]; If[k==250 n, Print[n]], {n, 1, 10^3}] (* Vincenzo Librandi, Sep 23 2017 *)
  • Python
    from itertools import count, islice, combinations_with_replacement
    from sympy.ntheory import digits
    def A058899_gen(startvalue=1): # generator of terms >= startvalue
        for n in count(max(startvalue,1)):
            for l in count(1):
                if 2*l*n < 3**(l-1):
                    yield n
                    break
                for d in combinations_with_replacement((0,1,2),l):
                    if (s:=sum(d)) > 0 and sorted(digits(s*n,3)[1:]) == list(d):
                        break
                else:
                    continue
                break
    A058899_list = list(islice(A058899_gen(),20)) # Chai Wah Wu, May 10 2023

A058900 Inconsummate numbers in base 4: no number is this multiple of the sum of its digits (in base 4).

Original entry on oeis.org

29, 41, 71, 83, 93, 111, 113, 114, 116, 117, 122, 123, 125, 135, 137, 143, 146, 153, 164, 167, 191, 197, 201, 237, 242, 263, 275, 279, 282, 284, 285, 291, 303, 305, 311, 323, 326, 327, 332, 359, 362, 369, 372, 375, 377, 382, 383, 389, 407, 410
Offset: 1

Views

Author

N. J. A. Sloane, Jan 09 2001

Keywords

Crossrefs

Programs

  • Maple
    For Maple code see A058906.
  • Python
    from itertools import count, islice, combinations_with_replacement
    from sympy.ntheory import digits
    def A058900_gen(startvalue=1): # generator of terms >= startvalue
        for n in count(max(startvalue,1)):
            for l in count(1):
                if 3*l*n < 1<<((l-1)<<1):
                    yield n
                    break
                for d in combinations_with_replacement((0,1,2,3),l):
                    if (s:=sum(d)) > 0 and sorted(digits(s*n,4)[1:]) == list(d):
                        break
                else:
                    continue
                break
    A058900_list = list(islice(A058900_gen(),20)) # Chai Wah Wu, May 10 2023
Showing 1-10 of 15 results. Next