|
|
A273126
|
|
Length of "continued logarithm" expansion of n.
|
|
2
|
|
|
1, 1, 2, 1, 2, 2, 4, 1, 2, 2, 4, 2, 5, 4, 6, 1, 2, 2, 4, 2, 5, 4, 6, 2, 7, 5, 5, 4, 5, 6, 8, 1, 2, 2, 4, 2, 5, 4, 6, 2, 7, 5, 5, 4, 5, 6, 8, 2, 9, 7, 6, 5, 6, 5, 6, 4, 8, 5, 7, 6, 6, 8, 10, 1, 2, 2, 4, 2, 5, 4, 6, 2, 7, 5, 5, 4, 5, 6, 8, 2, 9, 7, 6, 5, 6, 5, 6, 4, 8, 5, 7, 6, 6, 8, 10, 2, 11, 9, 7, 7, 8, 6, 9, 5, 7, 6, 8, 5, 7, 6, 9, 4, 9, 8, 11, 5, 6, 7, 7, 6, 7, 6, 8, 8, 9, 10, 12
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
It is known that a(n) is bounded by 2 log_2 (n) + 2; see my preprint linked below. - Jeffrey Shallit, Jun 14 2016
|
|
LINKS
|
|
|
EXAMPLE
|
The expansions for n=2 to 19 are [1], [1,1], [2], [2,2], [2,1], [2,0,1,1], [3], [3,3], [3,2], [3,1,1,1], [3,1], [3,0,0,0,1], [3,0,1,1], [3,0,2,0,1,1], [4], [4,4], [4,3], [4,2,1,1]. - R. J. Mathar, Jun 02 2016
1,
1,2,
1,2,2,4,
1,2,2,4,2,5,4,6,
1,2,2,4,2,5,4,6,2,7,5,5,4,5,6,8,
1,2,2,4,2,5,4,6,2,7,5,5,4,5,6,8,2,9,7,6,5,6,5,6,4,8,5,7,6,6,8,10,
1,2,2,4,2,5,4,6,2,7,5,5,4,5,6,8,2,9,7,6,5,6,5,6,4,8,5,7,6,6,8,10,2,11,9,7,7,8,6,9,5,7,6,8,5,7,6,9,4,9,8,11,5,6,7,7,6,7,6,8,8,9,10,12
|
|
MAPLE
|
local a , x, cf;
if n = 1 then
return 1;
end if;
cf := [] ;
x := n ;
while x > 1 do
a := ilog2(x) ;
cf := [op(cf), a] ;
x := x/2^a ;
if x = 1 then
break;
end if;
x := 1/(x-1) ;
end do:
nops(cf) ;
end proc:
|
|
PROG
|
(PARI) a(n) = my (x=n); for (w=1, oo, while (x>=2, x /= 2); if (x==1, return (w)); x = 1/(x-1); if (x<=1, return (w))) \\ Rémy Sigrist, Sep 09 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|