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.

Showing 1-5 of 5 results.

A359084 Numbers k such that A246601(k) > 2*k.

Original entry on oeis.org

4095, 8190, 16380, 32760, 65520, 131040, 262080, 524160, 1048320, 2096640, 4193280, 8386560, 16773120, 16777215, 33546240, 33550335, 33554430, 67092480, 67096575, 67100670, 67108860, 134184960, 134189055, 134193150, 134201340, 134217720, 268369920, 268374015
Offset: 1

Views

Author

Amiram Eldar, Dec 15 2022

Keywords

Comments

An analog of abundant numbers k (A005101), in which the divisor sum is restricted to divisors d whose 1-bits in their binary expansions are common with those of k.
If k is a term then 2*k is also a term. Therefore all the terms can be generated from the primitive set of the odd terms (A359085).
The least term that is not divisible by 4095 is a(208) = 1099511627775 = 2^40 - 1.
Since A246601(2^k-1) = sigma(2^k-1), 2^k-1 is a term for all k in A103292, unless 2^k-1 is an odd perfect number (A000396).

Crossrefs

Cf. A000203 (sigma), A000396, A103292, A246601.
Subsequence of A005101.
A359085 is a subsequence.

Programs

  • Mathematica
    s[n_] := DivisorSum[n, # &, BitAnd[n, #] == # &]; Select[Range[10^6], s[#] > 2*# &]
  • PARI
    is(n) = sumdiv(n, d, d * (bitor(n, d) == n)) > 2*n;

A359085 Odd numbers k such that A246601(k) > 2*k.

Original entry on oeis.org

4095, 16777215, 33550335, 67096575, 134189055, 268374015, 536743935, 1073483775, 2146963455, 4293922815, 8587841535, 17175678975, 34351353855, 68702703615, 68719476735, 137405403135, 137422176255, 137438949375, 274810802175, 274827575295, 274844348415, 274877894655
Offset: 1

Views

Author

Amiram Eldar, Dec 15 2022

Keywords

Comments

These are the odd terms of A359084 and also its primitive terms, since if m is a term then m*2^k is a term of A359084 for all k >= 0.
The least term that is not divisible by 4095 is a(29) = 1099511627775 = 2^40 - 1.

Crossrefs

Cf. A246601.
Subsequence of A005101, A005231 and A359084.

Programs

  • Mathematica
    s[n_] := DivisorSum[n, # &, BitAnd[n, #] == # &]; Select[Range[1, 2^24, 2], s[#] > 2*# &]
  • PARI
    is(n) = n%2 && sumdiv(n, d, d * (bitor(n, d) == n)) > 2*n;

A246600 Number of divisors d of n with property that the binary representation of d can be obtained from the binary representation of n by changing any number of 1's to 0's.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 4, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 4, 2, 1, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 4, 2, 2, 4, 3, 2, 2, 2, 2, 4, 2, 2, 6, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 2, 2, 2, 2, 2, 2, 4, 2, 3, 2, 2, 4, 2
Offset: 1

Views

Author

N. J. A. Sloane, Sep 06 2014

Keywords

Comments

Equivalently, the number of divisors d of n such that the bitwise OR of n and d is equal to n. - Chai Wah Wu, Sep 06 2014
Equivalently, the number of divisors d of n such that the bitwise AND of n and d is equal to d. - Amiram Eldar, Dec 15 2022
The sums of the first 10^k terms for k = 1, 2, ..., are 16, 224, 2580, 26920, 273407, 2745100, 27440305, 274127749, 2738936912, 27373288534, 273631055291, 2735755647065, ... . Conjecture: The asymptotic mean of this sequence is 1 + Sum_{k>=1} 1/(k*2^A000120(k)) = 2.7351180693... . - Amiram Eldar, Apr 07 2023

Examples

			12 = 1100_2; only the divisors 4 = 0100_2 and 12 = 1100_2 satisfy the condition, so(12)=2.
15 = 1111_2; all divisors 1,3,5,15 satisfy the condition, so a(15)=4.
		

Crossrefs

Programs

  • Maple
    A246600:=proc(n)
        local a, d, s, t, i, sw;
        a:=0;
        s:=convert(n, base, 2);
        for d in numtheory[divisors](n) do
            sw:= false;
            t:=convert(d, base, 2);
            for i from 1 to nops(t) do
                if t[i]>s[i] then
                    sw:= true;
                fi;
            od:
            if not sw then
                a:=a+1;
            fi;
        od;
        a;
    end;
    seq(A246600(n), n=1..100);
  • Mathematica
    a[n_] := DivisorSum[n, Boole[BitOr[#, n] == n]&]; Array[a, 100] (* Jean-François Alcover, Dec 02 2015, adapted from PARI *)
  • PARI
    a(n)=sumdiv(n,d,bitor(d,n)==n) \\ Charles R Greathouse IV, Sep 29 2014
  • Python
    from sympy import divisors
    def A246600(n):
        return sum(1 for d in divisors(n) if n|d == n)
    # Chai Wah Wu, Sep 06 2014
    

Formula

a(2^i) = 1.
a(odd prime) = 2.
a(n) <= 2^wt(n)-1, where wt(n) = A000120(n).
a(n) = Sum_{d|n} A047999(n,d), where A047999(n,d) = binomial(n,d) mod 2. - Ridouane Oudra, May 03 2019
From Amiram Eldar, Dec 15 2022: (Start)
a(2*n) = a(n), and therefore a(m*2^k) = a(m) for m odd and k>=0.
a(2^n-1) = A000005(2^n-1) = A046801(n). (End)

A362804 Numbers k such that the set of divisors {d | k, BitOr(k, d) = k} has an integer harmonic mean.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 16, 24, 28, 30, 32, 45, 48, 56, 60, 64, 90, 96, 112, 120, 128, 180, 192, 224, 240, 256, 360, 384, 448, 480, 496, 512, 720, 768, 896, 960, 992, 1024, 1440, 1536, 1792, 1920, 1984, 2048, 2880, 3072, 3584, 3840, 3968, 4096, 5760, 6144, 7168, 7680
Offset: 1

Views

Author

Amiram Eldar, May 04 2023

Keywords

Comments

Equivalently, the set of divisors can be defined by {d | k, BitAnd(k, d) = d}.
Analogous to harmonic (or Ore) numbers (A001599) where the divisors d of k are restricted by BitOr(k, d) = k or BitAnd(k, d) = d.
If k is a term then so is 2*k. The primitive terms are in A362805. Thus, this sequence includes all the powers of 2 (A000079), all the numbers of the form 3*2^m and 15*2^m for m >= 1, and all the numbers of the form 7*2^m for m >= 2.
All the even perfect numbers (A000396) are terms: if k = 2^(p-1)*(2^p-1) is a perfect number (where p is a Mersenne exponent, A000043), then the only divisors of k such that BitOr(k, d) = k are 2^(p-1) and k itself, and the harmonic mean of 2^(p-1) and 2^(p-1)*(2^p-1) is 2^p - 1.
Are 1 and 45 the only odd terms in this sequence?

Crossrefs

Subsequences: A000079, A007283 \ {3}, A005009 \ {7, 14}, A110286 \ {15}, A362805.
Similar sequences: A001599, A006086, A063947, A286325, A319745.

Programs

  • Mathematica
    q[n_] := IntegerQ[HarmonicMean[Select[Divisors[n], BitAnd[n, #] == # &]]]; Select[Range[10^4], q]
  • PARI
    div(n) = select(x->(bitor(x, n) == n), divisors(n));
    is(n) = {my(d = div(n)); denominator(#d/sum(i = 1, #d, 1/d[i])) == 1;}

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.
Showing 1-5 of 5 results.