|
|
A026465
|
|
Length of n-th run of identical symbols in the Thue-Morse sequence A010060 (or A001285).
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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;
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
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
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.
|
|
FORMULA
|
Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3/2. - Amiram Eldar, Jan 16 2022
|
|
MAPLE
|
## 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;
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
(PARI) See links.
|
|
CROSSREFS
|
A080426 is an essentially identical sequence with another set of constructions.
|
|
KEYWORD
|
nonn,eigen
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|