A295296 Numbers n such that the sum of their divisors + the number of ones in their binary expansion = 2n; numbers for which A000203(n) + A000120(n) = 2n.
1, 2, 3, 4, 8, 10, 16, 32, 64, 128, 136, 256, 315, 512, 1024, 2048, 4096, 8192, 16384, 32768, 32896, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 2147516416
Offset: 1
Examples
A000203(315) = 1 + 3 + 5 + 7 + 9 + 15 + 21 + 35 + 45 + 63 + 105 + 315 = 624. 2*315 - 624 = 6, and when 315 is written in binary, 100111011, we see that it has six 1-bits. Thus 315 is included in the sequence.
Links
- Max Alekseyev, Table of n, a(n) for n = 1..70 (first 52 terms from Giovanni Resta)
- Index entries for sequences related to binary expansion of n
- Index entries for sequences related to sigma(n)
Crossrefs
Programs
-
Mathematica
Select[Range[2^20], DivisorSigma[1, #] + DigitCount[#, 2, 1] == 2 # &] (* Michael De Vlieger, Nov 26 2017 *)
-
PARI
for(n=1, oo, if(sigma(n)+hammingweight(n) == 2*n, print1(n, ", ")));
Extensions
Terms a(35) and beyond from Giovanni Resta, Feb 27 2020
Comments