login
A187183
Parse the infinite string 012340123401234012340... into distinct phrases 0, 1, 2, 3, 4, 01, 23, 40, 12, ...; a(n) = length of n-th phrase.
2
1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 16, 15, 16, 15, 16, 15, 16, 15, 16, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 20, 21, 20, 21, 20
OFFSET
1,6
COMMENTS
See A187180 for details.
LINKS
Index entries for linear recurrences with constant coefficients, signature (1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1).
FORMULA
After the initial block of five 1's, the sequence is quasi-periodic with period 25, increasing by 5 after each block.
From Colin Barker, Jan 31 2020: (Start)
G.f.: x*(1 + x^5 + x^10 + x^15 + x^20 + x^21 - x^22 + x^23 - x^24 - x^26 + x^27 - x^28 + x^29) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4)*(1 + x^5 + x^10 + x^15 + x^20)).
a(n) = a(n-1) + a(n-25) - a(n-26) for n>30.
(End)
MATHEMATICA
Join[{1, 1, 1, 1}, LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1}, {1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6}, 96]] (* Ray Chandler, Aug 26 2015 *)
PROG
(PARI) Vec(x*(1 + x^5 + x^10 + x^15 + x^20 + x^21 - x^22 + x^23 - x^24 - x^26 + x^27 - x^28 + x^29) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4)*(1 + x^5 + x^10 + x^15 + x^20)) + O(x^80)) \\ Colin Barker, Jan 31 2020
CROSSREFS
See A187180-A187188 for alphabets of size 2 through 10.
Sequence in context: A008648 A154099 A105511 * A027868 A060384 A105564
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Mar 06 2011
STATUS
approved