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 A099054 #31 Jul 31 2025 11:27:35 %S A099054 1,2,3,1,3,2,3,1,2,3,2,1,3,1,2,1,3,2,3,1,2,3,2,1,2,3,1,2,1,3,2,3,1,3, %T A099054 2,1,3,1,2,3,2,1,2,3,1,3,2,1,3,1,2,1,3,2,3,1,2,3,2,1,2,3,1,2,1,3,2,3, %U A099054 1,3,2,1,2,3,1,2,1,3,1,2,3,1,3,2,1,2,3,2,1,3,2,3,1,2,1,3,1,2,3,2,1,3,2,3,1 %N A099054 Arshon's sequence: start from 1 and replace the letters in odd positions using 1 -> 123, 2 -> 231, 3 -> 312 and the letters in even positions using 1 -> 321, 2-> 132, 3 -> 213. %C A099054 The first three iterations give 1; 123; 123132312; ... the limiting sequence is shown here. Properties: the sequence is squarefree and cannot be defined by iteration of a morphism. %C A099054 a(n) = A219762(n+1) + 1. - _Reinhard Zumkeller_, Aug 08 2014 %D A099054 G. A. Gurevich, Nonrepeating sequences, pp. 61-66 of Kvant Selecta: Combinatorics I, ed. S. Tabachnikov, AMS, 2001. %H A099054 Reinhard Zumkeller, <a href="/A099054/b099054.txt">Table of n, a(n) for n = 0..10000</a> %H A099054 S. E. Arshon, <a href="http://mi.mathnet.ru/mp409">A proof of the existence of infinite asymmetric sequences on n symbols</a>. Matematicheskoe Prosveshchenie (Mathematical Education), 2 (1935) 24-33 (in Russian). %H A099054 S. E. Arshon, <a href="http://mi.mathnet.ru/msb5627"> A proof of the existence of infinite asymmetric sequences on n symbols</a>. Mat. Sb., 2 (1937) 769-779 (in Russian, with French abstract). %H A099054 James D. Currie: <a href="https://doi.org/10.1016/S0012-365X(02)00372-2">No iterated morphism generates any Arshon Sequence of Odd Order</a>, Discrete Math. 259 (2002), no. 1-3, 277-283. %H A099054 Sergey Kitaev, There are no iterated morphisms that define the Arshon sequence and the σ-sequence, Journal of Automata, Languages and Combinatorics 8 (2003) 1, 43-0-50. <a href="http://personal.strath.ac.uk/sergey.kitaev/Papers/Arshon.pdf">preprint</a>, <a href="https://arxiv.org/abs/math/0205216">arXiv:math/0205216</a> [math.CO], 2002. %H A099054 Zheng-Pan Wang, <a href="https://doi.org/10.1142/S0219498812502106">Some combinatorial properties of Arshon sequences of arbitrary orders</a>, J. Algebra and Applications, 12 (2013), article #1250210. %t A099054 f[n_List] := Block[{a = {}, l = Length[n], k = 1}, While[k < l + 1, If[ EvenQ[ k], Switch[ n[[k]], 1, AppendTo[a, 321], 2, AppendTo[a, 132], 3, AppendTo[a, 213]], Switch[ n[[k]], 1, AppendTo[a, 123], 2, AppendTo[a, 231], 3, AppendTo[a, 312]]]; k++ ]; Flatten[IntegerDigits /@ a]]; Take[ Nest[f, {1}, 5], 105] (* _Robert G. Wilson v_, Nov 15 2004 *) %o A099054 (Haskell) %o A099054 import Data.List (transpose, stripPrefix); import Data.Maybe (fromJust) %o A099054 a099054 n = a099054_list !! n %o A099054 a099054_list = 1 : concatMap fromJust (zipWith stripPrefix ass $ tail ass) %o A099054 where ass = iterate f [1] %o A099054 f xs = concat $ concat $ transpose [map g $ e xs, map h $ o xs] %o A099054 g 1 = [1,2,3]; g 2 = [2,3,1]; g 3 = [3,1,2] %o A099054 h 1 = [3,2,1]; h 2 = [1,3,2]; h 3 = [2,1,3] %o A099054 e [] = []; e [x] = [x]; e (x:_:xs) = x : e xs %o A099054 o [] = []; o [x] = []; o (_:x:xs) = x : o xs %o A099054 -- _Reinhard Zumkeller_, Aug 08 2014 %Y A099054 Cf. A100336, A100337, A003270 (the same?). %Y A099054 Cf. A219762, A241418 (first differences). %K A099054 nonn,nice,easy %O A099054 0,2 %A A099054 _Sergey Kitaev_, Nov 14 2004 %E A099054 More terms from _Robert G. Wilson v_ and _John W. Layman_, Nov 15 2004