login

Revision History for A000002

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Kolakoski sequence: a(n) is length of n-th run; a(1) = 1; sequence consists just of 1's and 2's.
(history; published version)
#389 by Andrey Zabolotskiy at Sat Nov 16 09:06:55 EST 2024
STATUS

editing

approved

#388 by Andrey Zabolotskiy at Sat Nov 16 09:06:52 EST 2024
LINKS

William Kolakoski, <a href="https://www.jstor.org/stable/2313883">Problem 5304</a>, Amer. Math. Monthly, Vol. 72, No. 8 (1965), p. 674; <a href="https://www.jstor.org/stable/2314839">Self Generating Runs</a>, Solution to Problem 5304 by Necdet Üçoluk, Vol. 73, No. 6 (1966), pp. 681-682.

STATUS

approved

editing

#387 by N. J. A. Sloane at Sun Nov 03 19:19:00 EST 2024
STATUS

editing

approved

#386 by N. J. A. Sloane at Sun Nov 03 19:18:55 EST 2024
EXTENSIONS

Minor edits in to example and PARI code made by M. F. Hasler, May 07 2014

STATUS

approved

editing

#385 by Peter Luschny at Sat Nov 02 03:02:37 EDT 2024
STATUS

proposed

approved

#384 by Kevin Ryde at Sat Nov 02 02:10:31 EDT 2024
STATUS

editing

proposed

#383 by Kevin Ryde at Sat Nov 02 02:04:30 EDT 2024
FORMULA

Comment from Kevin Ryde, Oct 07 2024: The second one is clear. Values are only ever 1 or 2 so "a(n-1) + a(n-2) - 3" asks whether a(n-1)=a(n-2). Knowing any run length is at most 2 then means a(n) and a(n-3) are equal. The first one is similar: if a(n-1)=a(n-2) then a(n) is a "flip" to a(n) = 3-a(n-1). The key in both cases is that 1,1,1 and 2,2,2 never occur.

Comment from Kevin Ryde, Oct 07 2024: The above formulas are true: The parts identify when terms are same or different and they hold for any sequence of 1's and 2's with run lengths 1 or 2.

STATUS

approved

editing

Discussion
Sat Nov 02
02:10
Kevin Ryde: Neil pasted in my pink box.  This is better, if having anything.  The formulas hold for every 1,2 terms+runs sequence, so they don't determine Kolakoski terms.  I thought that dropped the interest level by a lot.  (Esp without a bit of simplification to show there's flips 1<->2 hiding in there like 3-a(n-1).)
#382 by N. J. A. Sloane at Fri Nov 01 23:50:36 EDT 2024
STATUS

proposed

approved

#381 by Mikk Heidemaa at Fri Nov 01 14:01:33 EDT 2024
STATUS

editing

proposed

Discussion
Fri Nov 01
18:22
Kevin Ryde: I don't really know what I'm looking at, but is that an improvement over the existing?
#380 by Mikk Heidemaa at Fri Nov 01 13:56:40 EDT 2024
MATHEMATICA

KolakoskiSeq[n_Integer] := Block[{a = {1, 2, 2}}, Fold[Join[#1, ConstantArray[Mod[#2, 2] + 1, #1[[#2]]]] &, a, Range[3, n]]]; KolakoskiSeq[999] (* Mikk Heidemaa, Nov 01 2024 *)

STATUS

approved

editing

Discussion
Fri Nov 01
14:00
Mikk Heidemaa: Ok, sry!
14:01
Mikk Heidemaa: sry, a wrong window...