cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Dec 15 2022

Keywords

Comments

Odd numbers share a 1-bit (2^0) with all their divisors, hence this sequence deals with even numbers.

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[2n, #*Boole[BitAnd[#, 2n] == 0] &]; Array[a, 74]
  • 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

Formula

a(n) <= A346878(n) with equality iff n is a power of 2.