|
|
A062383
|
|
a(0) = 1: for n>0, a(n) = 2^floor(log_2(n)+1) or a(n) = 2*a(floor(n/2)).
|
|
60
|
|
|
1, 2, 4, 4, 8, 8, 8, 8, 16, 16, 16, 16, 16, 16, 16, 16, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 128, 128, 128, 128, 128, 128
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Informally, write down 1 followed by 2^k 2^(k-1) times, for k = 1,2,3,4,... These are the denominators of the van der Corput sequence (see A030109). - N. J. A. Sloane, Dec 01 2019
a(n) is the denominator of the form 2^k needed to make the ratio (2n-1)/2^k lie in the interval [1-2], i.e. such ratios are 1/1, 3/2, 5/4, 7/4, 9/8, 11/8, 13/8, 15/8, 17/16, 19/16, 21/16, ... where the numerators are A005408 (The odd numbers).
Let A_n be the upper triangular matrix in the group GL(n,2) that has zero entries below the diagonal and 1 elsewhere. For example for n=4 the matrix is / 1,1,1,1 / 0,1,1,1 / 0,0,1,1 / 0,0,0,1 /. The order of this matrix as an element of GL(n,2) is a(n-1). - Ahmed Fares (ahmedfares(AT)my-deja.com), Jul 14 2001
A006257(n)/a(n) = (0, 0.1, 0.01, 0.11, 0.001, ...) enumerates all binary fractions in the unit interval [0, 1). - Fredrik Johansson, Aug 14 2006
This is the discriminator sequence for the odious numbers. - N. J. A. Sloane, May 10 2016
|
|
LINKS
|
|
|
FORMULA
|
a(1) = 1 and a(n+1) = a(n)*ceiling(n/a(n)). - Benoit Cloitre, Aug 17 2002
G.f.: 1/(1-x) * (1 + Sum_{k>=0} 2^k*x^2^k). - Ralf Stephan, Apr 18 2003
a(n) is the smallest power of 2 > n. - Chai Wah Wu, Nov 04 2016
|
|
MAPLE
|
[seq(2^(floor_log_2(j)+1), j=0..127)]; or [seq(coerce1st_octave((2*j)+1), j=0..127)]; or [seq(a(j), j=0..127)];
coerce1st_octave := proc(r) option remember; if(r < 1) then coerce1st_octave(2*r); else if(r >= 2) then coerce1st_octave(r/2); else (r); fi; fi; end;
option remember;
if n = 0 then
1 ;
else
2*procname(floor(n/2));
end if;
end proc:
A062383 := n -> 1 + Bits:-Iff(n, n):
|
|
MATHEMATICA
|
a[n_] := a[n] = 2 a[n/2 // Floor]; a[0] = 1; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Mar 04 2016 *)
|
|
PROG
|
(PARI) { a=1; for (n=0, 1000, write("b062383.txt", n, " ", a*=ceil((n + 1)/a)) ) } \\ Harry J. Smith, Aug 06 2009
(Haskell)
import Data.List (transpose)
a062383 n = a062383_list !! n
a062383_list = 1 : zs where
zs = 2 : (map (* 2) $ concat $ transpose [zs, zs])
(Magma) [2^Floor(Log(2, 2*n+1)): n in [0..70]]; // Bruno Berselli, Mar 04 2016
(Python)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,frac,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|