OFFSET
1,2
EXAMPLE
Lambda(1) = 1 is the first (record) run, so a(1) = 1.
Lambda(2) = lambda(3) = -1 is the second record run, so a(2) = 2.
Lambda(11) = lambda(12) = lambda(13) = -1 is the third record run, so a(3) = 11.
MATHEMATICA
sz[n_] := Module[{t = LiouvilleLambda[n], k = n}, While[LiouvilleLambda[k++] == t]; k - n]; r = 0; Reap[For[n = 1, n <= 10^6, n++, t = sz[n]; If[t > r, r = t; Print[t, " ", n]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, Oct 17 2016, adapted from PARI *)
PROG
(PARI) L(n)=(-1)^bigomega(n);
sz(n)=my(t=L(n), k=n); while(L(k++)==t, ); k-n
r=0; for(n=1, 1e9, t=sz(n); if(t>r, r=t; print(t" "n)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Charles R Greathouse IV, Dec 10 2013
STATUS
approved