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.

Previous Showing 11-20 of 24 results. Next

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

A308605 Number of distinct subset sums of the subsets of the set of divisors of n. Here 0 (as the sum of an empty subset) is included in the count.

Original entry on oeis.org

2, 4, 4, 8, 4, 13, 4, 16, 8, 16, 4, 29, 4, 16, 16, 32, 4, 40, 4, 43, 16, 16, 4, 61, 8, 16, 16, 57, 4, 73, 4, 64, 16, 16, 16, 92, 4, 16, 16, 91, 4, 97, 4, 64, 56, 16, 4, 125, 8, 64, 16, 64, 4, 121, 16, 121, 16, 16, 4, 169, 4, 16, 60, 128, 16, 145, 4, 64, 16, 143, 4, 196, 4, 16, 64, 64, 16, 169, 4, 187, 32, 16, 4, 225
Offset: 1

Views

Author

Ivan N. Ianakiev, Jun 10 2019

Keywords

Comments

Conjecture: When the terms are sorted and the duplicates deleted a supersequence of A030058 is obtained. Note that A030058 is a result of the same operation applied to A030057.
a(p^k) = 2^(k+1) if p is prime, and a(n) = 2n+1 if n is an even perfect number. - David Radcliffe, Dec 22 2022

Examples

			The subsets of the set of divisors of 6 are {{},{1},{2},{3},{6},{1,2},{1,3},{1,6},{2,3},{2,6},{3,6},{1,2,3},{1,2,6},{1,3,6},{2,3,6},{1,2,3,6}}, with the following sums {0,1,2,3,6,3,4,7,5,8,9,6,9,10,11,12}, of which 13 are distinct. Therefore, a(6)=13.
		

Crossrefs

One more than A119347.
Cf. A030057, A030058, A083207 (positions of odd terms), A179527 (parity of terms).

