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.

A074293 Dominant (i.e., most populous) digit in Kolakoski sequence (A000002) when partitioned into groups of 5.

Original entry on oeis.org

1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2
Offset: 0

Views

Author

Jon Perry, Sep 21 2002

Keywords

Examples

			The Kolakoski sequence begins (1,2,2,1,1), (2,1,2,2,1), (2,2,1,1,2), (1,1,2,2,1), hence sequence begins 1,2,2,1.
		

Crossrefs

Programs

  • Maple
    lim:=400: s:=[1,2,2]: for n from 3 to lim do for i from 1 to s[n] do s:=[op(s),1+((n-1)mod 2)]: od: od: lim2:=floor(nops(s)/5)-1: for n from 0 to lim2 do if(s[5*n+1]+s[5*n+2]+s[5*n+3]+s[5*n+4]+s[5*n+5]<=7)then printf("1, "): else printf("2, "): fi: od: # Nathaniel Johnston, May 01 2011