|
Search: id:A007413
|
|
|
| A007413 |
|
A square-free (or Thue-Morse) ternary sequence: closed under 1->123, 2->13, 3->2. Start with 1. (Formerly M0406)
|
|
+0 14
|
|
| 1, 2, 3, 1, 3, 2, 1, 2, 3, 2, 1, 3, 1, 2, 3, 1, 3, 2, 1, 3, 1, 2, 3, 2, 1, 2, 3, 1, 3, 2, 1, 2, 3, 2, 1, 3, 1, 2, 3, 2, 1, 2, 3, 1, 3, 2, 1, 3, 1, 2, 3, 1, 3, 2, 1, 2, 3, 2, 1, 3, 1, 2, 3, 1, 3, 2, 1, 3, 1, 2, 3, 2, 1, 2, 3, 1, 3, 2, 1, 3, 1, 2, 3, 1, 3, 2, 1, 2, 3, 2, 1, 3, 1, 2, 3, 2, 1, 2, 3, 1, 3, 2, 1, 2, 3
(list; graph; listen)
|
|
|
OFFSET
|
1,2
|
|
|
COMMENT
|
a(n)=2 if and only if n-1 is in A079523. - Benoit Cloitre, Mar 10 2003.
Partial sums modulo 4 of the sequence 1, a(1), a(1), a(2), a(2), a(3), a(3), a(4), a(4), a(5), a(5), a(6), a(6), ...- DELEHAM Philippe (kolotoko(AT)wanadoo.fr), Mar 04 2004
To construct the sequence : start with 1 and concatenate 4 -1 = 3 : 1, 3, then change the last term (2 -> 1, 3 ->2 ) gives : 1, 2. Concatenate 1, 2 with 4 -1 = 3, 4 - 2 = 2 : 1, 2, 3, 2 and change the last term : 1, 2, 3, 1. Concatenate 1, 2, 3, 1 with 4 - 1 = 3, 4 - 2 = 2, 4 - 3 = 1, 4 - 1 = 3 : 1, 2, 3, 1, 3, 2, 1, 3 and change the last term : 1, 2, 3, 1, 3, 2, 1, 2 etc.- DELEHAM Philippe (kolotoko(AT)wanadoo.fr), Mar 04 2004
To construct the sequence : start with the Thue-Morse sequence A010060 = 0, 1, 1, 0, 1, 0, 0, 1, ... Then change 0 -> 1, 2, 3, _ and 1 -> 3, 2, 1, _ gives : 1, 2, 3, _, 3, 2, 1, _,3, 2, 1, _, 1, 2, 3, _, 3, 2, 1, _, ...and fill in the successive holes with the successive terms of the sequence itself.- DELEHAM Philippe (kolotoko(AT)wanadoo.fr), Mar 04 2004
To construct the sequence : to insert the number 2 between the A003156(k)-th term and the (1 + A003156(k))-th term of the sequence 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, ...- DELEHAM Philippe (kolotoko(AT)wanadoo.fr), Mar 04 2004
|
|
REFERENCES
|
J. Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 18.
|
|
LINKS
|
S. Kitaev and T. Mansour, Counting the occurrences of generalized patterns....
|
|
FORMULA
|
a(n) modulo 2 = A035263(n). a(A036554(n)) = 2. a(A003159(n)) = 1 if n odd. a(A003159(n)) = 3 if n even. a(n) = A033485(n) mod 4. a(n) = 4 - A036585(n-1).- DELEHAM Philippe (kolotoko(AT)wanadoo.fr), Mar 04 2004
a(n) = 2 - A029883(n) = 3 - A036577(n) . - DELEHAM Philippe (kolotoko(AT)wanadoo.fr), Mar 20 2004
|
|
MATHEMATICA
|
Nest[ Flatten[ # /. {1 -> {1, 2, 3}, 2 -> {1, 3}, 3 -> {2}}] &, {1}, 7] (from Robert G. Wilson v (rgwv(AT)rgwv.com), May 07 2005)
|
|
PROGRAM
|
(PARI) a(n)=if(n<1|valuation(n, 2)%2, 2, 2+(-1)^subst(Pol(binary(n)), x, 1))
|
|
CROSSREFS
|
Cf. A001285, A010060.
First differences of A000069.
A036580(n-1) + 1.
Adjacent sequences: A007410 A007411 A007412 this_sequence A007414 A007415 A007416
Sequence in context: A128222 A057039 A135511 this_sequence A072457 A063047 A003270
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
njas
|
|
|
Search completed in 0.003 seconds
|