login
A054354
First differences of Kolakoski sequence A000002.
17
1, 0, -1, 0, 1, -1, 1, 0, -1, 1, 0, -1, 0, 1, -1, 0, 1, 0, -1, 1, -1, 0, 1, -1, 1, 0, -1, 0, 1, -1, 0, 1, -1, 1, 0, -1, 1, 0, -1, 0, 1, -1, 1, 0, -1, 1, -1, 0, 1, -1, 0, 1, 0, -1, 1, 0, -1, 0, 1, -1, 1, 0, -1, 1, 0, -1, 0, 1, -1, 0, 1, -1, 1, 0, -1, 1, -1, 0, 1, 0, -1, 1, 0, -1, 0, 1, -1, 1, 0, -1, 1, 0, -1
OFFSET
1,1
COMMENTS
The Kolakoski sequence has only 1's and 2's, and is cubefree. Thus, for all n>=1, a(n) is in {-1, 0, 1}, a(n+1) != a(n), and if a(n) = 0, a(n+1) = -a(n-1), while if a(n) != 0, either a(n+1) = 0 and a(n+2) = -a(n) or a(n+1) = -a(n). A further consequence is that the maximum gap between equal values is 4: for all n, there is an integer k, 1<k<=4 such that a(n+k)=a(n). - Jean-Christophe Hervé, Oct 05 2014
From Daniel Forgues, Jul 07 2015: (Start)
Second differences: {-1, -1, 1, 1, -2, 2, -1, -1, 2, -1, -1, 1, 1, ...}
The sequence of first differences bounces between -1 and 1 with a slope whose absolute value is either 1 or 2. We can compress the information in the second differences into {-1, 1, -2, 2, -1, 2, -1, 1, ...} since the -1 and the 1 come in pairs; which can be compressed further into {1, 1, 2, 2, 1, 2, 1, 1, ...} since the signs alternate, where we only need to know that the initial sign is negative. (End)
This appears to divide the positive integers into three sets, each with density approaching 1/3. Note there are no adjacent equal parts (as mentioned above). - Gus Wiseman, Oct 10 2024
LINKS
FORMULA
Abs(a(n)) = (A000002(n)+A000002(n+1)) mod 2. - Benoit Cloitre, Nov 17 2003
MATHEMATICA
a2 = {1, 2, 2}; Do[ a2 = Join[a2, {1 + Mod[n - 1, 2]}], {n, 3, 70}, {a2[[n]]}]; Differences[a2] (* Jean-François Alcover, Jun 18 2013 *)
PROG
(Haskell)
a054354 n = a054354_list !! (n-1)
a054354_list = zipWith (-) (tail a000002_list) a000002_list
-- Reinhard Zumkeller, Aug 03 2013
CROSSREFS
Positions of 0 are A078649.
For Golomb's sequence (A001462) we have A088517.
Positions of -1 are A156242 (descents).
Positions of 1 are A156243 (ascents).
First differences (or second differences of A000002) are A376604.
The Kolakoski sequence (A000002):
- Statistics: A074286, A088568, A156077, A156253.
- Transformations: A054354, A156728, A306323, A332273, A332875, A333229.
Cf. A333254.
Sequence in context: A354032 A285625 A283966 * A156728 A361023 A267442
KEYWORD
sign
AUTHOR
N. J. A. Sloane, May 07 2000
STATUS
approved