A103529 Values of A102370 which are >= a new power of 2.
0, 3, 6, 15, 28, 61, 126, 251, 504, 1017, 2042, 4095, 8180, 16373, 32758, 65523, 131056, 262129, 524274, 1048567, 2097148, 4194285, 8388590, 16777195, 33554408, 67108841, 134217706, 268435439, 536870884, 1073741797, 2147483622
Offset: 1
Examples
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.
Links
- David Applegate and N. J. A. Sloane, Table of n, a(n) for n = 1..62
- 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.
Programs
-
Python
a=3 print(0, end=',') for i in range(2,55): print(a, end= ',') a ^= a+i # Alex Ratushnyak, Apr 21 2012
Formula
a(n) = 2^(n-1) - (n-1) + Sum_{ k >= 1, k == n-1 mod 2^k } 2^k.
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