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.

A190619 Binary expansions of odd numbers with a single zero in their binary expansion.

This page as a plain text file.
%I A190619 #19 Dec 18 2024 11:59:35
%S A190619 101,1011,1101,10111,11011,11101,101111,110111,111011,111101,1011111,
%T A190619 1101111,1110111,1111011,1111101,10111111,11011111,11101111,11110111,
%U A190619 11111011,11111101,101111111,110111111,111011111,111101111,111110111,111111011,111111101,1011111111,1101111111,1110111111,1111011111,1111101111,1111110111,1111111011,1111111101
%N A190619 Binary expansions of odd numbers with a single zero in their binary expansion.
%C A190619 a(n) = A007088(A190620(n)). [_Reinhard Zumkeller_, May 14 2011]
%H A190619 Reinhard Zumkeller, <a href="/A190619/b190619.txt">Table of n, a(n) for n = 1..1000</a>
%p A190619 f:=k->(10^k-1)/9; for n from 3 to 12 do for i from n-2 by -1 to 1 do j:=f(n)-10^i; lprint(j); od; od;
%o A190619 (Haskell)
%o A190619 a190619 n = a190619_list !! (n-1)
%o A190619 a190619_list = map read $ f 2 1 :: [Integer] where
%o A190619   f m k
%o A190619     | k < m - 1 = ((take k ones) ++ "0" ++ (take (m-k) ones)) : f m (k+1)
%o A190619     | otherwise = ((take k ones) ++ "01") : f (m + 1) 1
%o A190619   ones = repeat '1'
%o A190619 -- _Reinhard Zumkeller_, May 15 2011
%o A190619 (Python)
%o A190619 from itertools import count, islice
%o A190619 def agen():
%o A190619     for d in count(3):
%o A190619         b = (10**d - 1)//9
%o A190619         for i in range(2, d):
%o A190619             yield b - 10**(d-i)
%o A190619 print(list(islice(agen(), 50))) # _Michael S. Branicky_, Oct 13 2022
%o A190619 (Python)
%o A190619 from math import isqrt, comb
%o A190619 def A190619(n): return (10**((a:=(isqrt(n<<3)+1>>1)+1)+1)-1)//9-10**(comb(a,2)-n+1) # _Chai Wah Wu_, Dec 18 2024
%K A190619 nonn,base
%O A190619 1,1
%A A190619 _N. J. A. Sloane_, May 14 2011