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.

A093653 Total number of 1's in binary expansion of all divisors of n.

Original entry on oeis.org

1, 2, 3, 3, 3, 6, 4, 4, 5, 6, 4, 9, 4, 8, 9, 5, 3, 10, 4, 9, 9, 8, 5, 12, 6, 8, 9, 12, 5, 18, 6, 6, 8, 6, 9, 15, 4, 8, 10, 12, 4, 18, 5, 12, 15, 10, 6, 15, 7, 12, 9, 12, 5, 18, 11, 16, 10, 10, 6, 27, 6, 12, 17, 7, 8, 16, 4, 9, 10, 18, 5, 20, 4, 8, 16, 12, 11, 20, 6, 15, 12, 8, 5, 27, 9, 10, 12
Offset: 1

Views

Author

Jason Earls, May 16 2004

Keywords

Examples

			a(8) = 4 because the divisors of 8 are [1, 2, 4, 8] and in binary: 1, 10, 100, 1000, so four 1's.
		

Crossrefs

Cf. A226590 (number of 0's in binary expansion of all divisors of n).
Cf. A182627 (number of digits in binary expansion of all divisors of n).
Cf. A034690 (a decimal equivalent).

Programs

  • Maple
    a:= n-> add(add(i, i=Bits[Split](d)), d=numtheory[divisors](n)):
    seq(a(n), n=1..100);  # Alois P. Heinz, May 17 2022
  • Mathematica
    Table[Plus@@DigitCount[Divisors[n], 2, 1], {n, 75}] (* Alonso del Arte, Sep 01 2013 *)
  • PARI
    A093653(n) = sumdiv(n,d,hammingweight(d)); \\ Antti Karttunen, Dec 14 2017
    
  • PARI
    a(n) = {my(v = valuation(n, 2), n = (n>>v)); sumdiv(n, d, hammingweight(d)) * (v + 1)} \\ David A. Corneth, Feb 15 2023
    
  • Python
    from sympy import divisors
    def a(n): return sum(bin(d).count("1") for d in divisors(n))
    print([a(n) for n in range(1, 88)]) # Michael S. Branicky, Apr 20 2022
    
  • Python
    from sympy import divisors
    def A093653(n): return sum(d.bit_count() for d in divisors(n, generator=True))
    print([A093653(n) for n in range(1, 88)]) # Michael S. Branicky, Feb 15 2023

Formula

a(n) = Sum_{k = 0..n} if(mod(n, k) = 0, A000120(k), 0). - Paul Barry, Jan 14 2005
a(n) = A182627(n) - A226590(n). - Jaroslav Krizek, Sep 01 2013
a(n) = A292257(n) + A000120(n). - Antti Karttunen, Dec 14 2017
From Bernard Schott, May 16 2022: (Start)
If prime p = A000043(n), then a(2^p-1) = a(A000668(n)) = p+1 = A050475(n).
a(2^n) = n+1 (End)

A195307 Where records occur in A129308 and also in A195155.

Original entry on oeis.org

1, 2, 6, 12, 60, 180, 360, 420, 840, 1260, 2520, 5040, 13860, 27720, 55440, 83160, 166320, 277200, 360360, 720720, 1081080, 2162160, 2827440, 4324320, 6126120, 12252240, 24504480, 36756720, 73513440, 147026880, 183783600, 232792560, 367567200, 465585120, 698377680
Offset: 1

Views

Author

Omar E. Pol, Oct 16 2011

Keywords

Comments

Observation: a(n) ending at 0, if 5 <= n <= 24 and possibly more.
From David A. Corneth, Apr 14 2021: (Start)
Conjecture: for each term k > 1 in the sequence there exists prime p such that k/p is in the sequence.
From the first 35 terms only a(23) = 2827440 is not in A025487.
In the list of conjectured terms, if actual terms <= 10^16 are 97-smooth and have the following property: a(n+1) = a(n) + k*gcd(a(n), a(n-1), ..., a(n-20)) setting a(n) = 1 for n < 1 then those terms are actual terms.
The conjectured terms are 41-smooth and satisfy a(n+1) = a(n) + k*gcd(a(n), a(n-1), ..., a(n-13)). (End)
From Bernard Schott, Jul 30 2022: (Start)
Equivalently, integers whose number of oblong divisors (A129308) sets a new record.
Corresponding records of number of oblong divisors are 0, 1, 2, 3, 5, 6, 7, 8, 9, 10, 12, 13, 14, ... (End)

Examples

			a(4) = 12 is in the sequence because A129308(12) = 3 is larger than any earlier value in A129308. - _Bernard Schott_, Jul 30 2022
		

Crossrefs

Extensions

More terms a(6)-a(24) from Alois P. Heinz, Oct 16 2011
a(25)-a(35) from David A. Corneth, Apr 14 2021

A360641 Numbers k where A093653(k)/A000120(k) sets a new record.

Original entry on oeis.org

1, 2, 4, 8, 12, 16, 24, 36, 66, 72, 132, 144, 264, 420, 528, 840, 1026, 1056, 1680, 2052, 4104, 8208, 16416, 32832, 65664, 73920, 84000, 110880, 118800, 131328, 133380, 237600, 263340, 266760, 526680, 533520, 1053360, 1067040, 2106720, 2134080, 3160080, 4213440
Offset: 1

Views

Author

Amiram Eldar, Feb 15 2023

Keywords

Comments

Analogous to superabundant numbers (A004394) as A175526 is analogous to abundant numbers (A005101).
The corresponding record values are 1, 2, 3, 4, 9/2, 5, 6, 15/2, 8, 10, ... .
This sequence is infinite since A093653(k)/A000120(k) is unbounded: A093653(2^m)/A000120(2^m) = m+1 for all m >= 0.

Examples

			The values of A093653(k)/A000120(k) for k=1..10 are 1, 2, 3/2, 3, 3/2, 3, 4/3, 4, 5/2 and 3. The record values, 1, 2, 3 and 4, occur at 1, 2, 4 and 8, the first 4 terms of this sequence.
		

Crossrefs

Programs

  • Mathematica
    seq[nmax_] := Module[{s = {}, rm = 0, r}, Do[If[(r = DivisorSum[n, DigitCount[#, 2, 1] &]/DigitCount[n, 2, 1]) > rm, rm = r; AppendTo[s, n]], {n, 1, nmax}]; s]; seq[10^4]
  • PARI
    lista(kmax) = {my(rm = 0, r); for(k = 1, kmax, r = sumdiv(k, d, hammingweight(d))/hammingweight(k); if(r > rm, rm = r; print1(k, ", "))); }
    
  • Python
    # uses imports and definitions in A093653, A000120
    from itertools import count, islice
    def f(n): return A093653(n)/A000120(n)
    def agen(r=0): yield from ((m, r:=fm)[0] for m in count(1) if (fm:=f(m))>r)
    print(list(islice(agen(), 34))) # Michael S. Branicky, Feb 15 2023

A360642 a(n) is the least number k such that A093653(k)/A000120(k) = n.

Original entry on oeis.org

1, 2, 4, 8, 16, 24, 64, 66, 84, 72, 210, 132, 450, 792, 288, 264, 1044, 672, 5328, 528, 1344, 840, 1026, 1056, 4116, 1800, 4128, 2112, 5124, 3780, 6480, 2184, 3360, 8352, 11088, 8448, 4680, 50700, 4200, 4368, 20880, 8280, 13320, 13440, 12420, 4104, 46200, 8736
Offset: 1

Views

Author

Amiram Eldar, Feb 15 2023

Keywords

Comments

a(n) exists for all n >= 1 since A093653(2^(k-1))/A000120(2^(k-1)) = k for all k >= 1.
Analogous to A007539 as A175522 is analogous to perfect numbers (A000396).

Examples

			a(1) = 1 since A093653(1)/A000120(1) = 1/1 = 1.
a(2) = 2 since A093653(2)/A000120(2) = 2/1 = 2, and 2 is the least number with this property.
a(3) = 4 since A093653(4)/A000120(4) = 3/1 = 3, and 4 is the least number with this property.
		

Crossrefs

Programs

  • Mathematica
    seq[len_, nmax_] := Module[{s = Table[0, {len}], c = 0, n = 1, i}, While[c < len && n <= nmax, i = DivisorSum[n, DigitCount[#, 2, 1] &]/DigitCount[n, 2, 1]; If[IntegerQ[i] && i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; TakeWhile[s, # > 0 &]]; seq[50, 10^5]
  • PARI
    lista(len, nmax) = {my(s = vector(len), c = 0, n = 1, i); while(c < len && n <= nmax, i = sumdiv(n, d, hammingweight(d))/hammingweight(n); if(denominator(i) == 1 && i <= len && s[i] == 0, c++; s[i] = n); n++); s }
    
  • Python
    # uses imports and definitions in A093653, A000120
    from itertools import count, islice
    def f(n): q, r = divmod(A093653(n), A000120(n)); return q if r == 0 else 0
    def agen():
        n, adict = 1, dict()
        for k in count(1):
            v = f(k)
            if v not in adict: adict[v] = k
            while n in adict: yield adict[n]; n += 1
    print(list(islice(agen(), 48))) # Michael S. Branicky, Feb 15 2023

Formula

a(n) <= 2^(n-1).

A339552 Numbers k such that the product of the binary weights of the divisors of k (A339549) sets a new record.

Original entry on oeis.org

1, 3, 6, 12, 14, 15, 21, 28, 30, 42, 60, 84, 90, 120, 168, 180, 210, 252, 360, 420, 540, 630, 840, 1080, 1260, 2520, 3780, 5040, 6300, 7560, 10080, 12600, 13860, 15120, 21420, 22680, 25200, 27720, 32760, 37800, 41580, 42840, 49140, 55440, 65520, 75600, 83160
Offset: 1

Views

Author

Amiram Eldar, Dec 08 2020

Keywords

Comments

Analogous to A093687 as A339549 is analogous to A093653.
The corresponding record values of A339549 are 1, 2, 4, 8, 9, 16, 18, 27, 256, 324, ... (see the link for more values).

Crossrefs

Programs

  • Mathematica
    f[n_] := Times @@ (DigitCount[#, 2, 1] & /@ Divisors[n]); c=0; fm = 0; s = {}; Do[f1 = f[n]; If[f1 > fm, fm = f1; AppendTo[s, n]], {n, 1, 10000}]; s
Showing 1-5 of 5 results.