OFFSET
1,2
COMMENTS
a(n)=1 plus the number of symbol changes in the first n terms ofA000002. - Jean-Marc Fedou andGabriele Fici, Mar 18 2010
FromN. J. A. Sloane, Nov 12 2018: (Start)
This seems to beA001462 rewritten so the run lengths are given byA000002. The companion sequence,A000002 rewritten so the run lengths are given byA001462, isA321020.
Note that Kolakoski's sequenceA000002 and Golomb's sequenceA001462 have very similar definitions, although the asymptotic behavior ofA001462 is well-understood, while that ofA000002 is a mystery. The asymptotic behavior of the two hybridsA156253 andA321020 might be worth investigating. (End)
To expand upon N. J. A. Sloane's comments, it's worth noting that Golomb's sequence has a formula from Colin Mallows: g(n) = g(n-g(g(n-1))) + 1, which closely resembles a(n) = a(n-gcd(a(a(n-1)),2)) + 1. -Jon Maiga, May 16 2023
LINKS
Jon Maiga,Table of n, a(n) for n = 1..10000
Jean-Marc Fédou and Gabriele Fici,Some remarks on differentiable sequences and recursivity, Journal of Integer Sequences 13(3): Article 10.3.2 (2010).
Jon Maiga,A Recurrence Related to the Kolakoski Sequence, 2025.
FORMULA
Conjecture: a(n) should be asymptotic to 2n/3.
Length of n-th run of the sequence =A000002(n). -Benoit Cloitre, Feb 19 2009
Conjecture: a(n) = (a(a(n-1)) mod 2) + a(n-2) + 1. -Jon Maiga, Dec 09 2021
a(n) = a(n-gcd(a(a(n-1)), 2)) + 1. -Jon Maiga, May 16 2023
MATHEMATICA
a2 = {1, 2, 2}; Do[ a2 = Join[a2, {1 + Mod[n - 1, 2]}], {n, 3, 80}, {i, 1, a2[[n]]}]; a3 = Accumulate[a2]; a[1] = 1; a[n_] := a[n] = For[k = a[n - 1], True, k++, If[a3[[k]] >= n, Return[k]]]; Table[a[n], {n, 1, 80}] (*Jean-François Alcover, Jun 18 2013 *)
a[1] = 1;
a[n_]:=a[n]=a[n-GCD[a[a[n - 1]], 2]]+1
Array[a, 100] (*Jon Maiga, May 16 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Feb 07 2009
STATUS
approved
