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 24 results. Next

A378602 Lexicographically earliest infinite sequence such that a(i) = a(j) => A046523(i) = A046523(j) and A119347(i) = A119347(j), for all i, j >= 1.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 5, 3, 6, 2, 7, 2, 6, 6, 8, 2, 9, 2, 10, 6, 6, 2, 11, 3, 6, 5, 12, 2, 13, 2, 14, 6, 6, 6, 15, 2, 6, 6, 16, 2, 17, 2, 18, 19, 6, 2, 20, 3, 18, 6, 18, 2, 21, 6, 21, 6, 6, 2, 22, 2, 6, 23, 24, 6, 25, 2, 18, 6, 26, 2, 27, 2, 6, 18, 18, 6, 28, 2, 29, 8, 6, 2, 30, 6, 6, 6, 31, 2, 32, 6, 18, 6, 6, 6, 33, 2, 18, 23, 34, 2, 28, 2, 35, 36
Offset: 1

Views

Author

Antti Karttunen, Dec 01 2024

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A046523(n), A119347(n)].

Crossrefs

Programs

  • PARI
    up_to = 100000;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };
    A119347(n) = { my(c=[0]); fordiv(n,d, c = Set(concat(c,vector(#c,i,c[i]+d)))); (#c)-1; };
    Aux378602(n) = [A046523(n), A119347(n)];
    v378602 = rgs_transform(vector(up_to, n, Aux378602(n)));
    A378602(n) = v378602[n];

A378451 Dirichlet inverse of A119347, where A119347(n) is the number of distinct sums of distinct divisors of n.

Original entry on oeis.org

1, -3, -3, 2, -3, 6, -3, 0, 2, 3, -3, 5, -3, 3, 3, 0, -3, -6, -3, 9, 3, 3, -3, -12, 2, 3, 0, -5, -3, 18, -3, 0, 3, 3, 3, 13, -3, 3, 3, 3, -3, -6, -3, -12, -4, 3, -3, 4, 2, -12, 3, -12, -3, -6, 3, 57, 3, 3, -3, -15, -3, 3, -8, 0, 3, -54, -3, -12, 3, -34, -3, -39, -3, 3, -12, -12, 3, -78, -3, -24, 0, 3, -3, 157, 3, 3, 3
Offset: 1

Views

Author

Antti Karttunen, Nov 29 2024

Keywords

Crossrefs

Cf. A119347.

Programs

  • PARI
    A119347(n) = { my(c=[0]); fordiv(n,d, c = Set(concat(c,vector(#c,i,c[i]+d)))); (#c)-1; };
    memoA378451 = Map();
    A378451(n) = if(1==n,1,my(v); if(mapisdefined(memoA378451,n,&v), v, v = -sumdiv(n,d,if(dA119347(n/d)*A378451(d),0)); mapput(memoA378451,n,v); (v)));

Formula

a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, dA119347(n/d) * a(d).

A378596 Möbius transform of A119347, where A119347 number of distinct sums of nonempty subsets of divisors of n.

Original entry on oeis.org

1, 2, 2, 4, 2, 7, 2, 8, 4, 10, 2, 12, 2, 10, 10, 16, 2, 23, 2, 23, 10, 10, 2, 24, 4, 10, 8, 37, 2, 38, 2, 32, 10, 10, 10, 36, 2, 10, 10, 40, 2, 62, 2, 44, 36, 10, 2, 48, 4, 44, 10, 44, 2, 73, 10, 56, 10, 10, 2, 57, 2, 10, 40, 64, 10, 110, 2, 44, 10, 105, 2, 72, 2, 10, 44, 44, 10, 134, 2, 80, 16, 10, 2, 75, 10, 10, 10
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; };
    A378596(n) = sumdiv(n,d,moebius(n/d)*A119347(d));

Formula

a(n) = Sum_{d|n} A008683(d)*A119347(n/d).
a(n) = n - A378597(n).

A083207 Zumkeller or integer-perfect numbers: numbers n whose divisors can be partitioned into two disjoint sets with equal sum.

Original entry on oeis.org

6, 12, 20, 24, 28, 30, 40, 42, 48, 54, 56, 60, 66, 70, 78, 80, 84, 88, 90, 96, 102, 104, 108, 112, 114, 120, 126, 132, 138, 140, 150, 156, 160, 168, 174, 176, 180, 186, 192, 198, 204, 208, 210, 216, 220, 222, 224, 228, 234, 240, 246, 252, 258, 260, 264, 270, 272
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 22 2003

Keywords

Comments

The 229026 Zumkeller numbers less than 10^6 have a maximum difference of 12. This leads to the conjecture that any 12 consecutive numbers include at least one Zumkeller number. There are 1989 odd Zumkeller numbers less than 10^6; they are exactly the odd abundant numbers that have even abundance, A174865. - T. D. Noe, Mar 31 2010
For k >= 0, numbers of the form 18k + 6 and 18k + 12 are terms (see Remark 2.3. in Somu et al., 2023). Corollary: The maximum difference between any two consecutive terms is at most 12. - Ivan N. Ianakiev, Jan 02 2024
All 205283 odd abundant numbers less than 10^8 that have even abundance (see A174865) are Zumkeller numbers. - T. D. Noe, Nov 14 2010
Except for 1 and 2, all primorials (A002110) are Zumkeller numbers (follows from Fact 6 in the Rao/Peng paper). - Ivan N. Ianakiev, Mar 23 2016
Supersequence of A111592 (follows from Fact 3 in the Rao/Peng paper). - Ivan N. Ianakiev, Mar 20 2017
Conjecture: Any 4 consecutive terms include at least one number k such that sigma(k)/2 is also a Zumkeller number (verified for the first 10^5 Zumkeller numbers). - Ivan N. Ianakiev, Apr 03 2017
LeVan studied these numbers using the equivalent definition of numbers n such that n = Sum_{d|n, dA180332) "minimal integer-perfect numbers". - Amiram Eldar, Dec 20 2018
The numbers 3 * 2^k for k > 0 are all Zumkeller numbers: half of one such partition is {3*2^k, 3*2^(k-2), ...}, replacing 3 with 2 if it appears. With this and the lemma that the product of a Zumkeller number and a number coprime to it is again a Zumkeller number (see A179527), we have that all numbers divisible by 6 but not 9 (or numbers congruent to 6 or 12 modulo 18) are Zumkeller numbers, proving that the difference between consecutive Zumkeller numbers is at most 12. - Charlie Neder, Jan 15 2019
Improvements on the previous comment: 1) For every integer q > 0, every odd integer r > 0 and every integer s > 0 relatively prime to 6, the integer 2^q*3^r*s is a Zumkeller number, and therefore 2) there exist Zumkeller numbers divisible by 9 (such as 54, 90, 108, 126, etc.). - Ivan N. Ianakiev, Jan 16 2020
Conjecture: If d > 1, d|k and tau(d)*sigma(d) = k, then k is a Zumkeller number (cf. A331668). - Ivan N. Ianakiev, Apr 24 2020
This sequence contains A378541, the intersection of the practical numbers (A005153) with numbers with even sum of divisors (A028983). - David A. Corneth, Nov 03 2024
Sequence gives the positions of even terms in A119347, and correspondingly, of odd terms in A308605. - Antti Karttunen, Nov 29 2024
If s = sigma(m) is odd and p > s then m*p is not in the sequence. - David A. Corneth, Dec 07 2024

Examples

			Given n = 48, we can partition the divisors thus: 1 + 3 + 4 + 6 + 8 + 16 + 24 = 2 + 12 + 48, therefore 48 is a term (A083206(48) = 5).
From _David A. Corneth_, Dec 04 2024: (Start)
30 is in the sequence. sigma(30) = 72. So we look for distinct divisors of 30 that sum to 72/2 = 36. That set or its complement contains 30. The other divisors in that set containing 30 sum to 36 - 30 = 6. So we look for some distinct proper divisors of 30 that sum to 6. That is from the divisors of {1, 2, 3, 5, 6, 10, 15}. It turns out that both 1+2+3 and 6 satisfy this condition. So 36 is in the sequence.
25 is not in the sequence as sigma(25) = 31 which is odd so the sum of two equal integers cannot be the sum of divisors of 25.
33 is not in the sequence as sigma(33) = 48 < 2*33. So is impossible to have a partition of the set of divisors into two disjoint set the sum of each of them sums to 48/2 = 24 as one of them contains 33 > 24 and any other divisors are nonnegative. (End)
		

References

  • Marijo O. LeVan, Integer-perfect numbers, Journal of Natural Sciences and Mathematics, Vol. 27, No. 2 (1987), pp. 33-50.
  • Marijo O. LeVan, On the order of nu(n), Journal of Natural Sciences and Mathematics, Vol. 28, No. 1 (1988), pp. 165-173.
  • J. Sandor and B. Crstici, Handbook of Number Theory, II, Springer Verlag, 2004, chapter 1.10, pp. 53-54.

Crossrefs

Positions of nonzero terms in A083206, positions of 0's in A103977 and in A378600.
Positions of even terms in A119347, of odd terms in A308605.
Complement of A083210.
Subsequence of A023196 and of A028983.
Union of A353061 and A378541.
Conjectured subsequences: A007691, A331668 (after their initial 1's), A351548 (apart from 0-terms).
Cf. A174865 (Odd abundant numbers whose abundance is even).
Cf. A204830, A204831 (equal sums of 3 or 4 disjoint subsets).
Cf. A000203, A005101, A005153 (practical numbers), A005835, A027750, A048055, A083206, A083208, A083211, A171641, A175592, A179527 (characteristic function), A221054.

Programs

  • Haskell
    a083207 n = a083207_list !! (n-1)
    a083207_list = filter (z 0 0 . a027750_row) $ [1..] where
       z u v []     = u == v
       z u v (p:ps) = z (u + p) v ps || z u (v + p) ps
    -- Reinhard Zumkeller, Apr 18 2013
    
  • Maple
    with(numtheory): with(combstruct):
    is_A083207 := proc(n) local S, R, Found, Comb, a, s; s := sigma(n);
    if not(modp(s, 2) = 0 and n * 2 <= s) then return false fi;
    S := s / 2 - n; R := select(m -> m <= S, divisors(n)); Found := false;
    Comb := iterstructs(Combination(R)):
    while not finished(Comb) and not Found do
       Found := add(a, a = nextstruct(Comb)) = S
    od; Found end:
    A083207_list := upto -> select(is_A083207, [$1..upto]):
    A083207_list(272); # Peter Luschny, Dec 14 2009, updated Aug 15 2014
  • Mathematica
    ZumkellerQ[n_] := Module[{d=Divisors[n], t, ds, x}, ds = Plus@@d; If[Mod[ds, 2] > 0, False, t = CoefficientList[Product[1 + x^i, {i, d}], x]; t[[1 + ds/2]] > 0]]; Select[Range[1000], ZumkellerQ] (* T. D. Noe, Mar 31 2010 *)
    znQ[n_]:=Length[Select[{#,Complement[Divisors[n],#]}&/@Most[Rest[ Subsets[ Divisors[ n]]]],Total[#[[1]]]==Total[#[[2]]]&]]>0; Select[Range[300],znQ] (* Harvey P. Dale, Dec 26 2022 *)
  • PARI
    part(n,v)=if(n<1, return(n==0)); forstep(i=#v,2,-1,if(part(n-v[i],v[1..i-1]), return(1))); n==v[1]
    is(n)=my(d=divisors(n),s=sum(i=1,#d,d[i])); s%2==0 && part(s/2-n,d[1..#d-1]) \\ Charles R Greathouse IV, Mar 09 2014
    
  • PARI
    \\ See Corneth link
    
  • Python
    from sympy import divisors
    from sympy.combinatorics.subsets import Subset
    for n in range(1,10**3):
        d = divisors(n)
        s = sum(d)
        if not s % 2 and max(d) <= s/2:
            for x in range(1,2**len(d)):
                if sum(Subset.unrank_binary(x,d).subset) == s/2:
                    print(n,end=', ')
                    break
    # Chai Wah Wu, Aug 13 2014
    
  • Python
    from sympy import divisors
    import numpy as np
    A083207 = []
    for n in range(2,10**3):
        d = divisors(n)
        s = sum(d)
        if not s % 2 and 2*n <= s:
            d.remove(n)
            s2, ld = int(s/2-n), len(d)
            z = np.zeros((ld+1,s2+1),dtype=int)
            for i in range(1,ld+1):
                y = min(d[i-1],s2+1)
                z[i,range(y)] = z[i-1,range(y)]
                z[i,range(y,s2+1)] = np.maximum(z[i-1,range(y,s2+1)],z[i-1,range(0,s2+1-y)]+y)
                if z[i,s2] == s2:
                    A083207.append(n)
                    break
    # Chai Wah Wu, Aug 19 2014
    
  • Sage
    def is_Zumkeller(n):
        s = sigma(n)
        if not (2.divides(s) and n*2 <= s): return False
        S = s // 2 - n
        R = (m for m in divisors(n) if m <= S)
        return any(sum(c) == S for c in Combinations(R))
    A083207_list = lambda lim: [n for n in (1..lim) if is_Zumkeller(n)]
    print(A083207_list(272)) # Peter Luschny, Sep 03 2018

Formula

A083206(a(n)) > 0.
A083208(n) = A083206(a(n)).
A179529(a(n)) = 1. - Reinhard Zumkeller, Jul 19 2010

Extensions

Name improved by T. D. Noe, Mar 31 2010
Name "Zumkeller numbers" added by N. J. A. Sloane, Jul 08 2010

A103977 Zumkeller deficiency of n: Let d_1 ... d_k be the divisors of n. Then a(n) = min_{ e_1 = +-1, ... e_k = +-1 } | Sum_i e_i d_i |.

Original entry on oeis.org

1, 1, 2, 1, 4, 0, 6, 1, 5, 2, 10, 0, 12, 4, 6, 1, 16, 1, 18, 0, 10, 8, 22, 0, 19, 10, 14, 0, 28, 0, 30, 1, 18, 14, 22, 1, 36, 16, 22, 0, 40, 0, 42, 4, 12, 20, 46, 0, 41, 7, 30, 6, 52, 0, 38, 0, 34, 26, 58, 0, 60, 28, 22, 1, 46, 0, 66, 10, 42, 0, 70, 1, 72, 34, 26, 12, 58, 0, 78, 0
Offset: 1

Views

Author

Yasutoshi Kohmoto, Jan 01 2007

Keywords

Comments

Like the ordinary deficiency (A033879) obtains 0's only at perfect numbers (A000396), the Zumkeller deficiency obtains 0's only at integer-perfect numbers, A083207. See the formula section. Unlike the ordinary deficiency, this obtains only nonnegative values. See A378600 for another version. - Antti Karttunen, Dec 03 2024

Examples

			a(6) = 1 + 2 + 3 - 6 = 0.
		

Crossrefs

Cf. A125732, A125733, A005835, A023196, A033879, A083206, A083207 (positions of 0's), A263837, A378643 (Dirichlet inverse), A378644 (Möbius transform), A378645, A378646, A378647 (an analog of A000027), A378648 (an analog of sigma), A378649 (an analog of Euler phi), A379503 (positions of 1's), A379504, A379505.
Cf. A378600 (signed variant).
Cf. also A058377, A119347.

Programs

  • Maple
    A103977 := proc(n) local divs,a,acandid,filt,i,p,sigs ; divs := convert(numtheory[divisors](n),list) ; a := add(i,i=divs) ; for sigs from 0 to 2^nops(divs)-1 do filt := convert(sigs,base,2) ; while nops(filt) < nops(divs) do filt := [op(filt), 0] ; od ; acandid := 0 ; for p from 0 to nops(divs)-1 do if op(p+1,filt) = 0 then acandid := acandid-op(p+1,divs) ; else acandid := acandid+op(p+1,divs) ; fi ; od: acandid := abs(acandid) ; if acandid < a then a := acandid ; fi ; od: RETURN(a) ; end: seq(A103977(n),n=1..80) ; # R. J. Mathar, Nov 27 2007
    # second Maple program:
    a:= proc(n) option remember; local l, b; l, b:= [numtheory[divisors](n)[]],
          proc(s, i) option remember; `if`(i<1, s,
            min(b(s+l[i], i-1), b(abs(s-l[i]), i-1)))
          end: b(0, nops(l))
        end:
    seq(a(n), n=1..80);  # Alois P. Heinz, Dec 05 2024
  • Mathematica
    a[n_] := Module[{d = Divisors[n], c, p, m}, c = CoefficientList[Product[1 + x^i, {i, d}], x]; p = -1 + Position[c, ?(# > 0 &)] // Flatten; m = Length[p]; If[OddQ[m], If[(d = p[[(m + 1)/2]] - p[[(m - 1)/2]]) == 1, 0, d], p[[m/2 + 1]] - p[[m/2]]]]; Array[a, 100] (* _Amiram Eldar, Dec 11 2019 *)
  • PARI
    nonzerocoefpositions(p) = { my(v=Vec(p), lista=List([])); for(i=1,#v,if(v[i], listput(lista,i))); Vec(lista); }; \\ Doesn't need to be 0-based, as we use their differences only.
    A103977(n) = { my(p=1); fordiv(n, d, p *= (1 + 'x^d)); my(plist=nonzerocoefpositions(p), m = #plist, d); if(!(m%2), plist[1+(m/2)]-plist[m/2], d = plist[(m+1)/2]-plist[(m-1)/2]; if(1==d,0,d)); }; \\ Antti Karttunen, Dec 03 2024, after Mathematica-program by Amiram Eldar

Formula

If n=p (prime), then a(n)=p-1. If n=2^m, then a(n)=1. [Corrected by R. J. Mathar, Nov 27 2007]
a(n) = 0 iff n is a Zumkeller number (A083207). - Amiram Eldar, Jan 05 2020
From Antti Karttunen, Dec 03 2024: (Start)
a(n) = A033879(n) iff n is a non-abundant number (A263837).
a(n) = abs(A378600(n)).
a(n) = 2*A378647(n) - A378648(n). [Analogously to A033879(n) = 2*n - sigma(n)]
a(n) = 0 <=> A083206(n) > 0.
(End)
a(p^e) = p^e - (1+p+...+p^(e-1)) = (p^e*(p-2) + 1)/(p-1) for prime p. - Jianing Song, Dec 05 2024
a(n) = 1 <=> A379504(n) > 0. - Antti Karttunen, Jan 07 2025

Extensions

More terms from R. J. Mathar, Nov 27 2007
Name "Zumkeller deficiency" coined by Antti Karttunen, Dec 03 2024

A100587 Number of nonempty subsets of divisors of n.

Original entry on oeis.org

1, 3, 3, 7, 3, 15, 3, 15, 7, 15, 3, 63, 3, 15, 15, 31, 3, 63, 3, 63, 15, 15, 3, 255, 7, 15, 15, 63, 3, 255, 3, 63, 15, 15, 15, 511, 3, 15, 15, 255, 3, 255, 3, 63, 63, 15, 3, 1023, 7, 63, 15, 63, 3, 255, 15, 255, 15, 15, 3, 4095, 3, 15, 63, 127, 15, 255, 3, 63, 15, 255, 3, 4095, 3
Offset: 1

Views

Author

Labos Elemer, Dec 01 2004

Keywords

Comments

A119347(n) <= a(n). - Reinhard Zumkeller, Jun 27 2015

Examples

			For all prime numbers p, a(p)=3, since those subsets are {{1,p},{1},{p}}.
		

Crossrefs

Programs

Formula

a(n) = -1 + 2^tau(n), where tau(n) = DivisorSigma(0, n) = A000005(n).

A030057 Least number that is not a sum of distinct divisors of n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

a(n) = 2 if and only if n is odd. a(2^n) = 2^(n+1). - Emeric Deutsch, Aug 07 2005
a(n) > n if and only if n belongs to A005153, and then a(n) = sigma(n) + 1. - Michel Marcus, Oct 18 2013
The most frequent values are 2 (50%), 4 (16.7%), 8 (5.7%), 13 (3.2%), 16 (2.4%), 29 (1.3%), 32 (1%), 40, 43, 61, ... - M. F. Hasler, Apr 06 2014
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

Examples

			a(10)=4 because 4 is the least positive integer that is not a sum of distinct divisors (namely 1,2,5 and 10) of 10.
		

Crossrefs

Distinct elements form A030058.
Cf. A027750.

Programs

  • Haskell
    a030057 n = head $ filter ((== 0) . p (a027750_row n)) [1..] where
       p _      0 = 1
       p []     _ = 0
       p (k:ks) x = if x < k then 0 else p ks (x - k) + p ks x
    -- Reinhard Zumkeller, Feb 27 2012
    
  • Maple
    with(combinat): with(numtheory): for n from 1 to 100 do div:=powerset(divisors(n)): b[n]:=sort({seq(sum(div[i][j],j=1..nops(div[i])),i=1..nops(div))}) od: for n from 1 to 100 do B[n]:={seq(k,k=0..1+sigma(n))} minus b[n] od: seq(B[n][1],n=1..100); # Emeric Deutsch, Aug 07 2005
  • Mathematica
    a[n_] :=  First[ Complement[ Range[ DivisorSigma[1, n] + 1], Total /@ Subsets[ Divisors[n]]]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jan 02 2012 *)
  • Python
    from sympy import divisors
    def A030057(n):
        c = {0}
        for d in divisors(n,generator=True):
            c |=  {a+d for a in c}
        k = 1
        while k in c:
            k += 1
        return k # Chai Wah Wu, Jul 05 2023

Extensions

Edited by N. J. A. Sloane, May 05 2007

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

Original entry on oeis.org

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

Views

Author

Emeric Deutsch, May 15 2006

Keywords

Comments

Row n contains A119347(n) terms. In row n the first term is 1 and the last term is sigma(n) (=sum of the divisors of n =A000203(n)). If row n contains all numbers from 1 to sigma(n), then n is called a practical number (A005153).

Examples

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

Crossrefs

Programs

  • Maple
    with(numtheory): with(linalg): sums:=proc(n) local dl,t: dl:=convert(divisors(n),list): t:=tau(n): {seq(innerprod(dl,convert(2^t+i,base,2)[1..t]),i=1..2^t-1)} end: for n from 1 to 12 do sums(n) od; # yields sequence in triangular form
  • Mathematica
    row[n_] := Union[Total /@ Subsets[Divisors[n]]] // Rest;
    Table[row[n], {n, 1, 12}] // Flatten (* Jean-François Alcover, Aug 06 2024 *)

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

Original entry on oeis.org

1, 6, 8, 28, 12, 78, 16, 120, 52, 144, 24, 406, 28, 192, 192, 496, 36, 780, 40, 903, 256, 288, 48, 1830, 124, 336, 320, 1596, 60, 2628, 64, 2016, 384, 432, 384, 4186, 76, 480, 448, 4095, 84, 4656, 88, 2688, 2184, 576, 96, 7750, 228, 2976, 576, 3136, 108, 7260
Offset: 1

Views

Author

Jaroslav Krizek, Mar 02 2014

Keywords

Examples

			For n = 5, a(5) = 1 + 5 + 6 = 12 (each of the numbers 1, 5 and 6 is the sum of a subset of distinct divisors of 5).
The numbers n = 14 and 15 is an interesting pair of consecutive numbers with identical value of sigma(n) such that simultaneously a(14) = a(15) and A237289(14) = A237289(15).
a(14) = 1+2+3+7+8+9+10+14+15+16+17+21+22+23+24 = a(15) = 1+3+4+5+6+8+9+15+16+18+19+20+21+23+24 = 192.
		

Crossrefs

Cf. A000203, A119348, A005153, A119347 (count of the same numbers), A184387, A229335, A237287, A237289.

Programs

  • Maple
    isSumDist := proc(n,k)
        local dvs,s ;
        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:
    A237290 := proc(n)
        local a;
        a := 0 ;
        for k from 1 to numtheory[sigma](n) do
            if isSumDist(n,k) then
                a := a+k;
            end if;
        end do:
    end proc:
    seq(A237290(n),n=1..20) ; # R. J. Mathar, Mar 13 2014
  • Mathematica
    a[n_] := Plus @@ Union[Plus @@@ Subsets@ Divisors@ n]; Array[a, 54] (* Giovanni Resta, Mar 13 2014 *)
  • PARI
    padbin(n, len) = {b = binary(n); while(length(b) < len, b = concat(0, b);); b;}
    a(n) = {vks = []; d = divisors(n); nbd = #d; for (i=1, 2^nbd-1, b = padbin(i, nbd); onek = sum(j=1, nbd, d[j]*b[j]); vks = Set(concat(vks, onek));); sum(i=1, #vks, vks[i]);} \\ Michel Marcus, Mar 09 2014
    
  • PARI
    A237290(n) = { my(c=[0]); fordiv(n,d, c = Set(concat(c,vector(#c,i,c[i]+d)))); vecsum(c); }; \\ after Chai Wah Wu's Python-code, Antti Karttunen, Nov 29 2024
    
  • Python
    from sympy import divisors
    def A237290(n):
        ds = divisors(n)
        c, s = {0}, sum(ds)
        for d in ds:
            c |=  {a+d for a in c}
        return sum(a for a in c if 1<=a<=s) # Chai Wah Wu, Jul 05 2023

Formula

a(n) = A184387(n) - A237289(n).
a(p) = 2(p+2) for odd primes p.
a(n) = A184387(n) for practical numbers n (A005153), a(n) < A184387(n) for numbers n that are not practical (A237287).
a(n) = A000203(n) * (A119347(n)+1) / 2. [Found by Sequence Machine and easily seen to be true. Compare for example to the formulas of A229335.] - Antti Karttunen, Nov 29 2024

A193279 Number of distinct sums of distinct proper divisors of n.

Original entry on oeis.org

0, 1, 1, 3, 1, 6, 1, 7, 3, 7, 1, 16, 1, 7, 7, 15, 1, 21, 1, 22, 7, 7, 1, 36, 3, 7, 7, 28, 1, 42, 1, 31, 7, 7, 7, 55, 1, 7, 7, 50, 1, 54, 1, 31, 27, 7, 1, 76, 3, 31, 7, 31, 1, 66, 7, 64, 7, 7, 1, 108, 1, 7, 29, 63, 7, 78, 1, 31, 7, 72, 1, 123, 1, 7, 31, 31
Offset: 1

Views

Author

Michael Engling, Jul 20 2011

Keywords

Comments

a(n)=1 if and only if n is prime.
a(n)=n-1 if n is a power of 2.
a(n)=n if n is an even perfect number (is the converse true?)
Note: the count excludes an empty subset of proper divisors that would give 0 as a sum. - Antti Karttunen, Mar 07 2018

Crossrefs

Cf. A193280.
Cf. A119347 (allows also n to be included in the sums), A378447 (differences).

Programs

  • Maple
    with(linalg): a:=proc(n) local dl,t: dl:=convert(numtheory[divisors](n) minus {n}, list): t:=nops(dl): return nops({seq(innerprod(dl, convert(2^t+i, base, 2)[1..t]), i=1..2^t-1)}): end: seq(a(n), n=1..76); # Nathaniel Johnston, Jul 23 2011
  • Mathematica
    a[n_] := Module[{d = Most @ Divisors[n], x}, Count[CoefficientList[Product[1 + x^i, {i, d}], x], ?(# > 0 &)] - 1]; Array[a, 100] (* _Amiram Eldar, Jun 13 2020 *)
  • PARI
    \\ Slow and naive:
    A193279(n) = if(1==n,0,my(pds = (divisors(n)[1..(numdiv(n)-1)]), maxsum = vecsum(pds), sums = vector(maxsum), psetsiz = (2^length(pds))-1, k = 0, s); for(i=1,psetsiz,s = vecsum(choosebybits(pds,i)); if(!sums[s],k++;sums[s]++)); (k)); \\ Antti Karttunen, Mar 07 2018
    
  • PARI
    A193279(n) = { my(p=1); fordiv(n, d, if(dAntti Karttunen, Nov 29 2024
    
  • PARI
    A193279(n) = { my(c=[0]); fordiv(n,d, if(dA119347) - Antti Karttunen, Nov 29 2024
Showing 1-10 of 24 results. Next