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 A125047 #20 Sep 05 2020 03:40:46 %S A125047 1,2,1,3,1,2,4,3,1,2,1,3,4,2,4,3,1,2,1,3,1,2,4,3,4,2,1,3,4,2,4,3,1,2, %T A125047 1,3,1,2,4,3,1,2,1,3,4,2,4,3,4,2,1,3,1,2,4,3,4,2,1,3,4,2,4,3,1,2,1,3, %U A125047 1,2,4,3,1,2,1,3,4,2,4,3,1,2,1,3,1,2,4,3,4,2,1,3,4,2,4,3,4,2,1,3,1,2,4,3,1 %N A125047 Infinite word generated by mapping 1->12, 2->13, 3->43, 4->42 starting at 1. %C A125047 Infinite word over 4-letter alphabet that contains no squares in arithmetic progressions of odd difference. - _Ralf Stephan_, May 09 2007 %H A125047 Jui-Yi Kao, Narad Rampersad, Jeffrey Shallit, Manuel Silva, <a href="https://doi.org/10.1016/j.tcs.2007.10.039">Words avoiding repetitions in arithmetic progressions</a>, Theoretical Computer Science, volume 391, issues 1-2, February 2008, pages 126-137. And <a href="https://arxiv.org/abs/math/0608607">arXiv:math/0608607</a> [math.CO], 2006. %H A125047 <a href="/index/Fi#FIXEDPOINTS">Index entries for sequences that are fixed points of mappings</a> %F A125047 Recurrence: a(1)=1, a(4n)=3, a(4n+2)=2, a(8n+3)=1, a(8n+7)=4, a(4n+1)=a(2n+1). - _Ralf Stephan_, May 09 2007 %e A125047 1 -> 12 -> 1213 -> 12131242 -> 1213124312134243 -> ... %t A125047 SubstitutionSystem[{1 -> {1, 2}, 2 -> {1, 3}, 3 -> {4, 3}, 4 -> {4, 2}}, {1}, 7] // Last (* _Jean-François Alcover_, Dec 17 2018 *) %o A125047 (PARI) {a(n)=local(A); if(n<1, 0, A=[1]; while(length(A)<n, A=concat(vector(length(A), k, [[1, 2], [1, 3], [4, 3], [4, 2]][A[k]]))); A[n])} %o A125047 (PARI) my(table=[1,2;4,3]); a(n) = n--; table[if(n,bittest(n,1+valuation(n,2)))+1, n%2+1]; \\ _Kevin Ryde_, Sep 05 2020 %Y A125047 Essentially the same: A112658 (map 1234 -> 1023), A122002 (map 1234 -> 5137). %Y A125047 Cf. A038190. %K A125047 nonn %O A125047 1,2 %A A125047 _Michael Somos_, Nov 17 2006