OFFSET
1,1
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..1000
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
Also, miraculously, a(n+1) = 2^n - A102371(n) for n >= 1.
EXAMPLE
a(7) = 2^7 - A103529(7) = 128 - 126 = 2.
MAPLE
a:=proc(n)local k, t: if(n=1)then return 2:fi: t:= 2^(n-1) + (n-1): for k from 1 to n-1 do if(k = (n-1) mod 2^k)then t:=t-2^k: fi: od: return t: end: seq(a(n), n=1..80); # Nathaniel Johnston, Apr 30 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved