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-10 of 17 results. Next

A119347 Number of distinct sums of distinct divisors of n. Here 0 (as the sum of an empty subset) is excluded from the count.

Original entry on oeis.org

1, 3, 3, 7, 3, 12, 3, 15, 7, 15, 3, 28, 3, 15, 15, 31, 3, 39, 3, 42, 15, 15, 3, 60, 7, 15, 15, 56, 3, 72, 3, 63, 15, 15, 15, 91, 3, 15, 15, 90, 3, 96, 3, 63, 55, 15, 3, 124, 7, 63, 15, 63, 3, 120, 15, 120, 15, 15, 3, 168, 3, 15, 59, 127, 15, 144, 3, 63, 15, 142, 3, 195, 3, 15, 63, 63
Offset: 1

Views

Author

Emeric Deutsch, May 15 2006

Keywords

Comments

If a(n)=sigma(n) (=sum of the divisors of n =A000203(n); i.e. all numbers from 1 to sigma(n) are sums of distinct divisors of n), then n is called a practical number (A005153). The actual sums obtained from the divisors of n are given in row n of the triangle A119348.
The records appear to occur at the highly abundant numbers, A002093, excluding 3 and 10. For n in A174533, a(n) = sigma(n)-2. - T. D. Noe, Mar 29 2010
The indices of records occur at the highly abundant numbers, excluding 3 and 10, if Jaycob Coleman's conjecture at A002093 that all these numbers are practical numbers (A005153) is true. - Amiram Eldar, Jun 13 2020
Zumkeller numbers A083207 give the positions of even terms in this sequence (likewise, the positions of odd terms in A308605). - Antti Karttunen and Ilya Gutkovskiy, Nov 29 2024

Examples

			a(5)=3 because the divisors of 5 are 1 and 5 and all the possible sums: are 1,5 and 6; a(6)=12 because we can form all sums 1,2,...,12 by adding up the terms of a nonempty subset of the divisors 1,2,3,6 of 6.
		

Crossrefs

One less than A308605.
Cf. A083207 (positions of even terms).

