login
A030596
Length of n-th run of digit 1 in A030588.
6
1, 3, 1, 1, 1, 1, 1, 1, 2, 1, 5, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 3, 2, 7, 3, 2, 3, 2, 2, 3, 2, 2, 3, 2
OFFSET
1,2
LINKS
PROG
(PARI)
up_to = 20000;
A030596list(up_to, d=1) = { my(v=vector(up_to), ds=List([]), o=1, j=1, rl=0, i=0); while(i<up_to, if(j>#ds, ds=digits(o, 6); j=1; o+=2); if(d==ds[j], rl++, if(rl, i++; v[i] = rl; rl=0)); j++); (v); };
v030596 = A030596list(up_to);
A030596(n) = v030596[n]; \\ Antti Karttunen, Dec 24 2018
CROSSREFS
KEYWORD
nonn,base
STATUS
approved