login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A277446 Longest partition of the binary digits of n read from left to right into contiguous blocks so that the value of a block divides the value of its successor and with no leading zeros in the blocks. 3
1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 1, 2, 2, 3, 4, 1, 1, 1, 1, 2, 1, 2, 1, 2, 2, 3, 2, 3, 3, 4, 5, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 2, 2, 1, 2, 2, 2, 2, 3, 2, 3, 2, 3, 3, 4, 3, 4, 4, 5, 6, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 3, 2, 4, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
EXAMPLE
We have 58 = (1,1,1,0,1,0)_2 and (1)_2|(1)_2|(1,0)_2|(1,0)_2 yielding the value four.
We have 676 = (1,0,1,0,1,0,0,1,0,0)_2 and (1,0)_2|(1,0)_2|(1,0,0)_2|(1,0,0)_2 yielding the value four.
PROG
(PARI) okp(p, b) = {vb = vector(#p); vv = vector(#p); j = 1; for (k=1, #p, vb[k] = vector(p[k], m, b[j+m-1]); if ((vb[k])[1] == 0, return (0)); vv[k] = subst(Pol(vb[k]), x, 2); if ((k >1) && (vv[k] % vv[k-1]), return (0)); j += p[k]; ); 1; }
a(n) = {b = binary(n); nb = 0; forpart(p=#b, if (okp(p, b), nb = max(nb, #p)); ); nb; } \\ Michel Marcus, Oct 18 2016
CROSSREFS
Sequence in context: A265743 A082850 A290695 * A334029 A334297 A333765
KEYWORD
nonn,base
AUTHOR
Marko Riedel, Oct 15 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 00:58 EDT 2024. Contains 371798 sequences. (Running on oeis4.)