OFFSET
0,3
COMMENTS
a(n) >= 3*A007814(n). Conjecture: if n < 2^k then a(n) < 3*k. - Robert Israel, Mar 10 2020
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
FORMULA
a(n) <= 3*A070939(n) - 3 for n > 0. - Charles R Greathouse IV, Mar 10 2020
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:
map(f, [$0..100]); # Robert Israel, Mar 10 2020
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
Reinhard Zumkeller, Nov 20 2003
STATUS
approved