%I #93 Sep 04 2024 17:22:37
%S 1,4,6,13,15,18,21,23,30,32,37,39,46,48,51,54,56,63,71,78,80,83,86,88,
%T 95,97,102,104,111,113,116,119,121,128,130,133,135,142,144,147,150,
%U 152,159,161,166,168,175,177,180,183,185,192,200,207,209,212,215,217
%N 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.
%C No two consecutive values appear in this sequence (see Links). - _Griffin N. Macris_, May 31 2020
%C 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
%D Steven R. Finch, Mathematical Constants, Cambridge, 2003, Section 2.24, pp. 179-180.
%D József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 4, pp. 384-386.
%D 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.
%H Antti Karttunen, <a href="/A010061/b010061.txt">Table of n, a(n) for n = 1..10000</a>
%H Max A. Alekseyev and N. J. A. Sloane, <a href="https://arxiv.org/abs/2112.14365">On Kaprekar's Junction Numbers</a>, arXiv:2112.14365 [math.NT], 2021-2022; Journal of Combinatorics and Number Theory 12:3 (2022), 115-155.
%H Griffin N. Macris, <a href="/A010061/a010061.txt">Proof that no consecutive self numbers exist</a>, 2020.
%H G. Troi and U. Zannier, <a href="http://dml.mathdoc.fr/item/BUMI_1999_8_2B_2_397_0/">Note on the density constant in the distribution of self-numbers. II</a>, Bollettino dell'Unione Matematica Italiana, 2-A (1999), 397-399.
%H <a href="/index/Coi#Colombian">Index entries for Colombian or self numbers and related sequences</a>
%p # For Maple code see A230091. - _N. J. A. Sloane_, Oct 10 2013
%t Table[n + Total[IntegerDigits[n, 2]], {n, 0, 300}] // Complement[Range[Last[#]], #]& (* _Jean-François Alcover_, Sep 03 2013 *)
%o (Scheme, with _Antti Karttunen_'s IntSeq-library)
%o (define A010061 (ZERO-POS 1 0 A228085))
%o (Haskell)
%o a010061 n = a010061_list !! (n-1)
%o a010061_list = filter ((== 0) . a228085) [1..]
%o -- _Reinhard Zumkeller_, Oct 13 2013
%o (PARI)
%o /* Gen(n, b) returns a list of the generators of n in base b. Written by _Max Alekseyev_ (see Alekseyev et al., 2021).
%o For example, Gen(101, 10) returns [91, 101]. - N. J. A. Sloane, Jan 02 2022 */
%o { Gen(u, b=10) = my(d, m, k);
%o if(u<0 || u==1, return([]); );
%o if(u==0, return([0]); );
%o d = #digits(u, b)-1;
%o m = u\b^d;
%o while( sumdigits(m, b) > u - m*b^d,
%o m--;
%o if(m==0, m=b-1; d--; );
%o );
%o k = u - m*b^d - sumdigits(m, b);
%o vecsort( concat( apply(x->x+m*b^d, Gen(k, b)),
%o apply(x->m*b^d-1-x, Gen((b-1)*d-k-2, b)) ) );
%o }
%Y 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.
%Y Cf. A010062, A055938, A230091, A230092, A230058, A242403.
%Y Cf. A228088, A227915, A232228.
%K nonn,base
%O 1,2
%A _Leonid Broukhis_
%E More terms from _Antti Karttunen_, Aug 17 2013
%E Better definition from _Matthew C. Russell_, Oct 08 2013