%I #28 May 02 2021 21:43:01
%S 0,3,6,15,28,61,126,251,504,1017,2042,4095,8180,16373,32758,65523,
%T 131056,262129,524274,1048567,2097148,4194285,8388590,16777195,
%U 33554408,67108841,134217706,268435439,536870884,1073741797,2147483622
%N Values of A102370 which are >= a new power of 2.
%H David Applegate and N. J. A. Sloane, <a href="/A103529/b103529.txt">Table of n, a(n) for n = 1..62</a>
%H David Applegate, Benoit Cloitre, Philippe Deléham and N. J. A. Sloane, Sloping binary numbers: a new sequence related to the binary numbers [<a href="http://neilsloane.com/doc/slopey.pdf">pdf</a>, <a href="http://neilsloane.com/doc/slopey.ps">ps</a>].
%H David Applegate, Benoit Cloitre, Philippe Deléham and N. J. A. Sloane, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL8/Sloane/sloane300.html">Sloping binary numbers: a new sequence related to the binary numbers</a>, J. Integer Seq. 8 (2005), no. 3, Article 05.3.6, 15 pp.
%F a(n) = 2^(n-1) - (n-1) + Sum_{ k >= 1, k == n-1 mod 2^k } 2^k.
%F a(n+1) = 2^n + A102371(n) for n>=1. a(n) = 2^n - A103530(n). - _Philippe Deléham_, Mar 30 2005
%F a(0)=0, a(1)=3, for n>1, a(n)= a(n-1) XOR (a(n-1)+n), where XOR is the bitwise exclusive-or operator. - _Alex Ratushnyak_, Apr 21 2012
%e The initial values of A102370 are 0*, 3*, 6*, 5, 4, 15*, 10, 9, 8, 11, 14, 13, 28*, 23, ... and the starred terms are those which exceed the next power of 2. Their indices (except for the zero term) are given by A000325.
%o (Python)
%o a=3
%o print(0, end=',')
%o for i in range(2,55):
%o print(a, end= ',')
%o a ^= a+i
%o # _Alex Ratushnyak_, Apr 21 2012
%Y Cf. A102370, A103530.
%K nonn,base
%O 1,2
%A _N. J. A. Sloane_ and _David Applegate_, Mar 22 2005