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 A042974 #44 Aug 06 2025 09:02:44 %S A042974 1,2,1,1,2,1,1,1,2,1,1,1,1,2,1,1,1,1,1,2,1,1,1,1,1,1,2,1,1,1,1,1,1,1, %T A042974 2,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,2,1,1,1, %U A042974 1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1 %N A042974 n 1's followed by a 2. %C A042974 The number 1.21121112... is irrational. - _Robert G. Wilson v_, Jul 05 2000 %C A042974 Fixed point of the following mapping w. Suppose x(n) takes values in {1,2} and w(n)=[x(1),x(2),...,x(n)]. Next define w(n+1)=[x(1),x(2),...,x(n),x(n-1)] if x(n)=1 and w(n+1)=[x(1),x(2),...,x(n),x(n-1),x(n-1)] if x(n)=2. Then taking x(1)=1 and x(2)=2 we get w(infinity)=A042974 (i.e., x(n)=A042974(n)). - _Benoit Cloitre_, Jan 11 2013 %H A042974 Harry J. Smith, <a href="/A042974/b042974.txt">Table of n, a(n) for n = 1..20000</a> %H A042974 C. V. Eynden, <a href="http://www.jstor.org/stable/2975298">Problem 10439. An irrational mimic of 1/9</a>, Amer. Math. Monthly, 104 (1997), 873. %H A042974 G. Xiao, <a href="http://wims.unice.fr/~wims/en_tool~number~contfrac.en.html">Contfrac</a> %H A042974 <a href="/index/Con#confC">Index entries for continued fractions for constants</a> %e A042974 1.211211121111211111211111121111111211111111211111111121111111111211111... %t A042974 Table[PadLeft[{2},n,1],{n,2,20}]//Flatten (* _Harvey P. Dale_, Sep 11 2019 *) %o A042974 (PARI) {a(n) = 1 + issquare(9 + 8*n)}; /* _Michael Somos_, Jan 12 2000 */ %o A042974 (PARI) { default(realprecision, 20080); x=0; for (n=1, 20000, x=10*x + 1 + issquare(9+8*n)); x/=10^19999; for (n=1, 20000, d=floor(x); x=(x-d)*10; write("b042974.txt", n, " ", d)); } \\ _Harry J. Smith_, May 08 2009 %o A042974 (PARI) sum(k=1,sqrtint(8*default(realprecision)+9),10^-(2*k-1)^2, 1/9.) \\ _Charles R Greathouse IV_, Feb 05 2025 %o A042974 (Haskell) %o A042974 a042974 n = a042974_list !! (n-1) %o A042974 a042974_list = 1 : 2 : %o A042974 concat (zipWith replicate (tail a042974_list) a042974_list) %o A042974 -- _Reinhard Zumkeller_, Dec 08 2011 %Y A042974 Cf. A042975, A056030 (continued fraction). %K A042974 nonn,easy,cons %O A042974 1,2 %A A042974 _N. J. A. Sloane_