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

A010061 Binary self or Colombian numbers: numbers that cannot be expressed as the sum of distinct terms of the form 2^k+1 (k>=0), or equivalently, numbers not of form m + sum of binary digits of m.

Original entry on oeis.org

1, 4, 6, 13, 15, 18, 21, 23, 30, 32, 37, 39, 46, 48, 51, 54, 56, 63, 71, 78, 80, 83, 86, 88, 95, 97, 102, 104, 111, 113, 116, 119, 121, 128, 130, 133, 135, 142, 144, 147, 150, 152, 159, 161, 166, 168, 175, 177, 180, 183, 185, 192, 200, 207, 209, 212, 215, 217
Offset: 1

Views

Author

Keywords

Comments

No two consecutive values appear in this sequence (see Links). - Griffin N. Macris, May 31 2020
The asymptotic density of this sequence is (1/8) * (2 - Sum_{n>=1} 1/2^a(n))^2 = 0.252660... (A242403). - Amiram Eldar, Nov 28 2020

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, Section 2.24, pp. 179-180.
  • József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 4, pp. 384-386.
  • G. Troi and U. Zannier, Note on the density constant in the distribution of self-numbers, Bolletino U. M. I. (7) 9-A (1995), 143-148.

Crossrefs

Complement of A228082, or equally, numbers which do not occur in A092391. Gives the positions of zeros (those occurring after a(0)) in A228085-A228087 and positions of ones in A227643. Leftmost column of A228083. Base-10 analog: A003052.

Programs

  • Haskell
    a010061 n = a010061_list !! (n-1)
    a010061_list = filter ((== 0) . a228085) [1..]
    -- Reinhard Zumkeller, Oct 13 2013
    
  • Maple
    # For Maple code see A230091. - N. J. A. Sloane, Oct 10 2013
  • Mathematica
    Table[n + Total[IntegerDigits[n, 2]], {n, 0, 300}] // Complement[Range[Last[#]], #]& (* Jean-François Alcover, Sep 03 2013 *)
  • PARI
    /* Gen(n, b) returns a list of the generators of n in base b. Written by Max Alekseyev (see Alekseyev et al., 2021).
    For example, Gen(101, 10) returns [91, 101]. - N. J. A. Sloane, Jan 02 2022 */
    { Gen(u, b=10) = my(d, m, k);
      if(u<0 || u==1, return([]); );
      if(u==0, return([0]); );
      d = #digits(u, b)-1;
      m = u\b^d;
      while( sumdigits(m, b) > u - m*b^d,
        m--;
        if(m==0, m=b-1; d--; );
      );
      k = u - m*b^d - sumdigits(m, b);
      vecsort( concat( apply(x->x+m*b^d, Gen(k, b)),
                       apply(x->m*b^d-1-x, Gen((b-1)*d-k-2, b)) ) );
    }

Extensions

More terms from Antti Karttunen, Aug 17 2013
Better definition from Matthew C. Russell, Oct 08 2013

A228082 Numbers that are of the form k + sum of binary digits of k for some nonnegative integer k.

Original entry on oeis.org

0, 2, 3, 5, 7, 8, 9, 10, 11, 12, 14, 16, 17, 19, 20, 22, 24, 25, 26, 27, 28, 29, 31, 33, 34, 35, 36, 38, 40, 41, 42, 43, 44, 45, 47, 49, 50, 52, 53, 55, 57, 58, 59, 60, 61, 62, 64, 65, 66, 67, 68, 69, 70, 72, 73, 74, 75, 76, 77, 79, 81, 82, 84, 85, 87, 89, 90
Offset: 1

Views

Author

Antti Karttunen, Aug 09 2013

Keywords

Comments

Complement of A010061.
Obtained when A092391 is sorted and duplicates are removed.
The asymptotic density of this sequence is 1 - (1/8) * (Sum_{n>=1} 1/2^a(n))^2 = 1 - A242403 = 0.747339... - Amiram Eldar, Nov 28 2020

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, Section 2.24, pp. 179-180.
  • József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 4, p. 384-386.
  • G. Troi and U. Zannier, Note on the density constant in the distribution of self-numbers, Bolletino U. M. I. (7) 9-A (1995), 143-148.

Crossrefs

Numbers that occur to the right of the leftmost column of A228083. Positions of nonzeros in A228085. A superset of A228088.
The even terms are the first row of A350601.

