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 A039982 #58 Jul 06 2025 00:59:01 %S A039982 1,1,0,1,0,1,1,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,1,1,0,1, %T A039982 1,1,0,1,0,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1, %U A039982 0,1,0,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0 %N A039982 Let phi denote the morphism 0 -> 11, 1 -> 10. This sequence is the limit S(oo) where S(0) = 1; S(n+1) = 1.phi(S(n)). %C A039982 An example of a d-perfect sequence. %C A039982 Concatenation of the bit sequences 1, 10, 1011, 10111010, 1011101010111011, ... used in a construction of A035263 (see Comment there by Benoit Cloitre). - _David Callan_, Oct 08 2005 %C A039982 Image, under the coding a,b,d -> 1, c -> 0, of the fixed point, starting with a, of the morphism a -> ab, b -> cd, c -> cd, d -> bb. - _Jeffrey Shallit_, May 15 2016 %H A039982 Antti Karttunen, <a href="/A039982/b039982.txt">Table of n, a(n) for n = 0..65537</a> %H A039982 Martin Klazar and Florian Luca, <a href="http://kam.mff.cuni.cz/~klazar/publications.html">On integrality and periodicity of the Motzkin numbers</a>. %H A039982 Martin Klazar and Florian Luca, <a href="http://dx.doi.org/10.1007/s00010-004-2734-x">On integrality and periodicity of the Motzkin numbers</a>, Aequationes Math. 69 (2005), no. 1-2, 68-75. %H A039982 D. Kohel, S. Ling and C. Xing, <a href="http://iml.univ-mrs.fr/~kohel/pub/perfect.pdf">Explicit Sequence Expansions</a> %H A039982 D. Kohel, S. Ling and C. Xing, <a href="http://dx.doi.org/10.1007/978-1-4471-0551-0_23">Explicit Sequence Expansions</a>, Sequences and their Applications, Discrete Mathematics and Theoretical Computer Science 1999, pp 308-317. %H A039982 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a> %F A039982 a(n) = A090344(n) mod 2. - _Christian G. Bower_, Jun 12 2005 %F A039982 a(n) = A091090(n+1) mod 2. - _Alan Michael Gómez Calderón_, Jul 05 2025 %e A039982 The first few S(i) are: %e A039982 S(0) = 1 %e A039982 S(1) = 1.10 = 110 %e A039982 S(2) = 1.101011 = 1101011 %e A039982 S(3) = 1.10101110111010 = 110101110111010 %e A039982 ... %t A039982 substitutionRule={1->{1, 0}, 0->{1, 1}}; makeSubstitution[seq_]:=Flatten[seq/.substitutionRule]; Flatten[NestList[makeSubstitution, {1}, 5]] %t A039982 NestList[Flatten[ # /. {0 -> {1, 1}, 1 -> {1, 0}}] &, {1}, 6] // Flatten (* _Robert G. Wilson v_, Mar 29 2006 *) %o A039982 (PARI) a(n)=my(A=1+x); for(i=1, n, A=1/(1-x+x*O(x^n))+x^2*A^2+x*O(x^n)); polcoeff(A, n)%2 \\ _Charles R Greathouse IV_, Feb 04 2013 %o A039982 (PARI) %o A039982 up_to = 16384; %o A039982 A090344list(up_to) = { my(v=vector(up_to)); v[1] = 1; v[2] = 2; v[3] = 3; for(n=4,up_to,v[n] = ((2*n+2)*v[n-1] -(4*n-6)*v[n-3] +(3*n-4)*v[n-2])/(n+2)); (v); }; %o A039982 v090344 = A090344list(up_to); %o A039982 A090344(n) = if(!n,1,v090344[n]); %o A039982 A039982(n) = (A090344(n)%2); \\ _Antti Karttunen_, Sep 27 2018 %o A039982 (GAP) b:=[1,1,2];; for n in [4..120] do b[n]:=(1/(n+1))* (2*n*b[n-1]+(3*n-7)*b[n-2]-(4*n-10)*b[n-3]);; od; a:=b mod 2; # _Muniru A Asiru_, Sep 28 2018 %Y A039982 Cf. A001006, A035263, A090344, A091090. %K A039982 nonn,easy %O A039982 0,1 %A A039982 _N. J. A. Sloane_ %E A039982 More terms from _Christian G. Bower_, Jun 12 2005 %E A039982 Offset corrected from 1 to 0 by _Antti Karttunen_, Sep 27 2018 %E A039982 Entry revised by _N. J. A. Sloane_, Feb 23 2019