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.
%I A030302 #78 Jul 22 2025 17:12:59 %S A030302 1,1,0,1,1,1,0,0,1,0,1,1,1,0,1,1,1,1,0,0,0,1,0,0,1,1,0,1,0,1,0,1,1,1, %T A030302 1,0,0,1,1,0,1,1,1,1,0,1,1,1,1,1,0,0,0,0,1,0,0,0,1,1,0,0,1,0,1,0,0,1, %U A030302 1,1,0,1,0,0,1,0,1,0,1,1,0,1,1,0,1,0,1,1,1,1 %N A030302 Write n in base 2 and juxtapose; irregular table in which row n lists the binary expansion of n. %C A030302 The binary Champernowne constant: it is normal in base 2. - _Jason Kimberley_, Dec 07 2012 %C A030302 A word that is recurrent, but neither morphic nor uniformly recurrent. - _N. J. A. Sloane_, Jul 14 2018 %C A030302 See A030303 for the indices of 1's (so this is the characteristic function of A030303), with first differences (i.e., run lengths of 0's, increased by 1, with two consecutive 1's delimiting a run of zero 0's) given by A066099. - _M. F. Hasler_, Oct 12 2020 %D A030302 Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2. %H A030302 R. J. Mathar, <a href="/A030302/b030302.txt">Table of n, a(n) for n = 1..3998</a> %H A030302 Jean-Paul Allouche, Julien Cassaigne, Jeffrey Shallit and Luca Q. Zamboni, <a href="https://arxiv.org/abs/1711.10807">A Taxonomy of Morphic Sequences</a>, arXiv preprint arXiv:1711.10807 [cs.FL], Nov 29 2017. %F A030302 a(n) = (floor(2^(((n + 2^i - 2) mod i) - i + 1) * ceiling((n + 2^i - 1)/i - 1))) mod 2 where i = ceiling( W(log(2)/2 (n - 1))/log(2) + 1 ) and W denotes the principal branch of the Lambert W function. See also Mathematica code. - David W. Cantrell (DWCantrell(AT)sigmaxi.net), Feb 19 2007 %p A030302 A030302 := proc(n) local i,t1,t2; t1:=convert(n,base,2); t2:=nops(t1); [seq(t1[t2+1-i],i=1..t2)]; end; # _N. J. A. Sloane_, Apr 08 2021 %t A030302 i[n_] := Ceiling[FullSimplify[ProductLog[Log[2]/2 (n - 1)]/Log[2] + 1]]; a[n_] := Mod[Floor[2^(Mod[n + 2^i[n] - 2, i[n]] - i[n] + 1) Ceiling[(n + 2^i[n] - 1)/i[n] - 1]], 2]; (* David W. Cantrell (DWCantrell(AT)sigmaxi.net), Feb 19 2007 *) %t A030302 Join @@ Table[ IntegerDigits[i, 2], {i, 1, 40}] (* _Olivier Gérard_, Mar 28 2011 *) %t A030302 Flatten@ IntegerDigits[ Range@ 25, 2] (* or *) %t A030302 almostNatural[n_, b_] := Block[{m = 0, d = n, i = 1, l, p}, While[m <= d, l = m; m = (b - 1) i*b^(i - 1) + l; i++]; i--; p = Mod[d - l, i]; q = Floor[(d - l)/i] + b^(i - 1); If[p != 0, IntegerDigits[q, b][[p]], Mod[q - 1, b]]]; Array[ almostNatural[#, 2] &, 105] (* _Robert G. Wilson v_, Jun 29 2014 *) %o A030302 (Magma) &cat[Reverse(IntegerToSequence(n,2)): n in [1..31]]; // _Jason Kimberley_, Mar 02 2012 %o A030302 (Python) %o A030302 from itertools import count, islice %o A030302 def A030302_gen(): # generator of terms %o A030302 return (int(d) for n in count(1) for d in bin(n)[2:]) %o A030302 A030302_list = list(islice(A030302_gen(),30)) # _Chai Wah Wu_, Feb 18 2022 %Y A030302 Essentially the same as A007088 and A030190. Cf. A030303, A007088. %Y A030302 Tables in which the n-th row lists the base b digits of n: A030190 and this sequence (b=2), A003137 and A054635 (b=3), A030373 (b=4), A031219 (b=5), A030548 (b=6), A030998 (b=7), A031035 and A054634 (b=8), A031076 (b=9), A007376 and A033307 (b=10). [_Jason Kimberley_, Dec 06 2012] %Y A030302 Sequences mentioned in the Allouche et al. "Taxonomy" paper, listed by example number: 1: A003849, 2: A010060, 3: A010056, 4: A020985 and A020987, 5: A191818, 6: A316340 and A273129, 18: A316341, 19: A030302, 20: A063438, 21: A316342, 22: A316343, 23: A003849 minus its first term, 24: A316344, 25: A316345 and A316824, 26: A020985 and A020987, 27: A316825, 28: A159689, 29: A049320, 30: A003849, 31: A316826, 32: A316827, 33: A316828, 34: A316344, 35: A043529, 36: A316829, 37: A010060. %K A030302 nonn,base,cons,easy,tabf %O A030302 1,1 %A A030302 _Clark Kimberling_