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

A272797 Least k for which A065413(k) = n, or 0 if no such k exists.

Original entry on oeis.org

13, 1, 27, 23, 891, 4795, 125201, 3253303
Offset: 0

Views

Author

Robert Israel, May 06 2016

Keywords

Examples

			a(3) = 23 because the first occurrence of 3 in A065413 is A065413(23) = 3.
		

Crossrefs

Cf. A065413.

Programs

  • Maple
    # given vector A of size N constructed as in A065413
    M:= max(A):
    B:= Array(0..M):
    for i from 1 to N do
    if B[A[i]] = 0 then B[A[i]]:= i fi
    od:
    convert(B,list); # Robert Israel, May 06 2016

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

Original entry on oeis.org

13, 19, 25, 26, 35, 38, 47, 49, 50, 52, 55, 67, 70, 76, 94, 95, 97, 98, 100, 103, 104, 109, 110, 115, 117, 131, 134, 140, 151, 152, 157, 159, 171, 175, 179, 183, 185, 187, 188, 190, 193, 194, 196, 199, 200, 203, 206, 208, 217, 218, 220, 227, 229
Offset: 1

Views

Author

N. J. A. Sloane, Jan 09 2001

Keywords

Comments

Equivalently, these are the natural numbers that cannot be written as the arithmetic mean of distinct powers of 2. - Brian Kell, Feb 28 2009

Crossrefs

Programs

  • Maple
    For Maple code see A058906.
  • Mathematica
    Do[k = n; While[ Apply[ Plus, IntegerDigits[k, 2] ]*n != k && k < 250n, k += n]; If[k == 250n, Print[n] ], {n, 1, 10^3} ]
  • Python
    from itertools import count, islice, combinations_with_replacement
    def A058898_gen(startvalue=1): # generator of terms >= startvalue
        for n in count(max(startvalue,1)):
            for l in count(1):
                if l*n < 1<0 and sorted(bin(s*n)[2:]) == [str(e) for e in d]:
                        break
                else:
                    continue
                break
    A058898_list = list(islice(A058898_gen(),20)) # Chai Wah Wu, May 09 2023

Formula

n such that A065413(n) = 0. - Brian Kell, Mar 01 2009

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 *)

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 *)

A272761 List of indices i such that A065879(i) != A065880(i).

Original entry on oeis.org

23, 27, 37, 41, 46, 53, 54, 57, 69, 71, 74, 77, 79, 81, 82, 83, 85, 89, 91, 92, 101, 105, 106, 107, 108, 113, 114, 121, 125, 133, 135, 138, 139, 141, 142, 143, 147, 148, 153, 154, 158, 161, 162, 163, 164, 166, 167, 169, 170, 173, 177, 178, 181, 182, 184, 197
Offset: 1

Views

Author

Peter Kagey, May 06 2016

Keywords

Comments

Equivalently a list of indices i such that A272759(i) != A272760(i).
Also, a list of indices i such that A065413(i) > 1.

Crossrefs

Showing 1-6 of 6 results.