login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Index sequence for limit-reversing A010060; see Comments.
2

%I #11 Aug 22 2014 10:13:25

%S 0,3,5,12,20,36,60,92,108,132,156,172,204,228,300,356,396,420,492,516,

%T 556,612,676,804,900,996,1124,1188,1316,1412,1508,1572,1668,1764,1892,

%U 1956,2052,2148,2340,2532,2788,2916,3108,3300,3428,3684,3876,4068,4196

%N Index sequence for limit-reversing A010060; see Comments.

%C Suppose S = (s(0),s(1),s(2),...) is an infinite sequence such that every finite block of consecutive terms occurs infinitely many times in S. (It is assumed that A014675 is such a sequence.) Let B = B(m,k) = (s(m-k), s(m-k+1),...,s(m)) be such a block, where m >= 0 and k >= 0. Let m(1) be the least i > m such that (s(i-k),s(i-k+1),...,s(i)) = B(m,k), and put B(m(1),k+1) = (s(m(1)-k-1),s(m(1)-k),...,s(m(1))). Let m(2) be the least i > m(1) such that (s(i-k-1),s(i-k),...,s(i)) = B(m(1),k+1), and put B(m(2),k+2) = (s(m(2)-k-2),s(m(2)-k-1),...,s(m(2))). Continuing in this manner gives a sequence of blocks B(m(n),k+n). Let B'(n) = reverse(B(m(n),k+n)), so that for n >= 1, B'(n) comes from B'(n-1) by suffixing a single term; thus the limit of B'(n) is defined; we call it the "limit-reverse of S with initial block B(m,k)", denoted by S*(m,k), or simply S*.

%C ...

%C The sequence (m(i)), where m(0) = 0, is the "index sequence for limit-reversing S with initial block B(m,k)" or simply the index sequence for S*, as in A245939.

%e S = A010060, with B = (s(0)); that is, (m,k) = (0,0);

%e S = (0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1,...)

%e B'(0) = (0)

%e B'(1) = (0,1)

%e B'(2) = (0,1,0)

%e B'(3) = (0,1,0,0)

%e B'(4) = (0,1,0,0,1)

%e B'(5) = (0,1,0,0,1,1)

%e S* = (0,1,0,0,1,1,0,0,1,0,1,1,...),

%e with index sequence (0,3,5,12,20,36,60,92,108,132,...)

%t z = 50; seqPosition2[list_, seqtofind_] := Last[Last[Position[Partition[list, Length[#], 1], Flatten[{___, #, ___}], 1, 2]]] &[seqtofind]; n = 18; s = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {1, 0}}] &, {0}, n]; ans = Join[{s[[p[0] = pos = seqPosition2[s, #] - 1]]}, #] &[{s[[1]]}]; cfs = Table[s = Drop[s, pos - 1]; ans = Join[{s[[p[n] = pos = seqPosition2[s, #] - 1]]}, #] &[ans], {n, z}]; q = -1+Accumulate[Join[{1}, Table[p[n], {n, 0, z}]]] (* A245939 *)

%Y Cf. A010060, A245938, A245920.

%K nonn

%O 0,2

%A _Clark Kimberling_ and _Peter J. C. Moses_, Aug 07 2014