login
A359079
a(n) is the sum of the divisors d of 2*n such that the binary expansions of d and 2*n have no common 1-bit.
2
1, 3, 1, 7, 6, 6, 1, 15, 10, 13, 1, 16, 1, 3, 1, 31, 18, 33, 1, 32, 22, 3, 1, 36, 6, 3, 10, 14, 1, 6, 1, 63, 34, 54, 1, 70, 38, 22, 1, 70, 42, 48, 1, 7, 6, 3, 1, 76, 1, 38, 18, 7, 1, 24, 1, 36, 1, 3, 1, 21, 1, 3, 1, 127, 84, 116, 1, 126, 70, 38, 1, 153, 74, 77
OFFSET
1,2
COMMENTS
Odd numbers share a 1-bit (2^0) with all their divisors, hence this sequence deals with even numbers.
FORMULA
a(n) <= A346878(n) with equality iff n is a power of 2.
EXAMPLE
For n = 6:
- the divisors of 12 are:
d bin(d) common bit?
-- ------ -----------
1 1 no
2 10 no
3 11 no
4 100 yes
6 110 yes
12 1100 yes
- hence a(6) = 1 + 2 + 3 = 6.
MATHEMATICA
a[n_] := DivisorSum[2n, #*Boole[BitAnd[#, 2n] == 0] &]; Array[a, 74]
PROG
(PARI) a(n) = sumdiv(2*n, d, if (bitand(2*n, d)==0, d, 0))
(Python)
from sympy import divisors as divs
def a(n): return sum(d for d in divs(2*n, generator=True) if (d>>1)&n == 0)
print([a(n) for n in range(1, 75)]) # Michael S. Branicky, Dec 15 2022
CROSSREFS
Sequence in context: A205298 A046913 A118228 * A245684 A082053 A322753
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Dec 15 2022
STATUS
approved