The OEIS is supported by the many generous donors to the OEIS Foundation.

 Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 60th year, we have over 367,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A089633 Numbers having no more than one 0 in their binary representation. 35
 0, 1, 2, 3, 5, 6, 7, 11, 13, 14, 15, 23, 27, 29, 30, 31, 47, 55, 59, 61, 62, 63, 95, 111, 119, 123, 125, 126, 127, 191, 223, 239, 247, 251, 253, 254, 255, 383, 447, 479, 495, 503, 507, 509, 510, 511, 767, 895, 959, 991, 1007, 1015, 1019, 1021, 1022, 1023 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS A023416(a(n)) <= 1; A023416(a(n)) = A023532(n-2) for n>1; A000120(a(u)) <= A000120(a(v)) for u0: a(n+1) = Min{m>n: BinOnes(a(n))<=BinOnes(m)} with BinOnes=A000120. If m = floor((sqrt(8*n+1) - 1) / 2), then a(n) = 2^(m+1) - 2^(m*(m+3)/2 - n) - 1. - Carl R. White, Feb 10 2009 a(A014132(n)-1) = 2*a(n-1)+1 for n >= 1. - Robert Israel, Dec 14 2018 EXAMPLE From Tilman Piesk, May 09 2012: (Start) This may also be viewed as a triangle: In binary: 0 0 1 2 01 10 3 5 6 011 101 110 7 11 13 14 0111 1011 1101 1110 15 23 27 29 30 01111 10111 11011 11101 11110 31 47 55 59 61 62 63 95 111 119 123 125 126 Left three diagonals are A000225, A055010, A086224. Right diagonal is A000918. Central column is A129868. Numbers in row n (counted from 0) have n binary 1s. (End) MAPLE seq(seq(2^a-1-2^b, b=a-1..0, -1), a=1..11); # Robert Israel, Dec 14 2018 MATHEMATICA fQ[n_] := DigitCount[n, 2, 0] < 2; Select[ Range[0, 2^10], fQ] (* Robert G. Wilson v, Aug 02 2012 *) PROG (Haskell) a089633 n = a089633_list !! (n-1) a089633_list = [2 ^ t - 2 ^ k - 1 | t <- [1..], k <- [t-1, t-2..0]] -- Reinhard Zumkeller, Feb 23 2012 (PARI) {insq(n) = local(dd, hf, v); v=binary(n); hf=length(v); dd=sum(i=1, hf, v[i]); if(dd<=hf-2, -1, 1)} {for(w=0, 1536, if(insq(w)>=0, print1(w, ", ")))} \\ Douglas Latimer, May 07 2013 (PARI) isoka(n) = #select(x->(x==0), binary(n)) <= 1; \\ Michel Marcus, Dec 14 2018 (Python) from itertools import count, islice def A089633_gen(): # generator of terms return ((1<

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 11 00:22 EST 2023. Contains 367717 sequences. (Running on oeis4.)