login
A103542
Binary equivalents of A102370.
5
0, 11, 110, 101, 100, 1111, 1010, 1001, 1000, 1011, 1110, 1101, 11100, 10111, 10010, 10001, 10000, 10011, 10110, 10101, 10100, 11111, 11010, 11001, 11000, 11011, 11110, 111101, 101100, 100111, 100010, 100001, 100000, 100011, 100110, 100101
OFFSET
0,2
COMMENTS
The number of 1's in the n-th term appears to match A089400. - Benoit Cloitre, Mar 24 2005
LINKS
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
Sequence in context: A169631 A308005 A280855 * A293871 A336880 A211968
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