upto(n) = runs(uptoA303579(n)) runs(v) = {my(res = List(), t = 1, l = 5); for(i = 2, #v, if(v[i] == l, t++ , listput(res, t); t = 1 ); l = v[i] ); res } uptoA303579(n) = {my(res = List(), t = 1, l = 1); for(i = 2, n, el = eulerphi(i); if(el >= l, t++ , listput(res, t); t = 1 ); l = el ); res }