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!)
A022295 Least k>1 such that first n terms of Kolakoski sequence A000002 repeat in reverse order beginning at k-th term. 1
4, 3, 2, 7, 16, 15, 14, 75, 74, 73, 72, 296, 295, 294, 293, 292, 291, 290, 442, 441, 440, 439, 438, 437, 436, 435, 434, 433, 6253, 6252, 6251, 6250, 6249, 6248, 6247, 6246, 6245, 6244, 6243, 6242, 6241, 6240, 6239, 9379, 9378, 9377, 9376, 9375, 9374, 9373 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
MATHEMATICA
(* Here, the condition k>1 is removed, so the 1st term is 1 instead of 4. *)
n = 28; w = Prepend[Nest[Flatten[Partition[#, 2] /. {{2, 2} -> {2, 2, 1, 1}, {2, 1} -> {2, 2, 1}, {1, 2} -> {2, 1, 1}, {1, 1} -> {2, 1}}] &, {2, 2}, n], 1];
wStr = ToString[FromDigits[w]];
Map[StringPosition[wStr, StringReverse[StringTake[wStr, #]], 1][[1]][[1]] &, Range[100]] (* Peter J. C. Moses, Feb 18 2021 *)
CROSSREFS
Sequence in context: A074066 A307648 A067016 * A371510 A258415 A132668
KEYWORD
nonn
AUTHOR
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 May 2 18:24 EDT 2024. Contains 372203 sequences. (Running on oeis4.)