Programs

  • Haskell
    a228082 n = a228082_list !! (n-1)
    a228082_list = 0 : filter ((> 0) . a228085) [1..]
    -- Reinhard Zumkeller, Oct 13 2013
  • Mathematica
    Table[n + Total[IntegerDigits[n, 2]], {n, 0, 100}] // Union (* Jean-François Alcover, Sep 03 2013 *)

A227359 Natural numbers that are not of the form (k +- sum of binary digits of k) for any k.

Original entry on oeis.org

6, 13, 21, 30, 37, 48, 51, 80, 83, 111, 121, 133, 144, 147, 175, 185, 192, 207, 217, 226, 233, 242, 245, 248, 250, 272, 275, 303, 313, 320, 335, 345, 354, 361, 370, 373, 376, 378, 387, 399, 409, 418, 425, 434, 437, 440, 442, 457, 466, 469, 472, 474, 481, 488, 490, 497, 505, 507, 528, 531, 559, 569, 576, 591, 601, 610, 617
Offset: 1

Views

Author

Andres M. Torres, Jul 08 2013

Keywords

Comments

This sequence is the intersection of sets A010061 and A055938, where: set A010061 is NONE of ( k + count of set binary bits(k) ), and set A055938 is NONE of ( k - count of set binary bits(k) ), for any k.
The numbers of terms not exceeding 10^k, for k = 1, 2, ..., are 1, 9, 127, 1362, 12921, 128429, 1261747, 12554142, 125697648, 1257065977, ... . Conjecture: This sequence has an asymptotic density (1/2) * A242403 = 0.126330... . - Amiram Eldar, Oct 02 2022

Examples

			Find the list of values not defined by:
V = i +- count of set binary bits(i), for any integer i.
Assume that setbits(n) returns the count of set binary digits of n.
A227359 sample: 6,13,21,30,37,48,51,80,83,111, ...
0 +- setbits(0) = 0     therefore 0 does not make the list
1 +- setbits(1) = 0,2   therefore 0 and 2 do not make the list
2 +- setbits(2) = 1,3   therefore 1 and 3 do not make the list
3 +- setbits(3) = 1,5   therefore 1 and 5 do not make the list
4 +- setbits(4) = 3,5   ...
5 +- setbits(5) = 3,7   therefore 3 and 7 do not make the list
6 +- setbits(6) = 4,8   therefore 4 and 8 do not make the list
7 +- setbits(7) = 4,10  therefore 4 and 10 do not make the list
8 +- setbits(8) = 7,9   therefore 7 and 9 do not make the list
6 and 13 did make the list because there is no solution for
6 = i +- setbits(i),  nor
13 = i +- setbits(i), for any integer i.
		

Crossrefs

Programs

  • Blitz3D
    ;; See link.

A386568 The number of binary self numbers not exceeding 10^n.

Original entry on oeis.org

1, 3, 26, 254, 2526, 25270, 252666, 2526605, 25266035, 252660259, 2526602596, 25266025903, 252660259016, 2526602590093
Offset: 0

Views

Author

Amiram Eldar, Jul 26 2025

Keywords

Examples

			There are 3 binary self numbers that do no exceed 10: 1, 4 and 6. Hence a(1) = 3.
		

Crossrefs

Cf. A010061, A242403, A382452 (decimal analog), A386569.

Programs

  • Mathematica
    selfQ[n_] := AllTrue[Range[n, n - Floor@Log2[n], -1], # + DigitCount[#, 2, 1] != n &]; a[n_] := Count[Range[10^n], _?selfQ]; Array[a, 6, 0]

Formula

Limit_{n->oo} a(n)/10^n = A242403.

A386569 The number of binary self numbers not exceeding 2^n.

Original entry on oeis.org

1, 1, 2, 3, 5, 10, 18, 34, 67, 131, 261, 520, 1037, 2073, 4143, 8283, 16562, 33121, 66237, 132471, 264938, 529870, 1059740, 2119473, 4238941, 8477878, 16955748, 33911492, 67822978, 135645949, 271291894, 542583782, 1085167557, 2170335106, 4340670206, 8681340402
Offset: 0

Views

Author

Amiram Eldar, Jul 26 2025

Keywords

Examples

			There are 3 binary self numbers that do no exceed 2^3 = 8: 1, 4 and 6. Hence a(3) = 3.
		

Crossrefs

Programs

  • Mathematica
    selfQ[n_] := AllTrue[Range[n, n - Floor@Log2[n], -1], # + DigitCount[#, 2, 1] != n &]; a[n_] := Count[Range[2^n], _?selfQ]; Array[a, 16, 0]

Formula

Limit_{n->oo} a(n)/2^n = A242403.
Showing 1-5 of 5 results.