Programs

  • Haskell
    import Data.List (subsequences, nub)
    a119347 = length . nub . map sum . tail . subsequences . a027750_row'
    -- Reinhard Zumkeller, Jun 27 2015
    
  • Maple
    with(numtheory): with(linalg): a:=proc(n) local dl,t: dl:=convert(divisors(n),list): t:=tau(n): nops({seq(innerprod(dl,convert(2^t+i,base,2)[1..t]),i=1..2^t-1)}) end: seq(a(n),n=1..90);
  • Mathematica
    a[n_] := Total /@ Rest[Subsets[Divisors[n]]] // Union // Length;
    Array[a, 100] (* Jean-François Alcover, Jan 27 2018 *)
  • PARI
    A119347(n) = { my(p=1); fordiv(n, d, p *= (1 + 'x^d)); sum(i=1,poldegree(p),(0Antti Karttunen, Nov 28 2024
    
  • PARI
    A119347(n) = { my(c=[0]); fordiv(n, d, c = Set(concat(c,vector(#c,i,c[i]+d)))); (#c)-1; }; \\ after Chai Wah Wu's Python-code, Antti Karttunen, Nov 29 2024
  • Python
    from sympy import divisors
    def A119347(n):
        c = {0}
        for d in divisors(n,generator=True):
            c |=  {a+d for a in c}
        return len(c)-1 # Chai Wah Wu, Jul 05 2023
    

Formula

For n > 1, 3 <= a(n) <= sigma(n). - Charles R Greathouse IV, Feb 11 2019
For p prime, a(p) = 3. For k >= 0, a(2^k) = 2^(k + 1) - 1. - Ctibor O. Zizka, Oct 19 2023
From Antti Karttunen, Nov 29 2024: (Start)
a(n) = A308605(n)-1.
a(n) = 2*(A237290(n)/A000203(n)) - 1. [Found by Sequence Machine. See A237290.]
a(n) <= A100587(n).
(End)

Extensions

Definition clarified by Antti Karttunen, Nov 29 2024

A229335 Sum of sums of elements of subsets of divisors of n.

Original entry on oeis.org

1, 6, 8, 28, 12, 96, 16, 120, 52, 144, 24, 896, 28, 192, 192, 496, 36, 1248, 40, 1344, 256, 288, 48, 7680, 124, 336, 320, 1792, 60, 9216, 64, 2016, 384, 432, 384, 23296, 76, 480, 448, 11520, 84, 12288, 88, 2688, 2496, 576, 96, 63488, 228, 2976, 576, 3136, 108
Offset: 1

Views

Author

Jaroslav Krizek, Sep 20 2013

Keywords

Comments

Number of nonempty subsets of divisors of n = A100587(n).

Examples

			For n = 2^2 = 4; divisors of 4: {1, 2, 4}; nonempty subsets of divisors of n: {1}, {2}, {4}, {1, 2}, {1, 4}, {2, 4}, {1, 2, 4}; sum of sums of elements of subsets = 1 + 2 + 4 + 3 + 5 + 6 + 7 = 28 = (2^3-1) * 2^2 = 7 * 4.
		

Crossrefs

Cf. A229336 (product of sums of elements of subsets of divisors of n).
Cf. A229337 (sum of products of elements of subsets of divisors of n).
Cf. A229338 (product of products of elements of subsets of divisors of n).

Programs

  • Maple
    A229335 := proc(n)
        numtheory[sigma](n)*A100577(n) ;
    end proc:
    seq(A229335(n),n=1..100) ; # R. J. Mathar, Nov 10 2017
  • Mathematica
    Table[Total[Flatten[Subsets[Divisors[n]]]], {n, 100}] (* T. D. Noe, Sep 21 2013 *)

Formula

a(n) = A000203(n) * A100577(n) = A000203(n) * (A100587(n) + 1) / 2 = A000203(n) * 2^(A000005(n) - 1) = sigma(n) * 2^(tau(n) - 1).
a(2^n) = (2^(n+1) - 1) * 2^n.

A339665 Number of nonempty subsets of divisors of n whose harmonic mean is an integer.

Original entry on oeis.org

1, 2, 2, 3, 2, 9, 2, 4, 3, 4, 2, 17, 2, 4, 6, 5, 2, 19, 2, 10, 4, 4, 2, 37, 3, 4, 4, 12, 2, 45, 2, 6, 4, 4, 4, 57, 2, 4, 4, 28, 2, 29, 2, 6, 16, 4, 2, 85, 3, 6, 4, 6, 2, 35, 4, 23, 4, 4, 2, 301, 2, 4, 6, 7, 4, 28, 2, 6, 4, 19, 2, 255, 2, 4, 10, 6, 4, 20, 2, 61
Offset: 1

Views

Author

Ilya Gutkovskiy, Dec 11 2020

Keywords

Examples

			a(6) = 9 subsets: {1}, {2}, {3}, {6}, {2, 6}, {3, 6}, {1, 3, 6}, {2, 3, 6} and {1, 2, 3, 6}.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Count[Subsets[Divisors[n]], ?(Length[#] > 0 && IntegerQ[HarmonicMean[#]] &)]; Array[a, 100] (* _Amiram Eldar, Nov 09 2021 *)
  • PARI
    h(s, d) = #s/sum(k=1, #s, 1/d[s[k]]);
    a(n) = my(d=divisors(n), nb=0); forsubset(#d, s, if (#s && (denominator(h(s, d))==1), nb++)); nb; \\ Michel Marcus, Dec 15 2020
    
  • Python
    from itertools import combinations
    from sympy import divisors
    def A339665(n):
        ds = tuple(divisors(n, generator=True))
        return sum(sum(1 for d in combinations(ds,i) if n*i % sum(d) == 0) for i in range(1,len(ds)+1)) # Chai Wah Wu, Nov 09 2021

A100577 Number of sets of divisors of n with an odd sum.

Original entry on oeis.org

1, 2, 2, 4, 2, 8, 2, 8, 4, 8, 2, 32, 2, 8, 8, 16, 2, 32, 2, 32, 8, 8, 2, 128, 4, 8, 8, 32, 2, 128, 2, 32, 8, 8, 8, 256, 2, 8, 8, 128, 2, 128, 2, 32, 32, 8, 2, 512, 4, 32, 8, 32, 2, 128, 8, 128, 8, 8, 2, 2048, 2, 8, 32, 64, 8, 128, 2, 32, 8, 128, 2, 2048, 2, 8, 32, 32, 8, 128, 2, 512, 16, 8, 2
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 29 2004

Keywords

Comments

a(n) = A000079(A032741(n)).
Also number of subsets of divisors of n which do not contain 1; thus a(n) = (A100587(n)+1)/2. - Vladeta Jovovic, Jul 02 2007

Examples

			a(12) = #{{1}, {3}, {1,2}, {1,4}, {2,3}, {1,6}, {3,4}, {1,2,4}, {3,6}, {1,2,6}, {2,3,4}, {1,4,6}, {2,3,6}, {1,12}, {3,4,6}, {1,2,4,6}, {3,12}, {1,2,12}, {2,3,4,6}, {1,4,12}, {2,3,12}, {1,6,12}, {3,4,12}, {1,2,4,12}, {3,6,12}, {1,2,6,12}, {2,3,4,12}, {1,4,6,12}, {2,3,6,12}, {1,2,4,6,12}, {3,4,6,12}, {2,3,4,6,12}} = 32.
		

Crossrefs

Programs

Formula

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

A237289 Sum of positive numbers k <= sigma(n) that are not a sum of any subset of distinct divisors of n.

Original entry on oeis.org

0, 0, 2, 0, 9, 0, 20, 0, 39, 27, 54, 0, 77, 108, 108, 0, 135, 0, 170, 0, 272, 378, 252, 0, 372, 567, 500, 0, 405, 0, 464, 0, 792, 1053, 792, 0, 665, 1350, 1148, 0, 819, 0, 902, 882, 897, 2052, 1080, 0, 1425, 1395, 2052, 1715, 1377, 0, 2052, 0, 2600, 3375, 1710
Offset: 1

Views

Author

Jaroslav Krizek, Mar 02 2014

Keywords

Examples

			For n = 5, a(5) = 2 + 3 + 4 = 9 (numbers 2, 3 and 4 are not a sum of any subset of distinct divisors of 5).
Numbers n = 14 and 15 are an interesting pair of consecutive numbers with identical value of sigma(n) such that simultaneously a(14) = a(15) and A237290(14) = A237290(15).
a(14) = 4+5+6+11+12+13+18+19+20 = a(15) = 2+7+10+11+12+13+14+17+22 = 108.
a(6) = 0 as 6 is practical; the sums into distinct divisors from 1 through 12 are 1 = 1, 2 = 2, 3 = 3, 4 = 1 + 3, 5 = 2 + 3, 6 = 1 + 2 + 3, 7 through 12 are (1 through 6) + 6. So none are not a sum distinct divisors of 6. - _David A. Corneth_, Jul 22 2025
		

Crossrefs

Programs

  • Maple
    isSumDist := proc(n,k)
        local dvs ;
        dvs := numtheory[divisors](n) ;
        for s in combinat[powerset](dvs) do
            add(m,m=op(s)) ;
            if % = k then
                return true;
            end if;
        end do:
        false ;
    end proc:
    A237289 := proc(n)
        local a;
        a := 0 ;
        for k from 1 to numtheory[sigma](n) do
            if not isSumDist(n,k) then
                a := a+k;
            end if;
        end do:
        a ;
    end proc:
    seq(A237289(n),n=1..20) ; # R. J. Mathar, Mar 13 2014
  • Mathematica
    a[n_] := Block[{d = Divisors@n, s}, s = Plus @@ d; s*(s + 1)/2 - Plus @@ Union[Plus @@@ Subsets@d]]; m = Array[a, 59] (* Giovanni Resta, Mar 13 2014 *)
  • Python
    from sympy import divisors
    def A237289(n):
        ds = divisors(n)
        c, s = {0}, sum(ds)
        for d in ds:
            c |=  {a+d for a in c}
        return (s*(s+1)>>1)-sum(a for a in c if 1<=a<=s) # Chai Wah Wu, Jul 05 2023

Formula

a(n) = A184387(n) - A237290(n).
a(p) = p(p - 1) / 2 - 1 for p = prime > 2.
a(n) = 0 for practical numbers (A005153), a(n) > 0 for numbers that are not practical (A237287).
a(n) = A184387(n) - A229335(n) for numbers n such that A119347(n) = A100587(n).

Extensions

a(55) and a(57)-a(59) corrected by Giovanni Resta, Mar 13 2014

A339663 Number of nonempty subsets of divisors of n whose average is an integer.

Original entry on oeis.org

1, 2, 3, 4, 3, 9, 3, 7, 6, 6, 3, 24, 3, 7, 13, 12, 3, 27, 3, 22, 11, 7, 3, 72, 6, 6, 12, 21, 3, 83, 3, 20, 13, 6, 11, 133, 3, 7, 11, 70, 3, 82, 3, 21, 38, 7, 3, 230, 7, 14, 13, 23, 3, 88, 11, 65, 11, 6, 3, 763, 3, 7, 35, 36, 11, 84, 3, 22, 13, 73, 3, 780, 3, 6, 37, 20, 11, 82, 3, 228
Offset: 1

Views

Author

Ilya Gutkovskiy, Dec 11 2020

Keywords

Examples

			a(16) = 12 subsets: {1}, {2}, {4}, {8}, {16}, {2, 4}, {2, 8}, {2, 16}, {4, 8}, {4, 16}, {8, 16} and {1, 4, 16}.
		

Crossrefs

Programs

  • PARI
    sumbybits(v,b) = { my(s=0,i=1); while(b>0,s += (b%2)*v[i]; i++; b >>= 1); (s); };
    A339663(n) = { my(ds=divisors(n), u=#ds); sum(m=1, (2^u)-1, !(sumbybits(ds,m)%hammingweight(m))); }; \\ Antti Karttunen, Dec 12 2021

A339666 Number of nonempty subsets of divisors of n whose root-mean-square is an integer.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 3, 4, 3, 4, 2, 6, 2, 6, 4, 5, 2, 6, 2, 6, 6, 4, 2, 8, 3, 4, 4, 9, 2, 8, 2, 6, 4, 4, 7, 9, 2, 4, 4, 12, 3, 12, 2, 6, 7, 4, 2, 12, 5, 6, 4, 6, 2, 8, 5, 12, 4, 4, 2, 26, 2, 4, 9, 7, 4, 8, 2, 6, 4, 14, 2, 12, 2, 4, 6, 6, 6, 8, 2, 24, 5, 6, 2, 22
Offset: 1

Views

Author

Ilya Gutkovskiy, Dec 11 2020

Keywords

Examples

			a(14) = 6 subsets: {1}, {2}, {7}, {14}, {1, 7} and {2, 14}.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; uses numtheory; local l, b;
          l, b:= sort([divisors(n)[]]),
          proc(i, s, c) option remember;
            `if`(i=0, `if`(c>0 and issqr(s/c), 1, 0),
             b(i-1, s, c)+b(i-1, s+l[i]^2, c+1))
          end; forget(b); b(nops(l), 0$2)
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Sep 30 2022
  • Mathematica
    a[n_] := a[n] = Module[{b, l = Divisors[n]}, b[i_, s_, c_] := b[i, s, c] = If[i == 0, If[c > 0 && IntegerQ @ Sqrt[s/c], 1, 0], b[i-1, s, c]+b[i-1, s+l[[i]]^2, c+1]]; b[Length[l], 0, 0]];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 13 2022, after Alois P. Heinz *)

A229336 Product of sums of elements of nonempty subsets of divisors of n.

Original entry on oeis.org

1, 6, 12, 5040, 30, 77598259200, 56, 1307674368000, 168480, 12703122432000, 132, 52875224823823084892891318660312910903645116196873830400000000000000, 182, 440505199411200, 493242753024000, 8222838654177922817725562880000000, 306
Offset: 1

Views

Author

Jaroslav Krizek, Sep 20 2013

Keywords

Comments

Number of nonempty subsets of divisors of n = A100587(n).

Examples

			For n = 2^2 = 4; divisors of 4: {1, 2, 4}; nonempty subsets of divisors of n: {1}, {2}, {4}, {1, 2}, {1, 4}, {2, 4}, {1, 2, 4}; product of sums of elements of subsets = 1*2*4*3*5*6*7 = 5040 = (2^3 - 1)! = 7!.
		

Crossrefs

Cf. A229335 (sum of sums of elements of nonempty subsets of divisors of n),
A229337 (sum of products of elements of nonempty subsets of divisors of n),
A229338 (product of products of elements of nonempty subsets of divisors of n).

Programs

  • Mathematica
    Table[Times@@(Total/@Rest[Subsets[Divisors[n]]]),{n,20}] (* Harvey P. Dale, Jan 22 2023 *)

Formula

a(2^n) = (2^(n+1) - 1)!.

A229337 Sum of products of elements of nonempty subsets of divisors of n.

Original entry on oeis.org

1, 5, 7, 29, 11, 167, 15, 269, 79, 395, 23, 10919, 27, 719, 767, 4589, 35, 31919, 39, 41579, 1407, 1655, 47, 2456999, 311, 2267, 2239, 104399, 59, 5499647, 63, 151469, 3263, 3779, 3455, 76767599, 75, 4679, 4479, 15343019, 83, 19071359, 87, 372599, 353279, 6767
Offset: 1

Views

Author

Jaroslav Krizek, Sep 20 2013

Keywords

Comments

Number of nonempty subsets of divisors of n = A100587(n).

Examples

			For n = 2^2 = 4; divisors of 4: {1, 2, 4}; nonempty subsets of divisors of n: {1}, {2}, {4}, {1, 2}, {1, 4}, {2, 4}, {1, 2, 4}; sum of products of elements of subsets = 1 + 2 + 4 + 2 + 4 + 8 + 8 = 29 = (1+1) * (2+1) * (4+1) - 1.
		

Crossrefs

Cf. A229335 (sum of sums of elements of nonempty subsets of divisors of n), A229336 (product of sums of elements of nonempty subsets of divisors of n), A229338 (product of products of elements of nonempty subsets of divisors of n).

Formula

Let a, b, c, ..., k be all divisors of n; a(n) = (a+1) * (b+1) * ... * (k+1) - 1.
a(p) = 2p+1, a(p^2) = 2(p+1)(p^2+1) - 1.
a(n) = A020696(n) - 1.

A339664 Number of nonempty subsets of divisors of n whose geometric mean is an integer.

Original entry on oeis.org

1, 2, 2, 5, 2, 4, 2, 8, 5, 4, 2, 10, 2, 4, 4, 15, 2, 10, 2, 10, 4, 4, 2, 16, 5, 4, 8, 10, 2, 8, 2, 26, 4, 4, 4, 63, 2, 4, 4, 16, 2, 8, 2, 10, 10, 4, 2, 30, 5, 10, 4, 10, 2, 16, 4, 16, 4, 4, 2, 20, 2, 4, 10, 45, 4, 8, 2, 10, 4, 8, 2, 196, 2, 4, 10, 10, 4, 8, 2, 30
Offset: 1

Views

Author

Ilya Gutkovskiy, Dec 11 2020

Keywords

Examples

			a(12) = 10 subsets: {1}, {2}, {3}, {4}, {6}, {12}, {1, 4}, {3, 12}, {1, 2, 4} and {3, 6, 12}.
		

Crossrefs

Showing 1-10 of 17 results. Next