login
Numbers missing from A102370.
15

%I #38 Mar 16 2021 16:37:29

%S 1,2,7,12,29,62,123,248,505,1018,2047,4084,8181,16374,32755,65520,

%T 131057,262130,524279,1048572,2097133,4194286,8388587,16777192,

%U 33554409,67108842,134217711,268435428,536870885

%N Numbers missing from A102370.

%C Indices of negative numbers in A103122.

%C Write numbers in binary under each other; start at 2^k, read in upward direction with the first bit omitted and convert to decimal:

%C . . . . . . . . . . 0

%C . . . . . . . . . . 1

%C .. . . . . . . . . 10 < -- Starting here, the upward diagonal (first bit omitted) reads 1 -> 1

%C .. . . . . . . . . 11

%C . . . . . . . . . 100 < -- Starting here, the upward diagonal (first bit omitted) reads 10 -> 2

%C . . . . . . . . . 101

%C . . . . . . . . . 110

%C . . . . . . . . . 111

%C .. . . . . . . . 1000 < -- Starting here, the upward diagonal (first bit omitted) reads 111 -> 7

%C . . . . . . . . .1001

%C Thus a(n) = A102370(2^n - n) - 2^n.

%C Do we have a(n) = 2^n-1-A105033(n-1)? - _David A. Corneth_, May 07 2020

%H Reinhard Zumkeller, <a href="/A102371/b102371.txt">Table of n, a(n) for n = 1..1000</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) = -n + Sum_{ k >= 1, k == n mod 2^k } 2^k. - _N. J. A. Sloane_ and _David Applegate_, Mar 22 2005. E.g. a(5) = -5 + 2^1 + 2^5 = 29.

%F a(2^k + k) -a(k) = 2^(2^k + k) - 2^k, with k>= 1.

%F a(1)=1, 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

%F a(n) = A105027(A000225(n)). - _Reinhard Zumkeller_, Jul 21 2012

%p A102371:= proc (n) local t1, l; t1 := -n; for l to n do if `mod`(n-l,2^l) = 0 then t1 := t1+2^l end if end do; t1 end proc;

%o (Python)

%o a=1

%o for n in range(2,66):

%o print(a, end=",")

%o a ^= a+n

%o # _Alex Ratushnyak_, Apr 21 2012

%o (Haskell)

%o a102371 n = a102371_list !! (n-1)

%o a102371_list = map (a105027 . toInteger) $ tail a000225_list

%o -- _Reinhard Zumkeller_, Jul 21 2012

%Y Cf. A102370, A103530, A103581, A103582, A103583, A105033.

%K nonn,base

%O 1,2

%A _Philippe Deléham_, Feb 13 2005

%E More terms from _Benoit Cloitre_, Mar 20 2005

%E a(16)-a(22) from _Robert G. Wilson v_, Mar 21 2005

%E a(15)-a(29) from _David Applegate_, Mar 22 2005