The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A103185 a(n) = Sum_{ k >= 0 such that n + k == 0 mod 2^k } 2^(k-1). 6
 0, 1, 2, 1, 0, 5, 2, 1, 0, 1, 2, 1, 8, 5, 2, 1, 0, 1, 2, 1, 0, 5, 2, 1, 0, 1, 2, 17, 8, 5, 2, 1, 0, 1, 2, 1, 0, 5, 2, 1, 0, 1, 2, 1, 8, 5, 2, 1, 0, 1, 2, 1, 0, 5, 2, 1, 0, 1, 34, 17, 8, 5, 2, 1, 0, 1, 2, 1, 0, 5, 2, 1, 0, 1, 2, 1, 8, 5, 2, 1, 0, 1, 2, 1, 0, 5, 2, 1, 0, 1, 2, 17, 8, 5, 2, 1, 0, 1, 2, 1, 0, 5, 2, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 LINKS Vincenzo Librandi, Table of n, a(n) for n = 0..2000 David Applegate, Benoit Cloitre, Philippe Deléham and N. J. A. Sloane, Sloping binary numbers: a new sequence related to the binary numbers [pdf, ps]. David Applegate, Benoit Cloitre, Philippe Deléham and N. J. A. Sloane, Sloping binary numbers: a new sequence related to the binary numbers, J. Integer Seq. 8 (2005), no. 3, Article 05.3.6, 15 pp. FORMULA a(n) = (A102370(n) - n)/2. MATHEMATICA f[n_] := Block[{k = 1, s = 0, l = Max[2, Floor[ Log[2, n + 1] + 2]]}, While[k < l, If[ Mod[n + k, 2^k] == 0, s = s + 2^(k - 1)]; k++ ]; s]; Table[ f[n], {n, 0, 103}] (* Robert G. Wilson v, Mar 18 2005 *) PROG (PARI) A103185(n)=(sum(k=0, ceil(log(n+1)/log(2)), if((n+k)%2^k, 0, 2^k))-1)/2 \\ Benoit Cloitre, Mar 20 2005 (Python) def a102370(n): return 0 if n<1 else sum([(n + k)&(2**k) for k in range(len(bin(n)[2:]) + 1)]) def a(n): return (a102370(n) - n)/2 # Indranil Ghosh, May 03 2017 CROSSREFS Cf. A102370(n). Sequence in context: A243821 A143445 A133727 * A130513 A114596 A083417 Adjacent sequences:  A103182 A103183 A103184 * A103186 A103187 A103188 KEYWORD nonn,easy,base AUTHOR N. J. A. Sloane, Mar 18 2005 EXTENSIONS More terms from Robert G. Wilson v, Mar 18 2005 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified November 26 21:07 EST 2021. Contains 349344 sequences. (Running on oeis4.)