|
| |
|
|
A030302
|
|
Write n in base 2 and juxtapose.
|
|
8
| |
|
|
1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 1,1
|
|
|
FORMULA
| Let "index" i = ceiling( W(log(2)/2 (n - 1))/log(2) + 1 ) where W denotes the principal branch of the Lambert W function. Then a(n) = mod(floor(2^(mod(n + 2^i - 2, i) - i + 1) ceiling((n + 2^i - 1)/i - 1)), 2). See also Mathematica code. - David W. Cantrell (DWCantrell(AT)sigmaxi.net), Feb 19 2007
|
|
|
MATHEMATICA
| i[n_] := Ceiling[FullSimplify[ProductLog[Log[2]/2 (n - 1)]/Log[2] + 1]]; a[n_] := Mod[Floor[2^(Mod[n + 2^i[n] - 2, i[n]] - i[n] + 1) Ceiling[(n + 2^i[n] - 1)/i[n] - 1]], 2]; - David W. Cantrell (DWCantrell(AT)sigmaxi.net), Feb 19 2007
(* or *)
Join @@ Table[ IntegerDigits[i, 2], {i, 1, 40}] (* Olivier Gérard, Mar 28 2011 *)
|
|
|
CROSSREFS
| Essentially same as A030190. Cf. A030303, ...
Sequence in context: A014219 A065828 A176329 * A051023 A030657 A176178
Adjacent sequences: A030299 A030300 A030301 * A030303 A030304 A030305
|
|
|
KEYWORD
| nonn,base
|
|
|
AUTHOR
| Clark Kimberling (ck6(AT)evansville.edu)
|
| |
|
|