login
Search: a001285 -id:a001285
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) is the sum of first n terms of A001285 (Thue-Morse sequence).
+20
30
0, 1, 3, 5, 6, 8, 9, 10, 12, 14, 15, 16, 18, 19, 21, 23, 24, 26, 27, 28, 30, 31, 33, 35, 36, 37, 39, 41, 42, 44, 45, 46, 48, 50, 51, 52, 54, 55, 57, 59, 60, 61, 63, 65, 66, 68, 69, 70, 72, 73, 75, 77, 78, 80, 81, 82, 84, 86, 87, 88, 90, 91, 93
OFFSET
0,3
LINKS
Winston de Greef, Table of n, a(n) for n = 0..10000 (first 1001 terms from T. D. Noe)
FORMULA
a(0)=0, a(1)=1, a(2n) = 3n, a(2n+1) = -a(n) + a(n+1) + 3n. - Ralf Stephan, Oct 08 2003
G.f.: x*(3/(1 - x)^2 - Product_{k>=1} (1 - x^(2^k)))/2. - Ilya Gutkovskiy, Apr 03 2019
MATHEMATICA
A001285 = Table[ Mod[ Sum[ Mod[ Binomial[n, k], 2], {k, 0, n}], 3], {n, 0, 61}]; Accumulate[A001285] (* Jean-François Alcover, Sep 25 2012 *)
Join[{0}, Accumulate[1 + ThueMorse /@ Range[0, 100]]] (* Jean-François Alcover, Sep 18 2019, from version 10.2 *)
PROG
(Haskell)
a026430 n = a026430_list !! n
a026430_list = scanl (+) 0 a001285_list -- Reinhard Zumkeller, Jun 28 2013
(PARI) first(n)=my(v=vector(n)); v[1]=1; for(k=2, n, v[k]=if(k%2, v[k\2+1]-v[k\2])+k\2*3); concat(0, v) \\ Charles R Greathouse IV, May 09 2016
(Python)
from itertools import accumulate, islice
def A026430_gen(): # generator of terms
yield from (0, 1)
blist, s = [1], 1
while True:
c = [3-d for d in blist]
blist += c
yield from (s+d for d in accumulate(c))
s += sum(c)
A026430_list = list(islice(A026430_gen(), 30)) # Chai Wah Wu, Feb 22 2023
(Python)
def A026430(n): return n+(n-1>>1)+(n-1&1|(n.bit_count()&1^1)) # Chai Wah Wu, Mar 01 2023
CROSSREFS
Cf. A001285, A356133 (complement).
Cf. A115384.
KEYWORD
nonn,nice
STATUS
approved
Length of n-th run of identical symbols in the Thue-Morse sequence A010060 (or A001285).
+20
19
1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1
OFFSET
1,2
COMMENTS
It appears that the sequence can be calculated by any of the following methods:
(1) Start with 1 and repeatedly replace 1 with 1, 2, 1 and 2 with 1, 2, 2, 2, 1;
(2) a(1) = 1, all terms are either 1 or 2 and, for n > 0, a(n) = 1 if the length of the n-th run of 2's is 1; a(n) = 2 if the length of the n-th run of consecutive 2's is 3, with each run of 2's separated by a run of two 1's;
(3) replace each 3 in A080426 with 2. - John W. Layman, Feb 18 2003
Number of representations of n as a sum of Jacobsthal numbers (1 is allowed twice as a part). Partial sums are A003159. With interpolated zeros, g.f. is (Product_{k>=1} (1 + x^A078008(k)))/2. - Paul Barry, Dec 09 2004
In other words, the consecutive 0's or 1's in A010060 or A010059. - Robin D. Saunders (saunders_robin_d(AT)hotmail.com), Sep 06 2006
From Carlo Carminati, Feb 25 2011: (Start)
The sequence (starting with the second term) can also be calculated by the following method:
Apply repeatedly to the string S_0 = [2] the following algorithm: take a string S, double it, if the last figure is 1, just add the last figure to the previous one, if the last figure is greater than one, decrease it by one unit and concatenate a figure 1 at the end. (This algorithm is connected with the interpretation of the sequence as a continued fraction expansion.) (End)
This sequence, starting with the second term, happens to be the continued fraction expansion of the biggest cluster point of the set {x in [0,1]: F^k(x) >= x, for all k in N}, where F denotes the Farey map (see A187061). - Carlo Carminati, Feb 28 2011
Starting with the second term, the fixed point of the substitution 2 -> 211, 1 -> 2. - Carlo Carminati, Mar 03 2011
It appears that this sequence contains infinitely many distinct palindromic subsequences. - Alexander R. Povolotsky, Oct 30 2016
From Michel Dekking, Feb 13 2019: (Start)
Let tau defined by tau(0) = 01, tau(1) = 10 be the Thue-Morse morphism, with fixed point A010060. Consecutive runs in A010060 are 0, 11, 0, 1, 00, 1, 1, ..., which are coded by their lengths 1, 2, 1, 1, 2, ... Under tau^2 consecutive runs are mapped to consecutive runs:
tau^2(0) = 0110, tau^2(1) = 1001,
tau^2(00) = 01100110, tau^2(11) = 10011001.
The reason is that (by definition of a run!) runs of 0's and runs of 1's alternate in the sequence of runs, and this is inherited by the image of these runs under tau^2.
Under tau^2 the runs of length 1 are mapped to the sequence 1,2,1 of run lengths, and the runs of length 2 are mapped to the sequence 1,2,2,2,1 of run lengths. This proves John Layman's conjecture number (1): it follows that (a(n)) is fixed point of the morphism alpha
alpha: 1 -> 121, 2 -> 12221.
Since alpha(1) and alpha(2) are both palindromes, this also proves Alexander Povolotsky's conjecture.
(End)
LINKS
J.-P. Allouche, Andre Arnold, Jean Berstel, Srecko Brlek, William Jockusch, Simon Plouffe and Bruce E. Sagan, A sequence related to that of Thue-Morse, Discrete Math., Vol. 139, No. 1-3 (1995), pp. 455-461.
G. Allouche, J.-P. Allouche and J. Shallit, Kolam indiens, dessins sur le sable aux îles Vanuatu, courbe de Sierpinski et morphismes de monoïde, Ann. Inst. Fourier (Grenoble), Vol. 56, No. 7 (2006), pp. 2115-2130.
Claudio Bonanno, Carlo Carminati, Stefano Isola and Giulio Tiozzo, Dynamics of continued fractions and kneading sequences of unimodal maps, arXiv:1012.2131 [math.DS], 2010-2012.
Srećko Brlek, Enumeration of factors in the Thue-Morse word, Discrete Applied Math., Vol. 24, No. 1-3 (1989), pp. 83-96.
Julien Cassaigne, Limit values of the recurrence quotient of Sturmian sequences, Theoret. Comput. Sci., Vol. 218, No. 1 (1999), pp. 3-12.
Artūras Dubickas, On the distance from a rational power to the nearest integer, Journal of Number Theory, Vol. 117, No. 1 (March 2006), pp. 222-239.
Artūras Dubickas, On a sequence related to that of Thue-Morse and its applications, Discrete Math., Vol. 307, No. 9-10 (2007), pp. 1082-1093. MR2292537 (2008b:11086).
Cor Kraaikamp, Thomas A. Schmidt and Wolfgang Steiner, Natural extensions and entropy of alpha-continued fractions, arXiv:1011.4283 [math.DS], 2010-2012.
Claude Lenormand, Deux transformations sur les mots, Preprint, 5 pages, Nov 17 2003. Apparently unpublished. This is a scanned copy of the version that the author sent to me in 2003. - N. J. A. Sloane, Sep 09 2018. See page 2.
Kevin Ryde, PARI/GP Code
Jeffrey Shallit, Automaticity IV: Sequences, sets, and diversity, J. Théor. Nombres Bordeaux, Vol. 8, No. 2 (1996), pp. 347-367. See page 354.
FORMULA
a(1) = 1; for n > 1, a(n) = A003159(n) - A003159(n-1). - Benoit Cloitre, May 31 2003
G.f.: Product_{k>=1} (1 + x^A001045(k)). - Paul Barry, Dec 09 2004
Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3/2. - Amiram Eldar, Jan 16 2022
MAPLE
# From Carlo Carminati, Feb 25 2011:
## period-doubling routine:
double:=proc(SS)
NEW:=[op(S), op(S)]:
if op(nops(NEW), NEW)=1
then NEW:=[seq(op(j, NEW), j=1..nops(NEW)-2), op(nops(NEW)-1, NEW)+1]:
else NEW:=[seq(op(j, NEW), j=1..nops(NEW)-1), op(nops(NEW)-1, NEW)-1, 1]:
fi:
end proc:
# 10 loops of the above routine generate the first 1365 terms of the sequence
# (except for the initial term):
S:=[2]:
for j from 1 to 10 do S:=double(S); od:
S;
# From N. J. A. Sloane, Dec 31 2013:
S:=[b]; M:=14;
for n from 1 to M do T:=subs({b=[b, a, a], a=[b]}, S);
S := map(x->op(x), T); od:
T:=subs({a=1, b=2}, S): T:=[1, op(T)]: [seq(T[n], n=1..40)];
MATHEMATICA
Length /@ Split@ Nest[ Flatten@ Join[#, # /. {1 -> 2, 2 -> 1}] &, {1}, 7]
NestList[ Flatten[# /. {1 -> {2}, 2 -> {1, 1, 2}}] &, {1}, 7] // Flatten (* Robert G. Wilson v, May 20 2014 *)
PROG
(Haskell)
import Data.List (group)
a026465 n = a026465_list !! (n-1)
a026465_list = map length $ group a010060_list
-- Reinhard Zumkeller, Jul 15 2014
(PARI) See links.
CROSSREFS
Cf. A010060, A001285, A101615, A026490 (run lengths).
A080426 is an essentially identical sequence with another set of constructions.
Cf. A104248 (bisection odious), A143331 (bisection evil), A003159 (partial sums).
Cf. A187061, A363361 (as continued fraction).
KEYWORD
nonn,eigen
EXTENSIONS
Corrected and extended by John W. Layman, Feb 18 2003
Definition revised by N. J. A. Sloane, Dec 30 2013
STATUS
approved
First differences of Thue-Morse sequence A001285.
+20
12
1, 0, -1, 1, -1, 0, 1, 0, -1, 0, 1, -1, 1, 0, -1, 1, -1, 0, 1, -1, 1, 0, -1, 0, 1, 0, -1, 1, -1, 0, 1, 0, -1, 0, 1, -1, 1, 0, -1, 0, 1, 0, -1, 1, -1, 0, 1, -1, 1, 0, -1, 1, -1, 0, 1, 0, -1, 0, 1, -1, 1, 0, -1, 1, -1, 0, 1, -1, 1, 0, -1, 0, 1, 0, -1, 1, -1, 0, 1, -1, 1, 0, -1, 1, -1, 0, 1, 0, -1, 0, 1, -1, 1, 0, -1, 0, 1, 0, -1, 1, -1, 0, 1, 0, -1
OFFSET
1,1
COMMENTS
Also first differences of {0,1} Thue-Morse sequence A010060.- N. J. A. Sloane, Jan 05 2021
Fixed point of the morphism a->abc, b->ac, c->b, with a = 1, b = 0, c = -1, starting with a(1) = 1. - Philippe Deléham
From Thomas Anton, Sep 22 2020: (Start)
This sequence, interpreted as an infinite word, is squarefree.
Let & represent concatenation. For a word w of integers, let -w be the same word with each symbol negated. Then, starting with the empty word, this sequence can be obtained by iteratively applying the transformation T(w) = w & 1 & -w & 0 & -w & -1 & w. (End)
LINKS
J.-P. Allouche and Jeffrey Shallit, The Ubiquitous Prouhet-Thue-Morse Sequence, in C. Ding. T. Helleseth and H. Niederreiter, eds., Sequences and Their Applications: Proceedings of SETA '98, Springer-Verlag, 1999, pp. 1-16.
G. N. Arzhantseva, C. H. Cashen, D. Gruber, and D. Hume, Contracting geodesics in infinitely presented graphical small cancellation groups, arXiv preprint arXiv:1602.03767 [math.GR], 2016-2017.
T. W. Cusick, H. Fredricksen and P. Stănică, On the delta sequence of the Thue-Morse sequence, Australas. J. Combin. 39 (2007), 293--300. [From N. J. A. Sloane, Dec 11 2009]
Florian Frohn and Jürgen Giesl, Proving Non-Termination by Acceleration Driven Clause Learning with LoAT, arXiv:2304.10166 [cs.LO], 2023.
FORMULA
Recurrence: a(4*n) = a(n), a(4*n+1) = a(2*n+1), a(4*n+2) = 0, a(4*n+3) = -a(2*n+1), starting a(1) = 1.
a(n) = 2 - A007413(n). a(A036554(n)) = 0; a(A091785(n)) = -1; a(A091855(n)) = 1. - Philippe Deléham, Mar 20 2004
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = -v+w+u^2-v^2+2*w^2-2*u*w. - Michael Somos, Jul 08 2004
MATHEMATICA
Nest[ Function[ l, {Flatten[(l /. {0 -> {1, -1}, 1 -> {1, 0, -1}, -1 -> {0}})]}], {1}, 7] (* Robert G. Wilson v, Feb 26 2005 *)
ThueMorse /@ Range[0, 105] // Differences (* Jean-François Alcover, Oct 15 2019 *)
PROG
(PARI) a(n)=if(n<1||valuation(n, 2)%2, 0, -(-1)^subst(Pol(binary(n)), x, 1)) /* Michael Somos, Jul 08 2004 */
(PARI) a(n)=hammingweight(n)%2-hammingweight(n-1)%2 \\ Charles R Greathouse IV, Mar 26 2013
(Python)
def A029883(n): return (bin(n).count('1')&1)-(bin(n-1).count('1')&1) # Chai Wah Wu, Mar 03 2023
CROSSREFS
Apart from signs, same as A035263. Cf. A001285, A010060, A036554, A091785, A091855.
a(n+1) = A036577(n) - 1 = A036585(n) - 2.
KEYWORD
sign,easy
AUTHOR
N. J. A. Sloane, Dec 11 1999
EXTENSIONS
Edited by Ralf Stephan, Dec 09 2004
STATUS
approved
a(n) = position of n-th 1 in A001285 or A010059 (Thue-Morse sequence).
+20
10
1, 4, 6, 7, 10, 11, 13, 16, 18, 19, 21, 24, 25, 28, 30, 31, 34, 35, 37, 40, 41, 44, 46, 47, 49, 52, 54, 55, 58, 59, 61, 64, 66, 67, 69, 72, 73, 76, 78, 79, 81, 84, 86, 87, 90, 91, 93, 96, 97, 100, 102, 103, 106, 107, 109, 112, 114, 115, 117, 120, 121, 124, 126, 127, 130
OFFSET
1,2
COMMENTS
Barbeau notes that if we let A = the first 2^k terms of this sequence and B = the first 2^k terms of A181155, then the two sets A and B have the same sum of powers for first up to the k-th power. I note it holds for 0th power also. - Michael Somos, Jun 09 2013
REFERENCES
Edward J. Barbeau, Power Play, MAA, 1997. See p. 104.
LINKS
FORMULA
a(n) = 1+A001969(n).
a(n) = Sum_{k=0..2n} mod(-2 + Sum_{j=0..k} floor(C(k, j)/2)}, 3). - Paul Barry, Dec 24 2004
a(n) + A010059(n+1) = 2n + 2 for n >= 0. - Clark Kimberling, Oct 06 2014
EXAMPLE
Let k=2. Then A = {1,4,6,7} and B = {2,3,5,8} have the property that 1^0+4^0+6^0+7^0 = 2^0+3^0+5^0+8^0 = 4, 1^1+4^1+6^1+7^1 = 2^1+3^1+5^1+8^1 = 18, and 1^2+4^2+6^2+7^2 = 2^2+3^2+5^2+8^2 = 102. - Michael Somos, Jun 09 2013
MATHEMATICA
a[ n_] := If[ n < 1, 0, 2 n + Mod[ Total[ IntegerDigits[ n - 1, 2]], 2] - 1] (* Michael Somos, Jun 09 2013 *)
PROG
(PARI) a(n)=2*n+hammingweight(n-1)%2-1 \\ Charles R Greathouse IV, Mar 22 2013
(PARI) {a(n) = if( n<1, 0, 2*n + subst( Pol( binary( n-1)), x, 1)%2 - 1)} /* Michael Somos, Jun 09 2013 */
(Python)
def A026147(n): return 1+((m:=n-1).bit_count()&1)+(m<<1) # Chai Wah Wu, Mar 03 2023
CROSSREFS
KEYWORD
nonn,easy
STATUS
approved
Convolution of Thue-Morse sequence A001285 with itself.
+20
10
1, 4, 8, 10, 12, 14, 15, 16, 22, 24, 23, 26, 29, 30, 34, 40, 38, 40, 43, 42, 47, 50, 52, 56, 55, 56, 62, 66, 64, 70, 71, 64, 78, 80, 75, 82, 83, 82, 88, 96, 89, 92, 100, 98, 102, 106, 105, 104, 111, 112, 114, 122, 118, 122, 125, 120, 130, 136, 131, 130, 141, 134, 138, 160
OFFSET
0,2
COMMENTS
Comment from Jeremy Gardiner, Dec 28 2008: The following sequences all appear to have the same parity: A003071, A029886, A061297, A092524, A093431, A102393, A104258, A122248, A128975.
LINKS
Tanya Khovanova, There are no coincidences, arXiv preprint 1410.2193 [math.CO], 2014.
FORMULA
G.f.: (1/4)*(3/(1 - x) - Product_{k>=0} (1 - x^(2^k)))^2. - Ilya Gutkovskiy, Apr 03 2019
MATHEMATICA
P[n_, x_] := (bb = IntegerDigits[n, 2]) . x^Range[Length[bb]-1, 0, -1];
TM[n_] := 1 + Mod[P[n, 1], 2];
a[n_] := Sum[TM[k] TM[n-k], {k, 0, n}];
Table[a[n], {n, 0, 63}] (* Jean-François Alcover, Aug 31 2018 *)
PROG
(PARI) a(n)=sum(k=0, n, (1+subst(Pol(binary(k)), x, 1)%2)*(1+subst(Pol(binary(n-k)), x, 1)%2)) \\ Ralf Stephan, Aug 23 2013
CROSSREFS
Cf. A001285.
KEYWORD
nonn
STATUS
approved
a(n) = t(3n), where t = A001285 (Thue-Morse sequence).
+20
5
1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1
OFFSET
0,8
LINKS
MATHEMATICA
Array[1 + Mod[DigitCount[3 #, 2, 1], 2] &, 105, 0] (* Michael De Vlieger, Oct 03 2019 *)
PROG
(PARI) a(n)=1+hammingweight(3*n)%2 \\ Charles R Greathouse IV, May 09 2016
CROSSREFS
KEYWORD
nonn
EXTENSIONS
Name and Pari adapted to match offset in A001285 by Sean A. Irvine, Oct 02 2019
STATUS
approved
Boustrophedon transform of 1 followed by Thue-Morse sequence A001285.
+20
5
1, 2, 5, 13, 34, 108, 415, 1841, 9381, 53733, 342086, 2395481, 18300250, 151453434, 1349856656, 12890177378, 131298281746, 1420980348324, 16283235530691, 196958363484995, 2507751773736087, 33526171616091612
OFFSET
0,2
LINKS
J. Millar, N. J. A. Sloane and N. E. Young, A new operation on sequences: the Boustrophedon transform, J. Combin. Theory, 17A (1996) 44-54 (Abstract, pdf, ps).
N. J. A. Sloane, Transforms.
MATHEMATICA
tm[n_] := Mod[Sum[Mod[Binomial[n, k], 2], {k, 0, n}], 3];
T[n_, k_] := (n!/k!) SeriesCoefficient[(1 + Sin[x])/Cos[x], {x, 0, n - k}];
a[n_] := Sum[T[n, k] If[k == 0, 1, tm[k - 1]], {k, 0, n}];
Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Jul 02 2019 *)
PROG
(Haskell)
a029885 n = sum $ zipWith (*) (a109449_row n) (1 : map fromIntegral a001285_list)
-- Reinhard Zumkeller, Nov 04 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Definition corrected by Reinhard Zumkeller, Nov 04 2013
STATUS
approved
a(n) = t(1+3n), where t = A001285 (Thue-Morse sequence).
+20
4
2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 1, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 1, 1, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 1, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2
OFFSET
0,1
LINKS
MATHEMATICA
Array[1 + Mod[DigitCount[3 # + 1, 2, 1], 2] &, 105, 0] (* Michael De Vlieger, Oct 03 2019 *)
PROG
(PARI) a(n)=1+hammingweight(3*n+1)%2 \\ Charles R Greathouse IV, May 09 2016
CROSSREFS
KEYWORD
nonn
EXTENSIONS
Name and Pari adapted to match offset in A001285 by Sean A. Irvine, Oct 03 2019
STATUS
approved
a(n) = t(2+3n), where t = A001285 (Thue-Morse sequence).
+20
4
2, 1, 2, 2, 2, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 1, 1, 2, 1
OFFSET
0,1
LINKS
MATHEMATICA
Array[1 + Mod[DigitCount[3 # + 2, 2, 1], 2] &, 105, 0] (* Michael De Vlieger, Oct 06 2019 *)
Table[ThueMorse[2+3n], {n, 0, 100}]+1 (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 29 2020 *)
PROG
(PARI) a(n)=1+hammingweight(3*n+2)%2 \\ Charles R Greathouse IV, May 09 2016
CROSSREFS
KEYWORD
nonn
EXTENSIONS
Name and Pari adapted to match offset in A001285 by Sean A. Irvine, Oct 05 2019
STATUS
approved
Successive words in the formal D0L language that produces the Thue-Morse sequence A001285 (start with 1, map 1 -> 12, 2 -> 21).
+20
4
1, 12, 1221, 12212112, 1221211221121221, 12212112211212212112122112212112, 1221211221121221211212211221211221121221122121121221211221121221
OFFSET
1,2
REFERENCES
A. Salomaa, Jewels of Formal Language Theory. Computer Science Press, Rockville, MD, 1981, p. 5.
LINKS
Jarosław Grytczuk, Thue type problems for graphs, points and numbers, Discrete Math., 308 (2008), 4419-4429.
MATHEMATICA
Map[FromDigits, SubstitutionSystem[{1->{1, 2}, 2->{2, 1}}, {1}, 7]] (* Paolo Xausa, Dec 24 2023 *)
CROSSREFS
Cf. A001285 (which is the limiting word), A010060, A080815.
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Mar 26 2003
STATUS
approved

Search completed in 0.049 seconds