OFFSET
0,2
COMMENTS
The number of 1's in the n-th term appears to match A089400. - Benoit Cloitre, Mar 24 2005
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, J. Integer Seq. 8 (2005), no. 3, Article 05.3.6, 15 pp.
D. Applegate et al., Sloping Binary Number, A New Sequence Related to the Binary Numbers, arXiv:math/0505295 [math.NT], 2005.
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]; k++ ]; s]; Table[ FromDigits[ IntegerDigits[f[n] + n, 2]], {n, 0, 35}] (* Robert G. Wilson v, Mar 23 2005 *)
PROG
(Python)
def a(n): return '0' if n<1 else bin(sum([(n + k)&(2**k) for k in range(len(bin(n)[2:]) + 1)]))[2:] # Indranil Ghosh, May 03 2017
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
N. J. A. Sloane, Mar 23 2005
EXTENSIONS
More terms from Robert G. Wilson v and Benoit Cloitre, Mar 23 2005
STATUS
approved