Programs

  • Maple
    A308605 := proc(n)
        # set of the divisors
        dvs := numtheory[divisors](n) ;
        # set of all the subsets of the divisors
        pdivs := combinat[powerset](dvs) ;
        # the set of the sums in subsets of divisors
        dvss := {} ;
        # loop over all subsets of divisors
        for s in pdivs do
            # compute sum over entries of the subset
            sps := add(d,d=s) ;
            # add sum to the realized set of sums
            dvss := dvss union {sps} ;
        end do:
        # count number of distinct entries (distinct sums)
        nops(dvss) ;
    end proc:
    seq(A308605(n),n=1..20) ; # R. J. Mathar, Dec 20 2022
  • Mathematica
    f[n_]:=Length[Union[Total/@Subsets[Divisors[n]]]]; f/@Range[100]
  • PARI
    A308605(n) = { my(c=[0]); fordiv(n,d, c = Set(concat(c,vector(#c,i,c[i]+d)))); (#c); }; \\ (after Chai Wah Wu's Python-code in A119347, but see also above) - Antti Karttunen, Nov 29 2024
    
  • PARI
    A308605(n) = { my(p=1); fordiv(n, d, p *= (1 + 'x^d)); sum(i=0,poldegree(p),(0Antti Karttunen, Nov 29 2024
  • Python
    from sympy import divisors
    def a308605(n):
        s = set([0])
        for d in divisors(n):
            s = s.union(set(x + d for x in s))
        return len(s) # David Radcliffe, Dec 22 2022
    

Formula

a(n) = 1 + A119347(n). - Rémy Sigrist, Jun 10 2019

Extensions

Definition clarified and more terms added by Antti Karttunen, Nov 29 2024

A378447 Difference between {the number of distinct sums of distinct divisors of n} and {the number of distinct sums of distinct proper divisors of n}.

Original entry on oeis.org

1, 2, 2, 4, 2, 6, 2, 8, 4, 8, 2, 12, 2, 8, 8, 16, 2, 18, 2, 20, 8, 8, 2, 24, 4, 8, 8, 28, 2, 30, 2, 32, 8, 8, 8, 36, 2, 8, 8, 40, 2, 42, 2, 32, 28, 8, 2, 48, 4, 32, 8, 32, 2, 54, 8, 56, 8, 8, 2, 60, 2, 8, 30, 64, 8, 66, 2, 32, 8, 70, 2, 72, 2, 8, 32, 32, 8, 78, 2, 80, 16, 8, 2, 84, 8, 8, 8, 88, 2, 90, 8, 32, 8, 8, 8
Offset: 1

Views

Author

Antti Karttunen, Nov 29 2024

Keywords

Crossrefs

Programs

Formula

a(n) = A119347(n) - A193279(n).

A378450 a(n) is the number 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, 1, 0, 3, 0, 5, 0, 6, 3, 9, 0, 11, 9, 9, 0, 15, 0, 17, 0, 17, 21, 21, 0, 24, 27, 25, 0, 27, 0, 29, 0, 33, 39, 33, 0, 35, 45, 41, 0, 39, 0, 41, 21, 23, 57, 45, 0, 50, 30, 57, 35, 51, 0, 57, 0, 65, 75, 57, 0, 59, 81, 45, 0, 69, 0, 65, 63, 81, 2, 69, 0, 71, 99, 61, 77, 81, 0, 77, 0, 90, 111, 81, 0, 93, 117, 105
Offset: 1

Views

Author

Antti Karttunen, Nov 29 2024

Keywords

Comments

Difference between the sum of divisors n and the number of distinct sums of distinct divisors of n.

Examples

			For n = 3, with divisors [1, 3] and sigma(3)=4, only 2 in range 1..4 cannot be represented as a sum of a subset of [1, 3], therefore a(3) = 1.
For n = 15, with divisors [1, 3, 5, 15] and sigma(15) = 24, the subset sums are 1, 3, 1+3, 5, 1+5, 3+5, 1+3+5, 15, 1+15, 3+15, 1+3+15, 5+15, 1+5+15, 3+5+15, 1+3+5+15 i.e., [1, 3, 4, 5, 6, 8, 9, 15, 16, 18, 19, 20, 21, 23, 24], which leaves 2, 7, 10, 11, 12, 13, 14, 17, 22 as unrepresented numbers, therefore a(15) = 9.
		

Crossrefs

Cf. A000203, A119347, A237289 (gives the sums of unrepresented numbers), A322860.
Cf. A005153 (positions of 0's), A237287 (of nonzeros), A030057.

Programs

  • PARI
    A119347(n) = { my(c=[0]); fordiv(n,d, c = Set(concat(c,vector(#c,i,c[i]+d)))); (#c)-1; };
    A378450(n) = (sigma(n)-A119347(n));

Formula

a(n) = A000203(n) - A119347(n).

A385645 a(n) is the number of distinct sums of distinct prime powers dividing n.

Original entry on oeis.org

1, 3, 3, 7, 3, 6, 3, 15, 7, 7, 3, 10, 3, 7, 7, 31, 3, 13, 3, 12, 7, 7, 3, 18, 7, 7, 15, 14, 3, 11, 3, 63, 7, 7, 7, 19, 3, 7, 7, 20, 3, 13, 3, 15, 14, 7, 3, 34, 7, 15, 7, 15, 3, 27, 7, 22, 7, 7, 3, 15, 3, 7, 14, 127, 7, 13, 3, 15, 7, 13, 3, 27, 3, 7, 15, 15, 7, 13
Offset: 1

Views

Author

Felix Huber, Jul 11 2025

Keywords

Examples

			The a(4) = 7 distinct sums of distinct prime powers dividing 4 are 1, 2, 4, 1 + 2, 1 + 4, 2 + 4 and 1 + 2 + 4.
		

Crossrefs

Programs

  • Maple
    A385645:=proc(n)
        local b,k,l,i,j;
        l:=[1,seq(seq(i[1]^j,j=1..i[2]),i in ifactors(n)[2])]:
        b:=proc(m,i)
            option remember;
            `if`(m=0,1,`if`(i<1,0,b(m,i-1)+`if`(l[i]>m,0,b(m-l[i],i-1))))
        end;
        return nops(select(x->x>0,[seq(b(k,nops(l)),k=1..add(l))]))
        end:
    seq(A385645(n),n=1..78);

Formula

a(p) = 3 for prime p.
a(p^k) = A119347(p^k) for prime p and nonnegative integer k.
A385646(n) < a(n) <= A119347(n).

A385646 a(n) is the number of distinct sums of distinct prime factors of n.

Original entry on oeis.org

0, 1, 1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 3, 3, 1, 1, 3, 1, 3, 3, 3, 1, 3, 1, 3, 1, 3, 1, 6, 1, 1, 3, 3, 3, 3, 1, 3, 3, 3, 1, 7, 1, 3, 3, 3, 1, 3, 1, 3, 3, 3, 1, 3, 3, 3, 3, 3, 1, 6, 1, 3, 3, 1, 3, 7, 1, 3, 3, 6, 1, 3, 1, 3, 3, 3, 3, 7, 1, 3, 1, 3, 1, 7, 3, 3, 3, 3
Offset: 1

Views

Author

Felix Huber, Jul 11 2025

Keywords

Examples

			The a(18) = 3 distinct sums of distinct prime factors of 18 = 2*3^2 are 2, 3 and 2 + 3.
The a(42) = 7 distinct sums of distinct prime factors of 42 = 2*3*7 are 2, 3, 7, 2 + 3 = 5, 2 + 7 = 9, 3 + 7 = 10, 2 + 3 + 7 = 12.
The a(30) = 6 distinct sums of distinct prime factors of 30 = 2*3*5 are 2, 3, 2 + 3 = 5, 2 + 5 = 7, 3 + 5 = 8, 2 + 3 + 5 = 10.
		

Crossrefs

Programs

  • Maple
    A385646:=proc(n)
        local b,k,l,i,j;
        l:=[seq(i[1],i in ifactors(n)[2])]:
        b:=proc(m,i)
            option remember;
            `if`(m=0,1,`if`(i<1,0,b(m,i-1)+`if`(l[i]>m,0,b(m-l[i],i-1))))
        end;
        return nops(select(x->x>0,[seq(b(k,nops(l)),k=1..add(l))]))
        end:
    seq(A385646(n),n=1..85);

Formula

a(n) < A385646(n).

A119357 Numbers k such that the number of distinct nonzero sums of distinct divisors of k is less than 2^tau(k) - 1 (the largest number of possible distinct sums, tau(k) being the number of divisors of k (A000005)).

Original entry on oeis.org

6, 12, 18, 20, 24, 28, 30, 36, 40, 42, 45, 48, 54, 56, 60, 63, 66, 70, 72, 78, 80, 84, 88, 90, 96, 99, 100, 102, 104, 105, 108, 110, 112, 114, 117, 120, 126, 130, 132, 135, 138, 140, 144, 150, 154, 156, 160, 162, 165, 168, 170, 174, 176, 180, 182, 186, 189, 192, 195
Offset: 1

Views

Author

Emeric Deutsch, May 18 2006

Keywords

Comments

Equivalently, numbers k for which there exist two distinct subsets of the set of divisors of k having the same sum.
The sequence is closed with respect to multiplication by positive integers (i.e. any multiple of any term in the sequence is in the sequence). The primitive entries of the sequence, i.e. those that are not multiples of other terms of the sequence, are given in A119425 (the first five are 6,20,28,45 and 63).
The number of distinct sums of distinct divisors of n are given in A119347 and the actual sums are given in row n of the triangle A119348.
Subsequence of A051774 (Max Alekseyev).

Examples

			6 is in the sequence because from the divisors of 6, namely 1,2,3,6, we can form by addition 12 sums (1,2,3,...,12) and 12 < 2^tau(6)-1=2^4-1=15.
Sequence contains, for example, all multiples of 6 (1+2=3), all multiples of 20 (1+4=5), all multiples of 28 (1+2+4=7), all multiples of 63 (1+9=3+7).
		

Crossrefs

Programs

  • Maple
    with(numtheory): with(linalg): s:=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: a:=proc(n) if s(n)<2^tau(n)-1 then n else fi end: seq(a(n),n=1..230);
  • Mathematica
    q[n_] := Module[{d = Divisors[n], x}, Max[CoefficientList[Series[Product[1 + x^d[[i]], {i, Length[d]}], {x, 0, Total[d]}], x]] > 1]; Select[Range[200], q] (* Amiram Eldar, Jan 02 2022 *)

A193280 Triangle read by rows: row n contains, in increasing order, all the distinct sums of distinct proper divisors of n.

Original entry on oeis.org

0, 1, 1, 1, 2, 3, 1, 1, 2, 3, 4, 5, 6, 1, 1, 2, 3, 4, 5, 6, 7, 1, 3, 4, 1, 2, 3, 5, 6, 7, 8, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 1, 1, 2, 3, 7, 8, 9, 10, 1, 3, 4, 5, 6, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
Offset: 1

Views

Author

Michael Engling, Jul 20 2011

Keywords

Comments

Row n > 1 contains A193279(n) terms. In row n the first term is 1 and the last term is sigma(n) - n (= A000203(n) - n). Row 1 contains 0 because 1 has no proper divisors.

Examples

			Row 10 is 1,2,3,5,6,7,8 the possible sums obtained from the proper divisors 1, 2, and 5 of 10.
Triangle starts:
  0;
  1;
  1;
  1,2,3;
  1;
  1,2,3,4,5,6;
  1;
  1,2,3,4,5,6,7;
  1,3,4;
  1,2,3,5,6,7,8;
  1;
  1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16;
		

Crossrefs

Programs

  • Maple
    with(linalg): print(0); for n from 2 to 12 do dl:=convert(numtheory[divisors](n) minus {n}, list): t:=nops(dl): print(op({seq(innerprod(dl, convert(2^t+i, base, 2)[1..t]), i=1..2^t-1)})): od: # Nathaniel Johnston, Jul 23 2011

A342400 a(n) is the number of distinct sums of distinct unitary divisors of n.

Original entry on oeis.org

1, 3, 3, 3, 3, 12, 3, 3, 3, 15, 3, 13, 3, 15, 15, 3, 3, 15, 3, 13, 15, 15, 3, 15, 3, 15, 3, 15, 3, 72, 3, 3, 15, 15, 15, 15, 3, 15, 15, 15, 3, 96, 3, 15, 15, 15, 3, 15, 3, 15, 15, 15, 3, 15, 15, 13, 15, 15, 3, 108, 3, 15, 15, 3, 15, 144, 3, 15, 15, 142, 3, 13
Offset: 1

Views

Author

Amiram Eldar, Mar 10 2021

Keywords

Crossrefs

The unitary version of A119347.

Programs

  • Mathematica
    a[n_] := Module[{d = Select[Divisors[n], CoprimeQ[#, n/#] &], x, s, m, c}, m = Length[d]; s = Plus @@ d; c = Rest@CoefficientList[Series[Product[1 + x^d[[i]], {i, 1, m}], {x, 0, s}], x]; Count[c, _?(# > 0 &)]]; Array[a, 100]

Formula

a(n) <= A034448(n) with equality if and only if n is a unitary practical number (A286652).
a(p^e) = 3 for a prime p and e >= 1.

A378597 Möbius transform of A378450, where A378450 is the number 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, 1, 0, 3, -1, 5, 0, 5, 0, 9, 0, 11, 4, 5, 0, 15, -5, 17, -3, 11, 12, 21, 0, 21, 16, 19, -9, 27, -8, 29, 0, 23, 24, 25, 0, 35, 28, 29, 0, 39, -20, 41, 0, 9, 36, 45, 0, 45, 6, 41, 8, 51, -19, 45, 0, 47, 48, 57, 3, 59, 52, 23, 0, 55, -44, 65, 24, 59, -35, 69, 0, 71, 64, 31, 32, 67, -56, 77, 0, 65, 72, 81, 9, 75, 76, 77, -21
Offset: 1

Views

Author

Antti Karttunen, Dec 02 2024

Keywords

Crossrefs

Programs

  • PARI
    A119347(n) = { my(c=[0]); fordiv(n,d, c = Set(concat(c,vector(#c,i,c[i]+d)))); (#c)-1; };
    A378450(n) = (sigma(n)-A119347(n));
    A378597(n) = sumdiv(n,d,moebius(n/d)*A378450(d));

Formula

a(n) = Sum_{d|n} A008683(d)*A378450(n/d).
a(n) = n - A378596(n).
Previous Showing 11-20 of 24 results. Next