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-4 of 4 results.

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

A237287 Numbers that are not practical: positive integers n such that there exists at least one number k <= sigma(n) that is not a sum of distinct divisors of n.

Original entry on oeis.org

3, 5, 7, 9, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 25, 26, 27, 29, 31, 33, 34, 35, 37, 38, 39, 41, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 65, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 79, 81, 82, 83, 85, 86, 87, 89, 91, 92, 93, 94, 95, 97, 98, 99, 101, 102, 103, 105
Offset: 1

Views

Author

Jaroslav Krizek, Mar 02 2014

Keywords

Comments

Complement of A005153 (practical numbers).
Numbers n such that A030057(n) < n.
First differs from A237046 at a(48).
First differs from A238524 at a(55). - Omar E. Pol, Mar 09 2014
First differs from A378471 at a(72). - Hartmut F. W. Hoft, Nov 27 2024

Examples

			5 is in the sequence because there are 3 numbers <= sigma(5) = 6 that are not a sum of any subset of distinct divisors of 5: 2, 3 and 4.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from sympy import factorint
    def A237287_gen(startvalue=1): # generator of terms
        for m in count(max(startvalue,1)):
            if m > 1:
                l = (~m & m-1).bit_length()
                if l>0:
                    P = (1<>l).items():
                        if p > 1+P:
                            yield m
                            break
                        P *= (p**(e+1)-1)//(p-1)
                else:
                    yield m
    A237387_list = list(islice(A237287_gen(),30)) # Chai Wah Wu, Jul 05 2023

Extensions

More terms added by Hartmut F. W. Hoft, Nov 27 2024, in order to show the difference from A378471.

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

A385904 a(n) is the number of nonempty subsets of the divisors of n that sum to a perfect square.

Original entry on oeis.org

1, 1, 2, 2, 1, 4, 1, 3, 3, 2, 1, 11, 1, 3, 4, 5, 1, 9, 1, 9, 3, 3, 1, 27, 2, 2, 4, 8, 1, 27, 1, 7, 3, 2, 2, 49, 1, 1, 3, 22, 1, 21, 1, 7, 8, 3, 1, 77, 2, 5, 2, 4, 1, 22, 2, 21, 2, 1, 1, 248, 1, 2, 7, 11, 1, 21, 1, 4, 2, 17, 1, 235, 1, 1, 9, 7, 1, 20, 1, 64, 6, 1
Offset: 1

Views

Author

Felix Huber, Jul 21 2025

Keywords

Examples

			a(6) = 4 because exactly the 4 nonempty subsets {1}, {1, 3}, {1, 2, 6} and {3, 6} of the divisors of 6 sum to a perfect square: 1 = 1^2, 1 + 3 = 2^2, 1 + 2 + 6 = 3^2.
		

Crossrefs

Programs

  • Maple
    with(NumberTheory):
    A385904:=proc(n)
        local b,l,j;
        l:=[(Divisors(n))[]]:
        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;
        add(b(j^2,nops(l)),j=1..floor(sqrt(sigma(n))));
    end:
    seq(A385904(n),n=1..82);
  • Mathematica
    a[n_]:=Module[{nb = 0, d = Divisors[n]},Length[Select[Subsets[d],IntegerQ[Sqrt[Total[#]]]&]]]-1;Array[a,82] (* James C. McMahon, Jul 27 2025 *)
  • PARI
    a(n) = my(nb=0, d=divisors(n)); forsubset(#d, s, nb+=issquare(sum(i=1, #s, d[s[i]]))); nb-1; \\ Michel Marcus, Jul 22 2025

Formula

a(p) = 1 for primes p != 3.
Showing 1-4 of 4 results.