|
|
A090049
|
|
Length of longest contiguous block of 0's in binary expansion of n^3.
|
|
6
|
|
|
1, 0, 3, 1, 6, 1, 3, 1, 9, 2, 3, 2, 6, 3, 3, 2, 12, 3, 3, 2, 6, 4, 3, 4, 9, 4, 3, 3, 6, 3, 3, 3, 15, 4, 3, 2, 6, 3, 3, 2, 9, 4, 4, 2, 6, 3, 4, 3, 12, 3, 4, 6, 6, 3, 3, 3, 9, 2, 3, 4, 6, 2, 3, 4, 18, 5, 4, 2, 6, 6, 3, 4, 9, 2, 3, 2, 6, 1, 3, 4, 12, 6, 4, 3, 6, 2, 3, 5, 9, 5, 3, 3, 6, 6, 3, 3, 15, 4, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
|
|
MAPLE
|
f:= proc(n) local R;
R:= convert(2*n^3+1, base, 2);
R:= select(t -> R[t]=1, [$1..nops(R)]);
max(R[2..-1]-R[1..-2])-1
end proc:
f(0):= 1:
|
|
PROG
|
(PARI) a(n)=my(r, k, t=n^3); for(i=0, exponent(t), if(bittest(t, i), k=0, k++>r, r=k)); if(n, r, 1) \\ Charles R Greathouse IV, Mar 10 2020
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|