OFFSET
1,1
COMMENTS
Maximal runs of constant parity: (2,4),(1,3,5,7),(6),(9,11,13),(8,10,12,14,16),(15,17,19,21,23,25,27),(18,20,22,24,26,28),...
Lengths of the runs: 2, 4, 1, 3, 5, 7, 6,..., which is the sequence itself (and a permutation of the natural numbers).
REFERENCES
From a posting to the Sequence Fans Mailing List by Eric Angelini, Nov 22 2010
LINKS
Carl R. White, Table of n, a(n) for n = 1..10000
PROG
(bc) /*GNU bc*/ maxarray=2^16; print a[1]=2, ", ", oe[k=0]=a[p=n=2]=4, ", "; oe[1]=-1; max=100; for(; p<maxarray&&n<max; p++)for(i=0*k=!k; i<a[p]&&n<max; i++){an=oe[k]+=2; if(++n<maxarray)a[n]=an; print an, ", "}; print"\n"
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Nov 24 2010
STATUS
approved