A386569 The number of binary self numbers not exceeding 2^n.
1, 1, 2, 3, 5, 10, 18, 34, 67, 131, 261, 520, 1037, 2073, 4143, 8283, 16562, 33121, 66237, 132471, 264938, 529870, 1059740, 2119473, 4238941, 8477878, 16955748, 33911492, 67822978, 135645949, 271291894, 542583782, 1085167557, 2170335106, 4340670206, 8681340402
Offset: 0
Examples
There are 3 binary self numbers that do no exceed 2^3 = 8: 1, 4 and 6. Hence a(3) = 3.
Programs
-
Mathematica
selfQ[n_] := AllTrue[Range[n, n - Floor@Log2[n], -1], # + DigitCount[#, 2, 1] != n &]; a[n_] := Count[Range[2^n], _?selfQ]; Array[a, 16, 0]
Formula
Limit_{n->oo} a(n)/2^n = A242403.