cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A074298 First occurrence of an 'average' valued sequence of length 2n in the Kolakoski sequence (A000002).

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 9, 4, 4, 3, 1, 4, 3, 1, 1, 9, 4, 4, 3, 1, 1, 3, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 3, 1, 1, 1, 1, 3, 1, 1, 4, 3
Offset: 1

Views

Author

Jon Perry, Sep 21 2002

Keywords

Comments

a(n) is the least k such that K(k) + K(k+1) + ... + K(k + 2*n - 1) = 3*n, where K(m) = A000002(m).

Examples

			a[1]=1, as A000002 begins 1,2 (sum 3) a[2]=1, as A000002 begins 1,2,2,1 (sum 6) a[3]=1, as A000002 begins 1,2,2,1,1,2 (sum 9).
		

Crossrefs

Programs

  • Mathematica
    nmax = 90; a2 = {1, 2, 2}; For[n = 3, n <= 2*nmax, n++, For[i = 1, i <= a2[[n]], i++, AppendTo[a2, 1 + Mod[n - 1, 2]]]]; a[n_] := For[k = 1, True, k++, If[Plus @@ a2[[k ;; k + 2*n - 1]] == 3*n, Return[k]]]; Table[a[n], {n, 1, nmax}] (* Jean-François Alcover, Sep 25 2012 *)

Extensions

Offset corrected by Nathaniel Johnston, May 02 2011

A074296 First occurrence of the smallest value subsequence of length n in the Kolakoski sequence (A000002).

Original entry on oeis.org

1, 4, 3, 4, 13, 12, 28, 10, 9, 13, 13, 12, 13, 112, 20, 10, 13, 12, 13, 13, 12, 13, 112, 111, 10, 109, 108, 167, 4, 112, 4, 94, 20, 101, 91, 167, 13, 94, 13, 13, 94, 93, 1511, 91, 90, 157, 743, 94, 750, 776, 775, 217, 743, 742, 743, 743, 742, 173, 217, 216
Offset: 1

Views

Author

Jon Perry, Sep 21 2002

Keywords

Comments

The sequence of minimal sums begins 1, 2, 4, 5, 6, 8, 9, 11, 13, 14, 15, 17, 18, 19, 21, ...

Examples

			a(3) = 3 because the Kolakoski sequence starting at position 3 is 2, 1, 1, which sums to 4, which is the smallest possible sum of 3 consecutive terms.
a(8) = 10 because the Kolakoski sequence starting at position 10 is 1, 2, 2, 1, 1, 2, 1, 1, which sums to 11, which is the smallest possible sum of 8 consecutive values in the Kolakoski sequence. Note that we cannot find a sequence of length eight with a sum of 10 because it would have to be of the form 1, 1, 2, 1, 1, 2, 1, 1, which would mean that 2, 1, 2, 1, 2 would have to appear earlier in the sequence, which would mean that 1, 1, 1 would have to appear even earlier in the sequence, which is impossible.
		

Crossrefs

Extensions

a(8)-a(15) from and edited by Nathaniel Johnston, May 02 2011
More terms from Sean A. Irvine, Jan 18 2025
Showing 1-2 of 2 results.