OFFSET
0,3
COMMENTS
A 1-1 map from the nonnegative integers to all integers.
Simply stated: a(n) = index of n in A102370 if it is a member, else minus its index in the complement A102371. - M. F. Hasler, Apr 14 2022
LINKS
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.
PROG
(PARI) A103122(n)=if(n<0, 0, s=-n; while(abs(if(sign(s)+1, 2^s-1/2-1/2*sum(k=0, s, (-1)^floor((s+k)/2^k)*2^k), 2^(-s-1)-1/2+1/2*sum(k=0, -s-1, (-1)^floor((-s-1-k)/2^k)*2^k))-n)>0, s++); s) \\ Benoit Cloitre, Mar 29 2005
CROSSREFS
KEYWORD
sign,base
AUTHOR
N. J. A. Sloane, Mar 24 2005
EXTENSIONS
More terms from Benoit Cloitre, Mar 29 2005
STATUS
approved