login
This site is supported by donations 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

Table of n, a(n) for n=1..107.

Marko Riedel, Maple code to compute sequence.

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

Cf. A277447, A277448.

Sequence in context: A265743 A082850 A290695 * A088198 A318288 A088426

Adjacent sequences:  A277443 A277444 A277445 * A277447 A277448 A277449

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 20 23:06 EST 2019. Contains 329348 sequences. (Running on oeis4.)