login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A125047 Infinite word generated by mapping 1->12, 2->13, 3->43, 4->42 starting at 1. 2
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Infinite word over 4-letter alphabet that contains no squares in arithmetic progressions of odd difference. - Ralf Stephan, May 09 2007
LINKS
Jui-Yi Kao, Narad Rampersad, Jeffrey Shallit, Manuel Silva, Words avoiding repetitions in arithmetic progressions, Theoretical Computer Science, volume 391, issues 1-2, February 2008, pages 126-137.  And arXiv:math/0608607 [math.CO], 2006.
FORMULA
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
EXAMPLE
1 -> 12 -> 1213 -> 12131242 -> 1213124312134243 -> ...
MATHEMATICA
SubstitutionSystem[{1 -> {1, 2}, 2 -> {1, 3}, 3 -> {4, 3}, 4 -> {4, 2}}, {1}, 7] // Last (* Jean-François Alcover, Dec 17 2018 *)
PROG
(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])}
(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
CROSSREFS
Essentially the same: A112658 (map 1234 -> 1023), A122002 (map 1234 -> 5137).
Cf. A038190.
Sequence in context: A213361 A212121 A213371 * A323420 A331296 A270656
KEYWORD
nonn
AUTHOR
Michael Somos, Nov 17 2006
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 19 06:29 EDT 2024. Contains 370953 sequences. (Running on oeis4.)