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

A102627 Number of partitions of n into distinct parts in which the number of parts divides n.

Original entry on oeis.org

1, 1, 1, 2, 1, 4, 1, 4, 4, 5, 1, 15, 1, 7, 14, 17, 1, 28, 1, 40, 28, 11, 1, 99, 31, 13, 49, 99, 1, 186, 1, 152, 76, 17, 208, 425, 1, 19, 109, 699, 1, 584, 1, 433, 823, 23, 1, 1625, 437, 1140, 193, 746, 1, 2003, 1748, 2749, 244, 29, 1, 7404, 1, 31, 4158, 3258, 3766, 6307, 1
Offset: 1

Views

Author

Vladeta Jovovic, Feb 01 2005

Keywords

Examples

			From _Gus Wiseman_, Sep 24 2019: (Start)
The a(1) = 1 through a(12) = 15 strict integer partitions whose average is an integer (A = 10, B = 11, C = 12):
  (1)  (2)  (3)  (4)   (5)  (6)    (7)  (8)   (9)    (A)   (B)  (C)
                 (31)       (42)        (53)  (432)  (64)       (75)
                            (51)        (62)  (531)  (73)       (84)
                            (321)       (71)  (621)  (82)       (93)
                                                     (91)       (A2)
                                                                (B1)
                                                                (543)
                                                                (642)
                                                                (651)
                                                                (732)
                                                                (741)
                                                                (831)
                                                                (921)
                                                                (5421)
                                                                (6321)
(End)
		

Crossrefs

The BI-numbers of these partitions are given by A326669 (numbers whose binary indices have integer mean).
The non-strict case is A067538.
Strict partitions with integer geometric mean are A326625.
Strict partitions whose maximum divides their sum are A326850.

Programs

  • Maple
    a:= proc(m) option remember; local b; b:=
          proc(n, i, t) option remember; `if`(i*(i+1)/2Alois P. Heinz, Sep 25 2019
  • Mathematica
    npdp[n_]:=Count[Select[IntegerPartitions[n],Length[#]==Length[ Union[ #]]&], ?(Divisible[n,Length[#]]&)]; Array[npdp,70] (* _Harvey P. Dale, Feb 12 2016 *)
    a[m_] := a[m] = Module[{b}, b[n_, i_, t_] := b[n, i, t] = If[i(i+1)/2 < n, 0, If[n == 0, If[Mod[m, t] == 0, 1, 0], b[n, i - 1, t] + b[n - i, Min[n - i, i - 1], t + 1]]]; If[PrimeQ[m], 1, b[m, m, 0]]];
    Array[a, 100] (* Jean-François Alcover, May 21 2021, after Alois P. Heinz *)

A005835 Pseudoperfect (or semiperfect) numbers n: some subset of the proper divisors of n sums to n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

In other words, some subset of the numbers { 1 <= d < n : d divides n } adds up to n. - N. J. A. Sloane, Apr 06 2008
Also, numbers n such that A033630(n) > 1. - Reinhard Zumkeller, Mar 02 2007
Deficient numbers cannot be pseudoperfect. This sequence includes the perfect numbers (A000396). By definition, it does not include the weird, i.e., abundant but not pseudoperfect, numbers (A006037).
From Daniel Forgues, Feb 07 2011: (Start)
The first odd pseudoperfect number is a(233) = 945.
An empirical observation (from the graph) is that it seems that the n-th pseudoperfect number would be asymptotic to 4n, or equivalently that the asymptotic density of pseudoperfect numbers would be 1/4. Any proof of this? (End)
A065205(a(n)) > 0; A210455(a(n)) = 1. - Reinhard Zumkeller, Jan 21 2013
Deléglise (1998) shows that abundant numbers have asymptotic density < 0.2480, resolving the question which he attributes to Henri Cohen of whether the abundant numbers have density greater or less than 1/4. The density of pseudoperfect numbers is the difference between the densities of abundant numbers (A005101) and weird numbers (A006037), since the remaining integers are perfect numbers (A000396), which have density 0. Using the first 22 primitive pseudoperfect numbers (A006036) and the fact that every multiple of a pseudoperfect number is pseudoperfect it can be shown that the density of pseudoperfect numbers is > 0.23790. - Jaycob Coleman, Oct 26 2013
The odd terms of this sequence are given by the odd abundant numbers A005231, up to hypothetical (so far unknown) odd weird numbers (A006037). - M. F. Hasler, Nov 23 2017
The term "pseudoperfect numbers" was coined by Sierpiński (1965). The alternative term "semiperfect numbers" was coined by Zachariou and Zachariou (1972). - Amiram Eldar, Dec 04 2020

Examples

			6 = 1+2+3, 12 = 1+2+3+6, 18 = 3+6+9, etc.
70 is not a member since the proper divisors of 70 are {1, 2, 5, 7, 10, 14, 35} and no subset adds to 70.
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd edition, Springer, 2004, Section B2, pp. 74-75.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 144.

Crossrefs

Subsequence of A023196; complement of A136447.
See A136446 for another version.
Cf. A109761 (subsequence).

Programs

  • Haskell
    a005835 n = a005835_list !! (n-1)
    a005835_list = filter ((== 1) . a210455) [1..]
    -- Reinhard Zumkeller, Jan 21 2013
  • Maple
    with(combinat):
    isA005835 := proc(n)
        local b, S;
        b:=false;
        S:=subsets(numtheory[divisors](n) minus {n});
        while not S[finished] do
            if convert(S[nextvalue](), `+`)=n then
                b:=true;
                break
            end if ;
        end do;
        b
    end proc:
    for n from 1 do
        if isA005835(n) then
            print(n);
        end if;
    end do: # Walter Kehowski, Aug 12 2005
  • Mathematica
    A005835 = Flatten[ Position[ A033630, q_/; q>1 ] ] (* Wouter Meeussen *)
    pseudoPerfectQ[n_] := Module[{divs = Most[Divisors[n]]}, MemberQ[Total/@Subsets[ divs, Length[ divs]], n]]; A005835 = Select[Range[300],pseudoPerfectQ] (* Harvey P. Dale, Sep 19 2011 *)
    A005835 = {}; n = 0; While[Length[A005835] < 100, n++; d = Most[Divisors[n]]; c = SeriesCoefficient[Series[Product[1 + x^d[[i]], {i, Length[d]}], {x, 0, n}], n]; If[c > 0, AppendTo[A005835, n]]]; A005835 (* T. D. Noe, Dec 29 2011 *)
  • PARI
    is_A005835(n, d=divisors(n)[^-1], s=vecsum(d), m=#d)={ m||return; while(d[m]>n, s-=d[m]; m--||return); d[m]==n || if(nA005835(n-d[m], d, s-d[m], m-1) || is_A005835(n, d, s-d[m], m-1), n==s)} \\ Returns nonzero iff n is the sum of a subset of d, which defaults to the set of proper divisors of n. Improved using more recent PARI syntax by M. F. Hasler, Jul 15 2016, Jul 27 2016. NOTE: This function is also used (with 2nd optional arg) in A136446, A122036 and possibly in A006037. - M. F. Hasler, Jul 28 2016
    for(n=1,1000,is_A005835(n)&&print1(n",")) \\ M. F. Hasler, Apr 06 2008
    

Extensions

Better description and more terms from Jud McCranie, Oct 15 1997

A083710 Number of integer partitions of n with a part dividing all the other parts.

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 11, 12, 20, 25, 37, 43, 70, 78, 114, 143, 196, 232, 330, 386, 530, 641, 836, 1003, 1340, 1581, 2037, 2461, 3127, 3719, 4746, 5605, 7038, 8394, 10376, 12327, 15272, 17978, 22024, 26095, 31730, 37339, 45333, 53175, 64100, 75340, 90138
Offset: 0

Views

Author

N. J. A. Sloane, Jun 16 2003

Keywords

Comments

Since the summand (part) which divides all the other summands is necessarily the smallest, an equivalent definition is: "Number of partitions of n such that smallest part divides every part." - Joerg Arndt, Jun 08 2009
The first few partitions that fail the criterion are 5=3+2, 7=5+2=4+3=3+2+2. So a(5) = A000041(5) - 1 = 6, a(7) = A000041(7) - 3 = 12. - Vladeta Jovovic, Jun 17 2003
Starting with offset 1 = inverse Mobius transform (A051731) of the partition numbers, A000041. - Gary W. Adamson, Jun 08 2009

Examples

			From _Gus Wiseman_, Apr 18 2021: (Start)
The a(1) = 1 through a(7) = 12 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)
       (11)  (21)   (22)    (41)     (33)      (61)
             (111)  (31)    (221)    (42)      (331)
                    (211)   (311)    (51)      (421)
                    (1111)  (2111)   (222)     (511)
                            (11111)  (321)     (2221)
                                     (411)     (3211)
                                     (2211)    (4111)
                                     (3111)    (22111)
                                     (21111)   (31111)
                                     (111111)  (211111)
                                               (1111111)
(End)
		

References

  • L. M. Chawla, M. O. Levan and J. E. Maxfield, On a restricted partition function and its tables, J. Natur. Sci. and Math., 12 (1972), 95-101.

Crossrefs

Cf. A000041, A051731. - Gary W. Adamson, Jun 08 2009
The case with no 1's is A083711.
The strict case is A097986.
The version for "divisible by" instead of "dividing" is A130689.
The case where there is also a part divisible by all the others is A130714.
The complement of these partitions is counted by A338470.
The Heinz numbers of these partitions are dense, complement of A342193.
The case where there is also no part divisible by all the others is A343345.
A000005 counts divisors.
A000070 counts partitions with a selected part.
A006128 counts partitions with a selected position.
A015723 counts strict partitions with a selected part.
A018818 counts partitions into divisors (strict: A033630).
A167865 counts strict chains of divisors > 1 summing to n.

Programs

  • Maple
    with(combinat): with(numtheory): a := proc(n) c := 0: l := sort(convert(divisors(n), list)): for i from 1 to nops(l)-0 do c := c+numbpart(l[i]-1) od: RETURN(c): end: for j from 0 to 60 do printf(`%d, `, a(j)) od: # Zerinvary Lajos, Apr 14 2007
  • Mathematica
    Table[Length[Select[IntegerPartitions[n],And@@IntegerQ/@(#/Min@@#)&]],{n,0,30}] (* Gus Wiseman, Apr 18 2021 *)

Formula

Equals left border of triangle A137587 starting (1, 2, 3, 5, 6, 11, ...). - Gary W. Adamson, Jan 27 2008
G.f.: 1 + Sum_{n>=1} x^n/eta(x^n). The g.f. for partitions into parts that are a multiple of n is x^n/eta(x^n), now sum over n. - Joerg Arndt, Jun 08 2009
Gary W. Adamson's comment is equivalent to the formula a(n) = Sum_{d|n} p(d-1) where p(i) = number of partitions of i (A000041(i)). Hence A083710 has g.f. Sum_{d>=1} p(d-1)*x^d/(1-x^d), - N. J. A. Sloane, Jun 08 2009

Extensions

More terms from Vladeta Jovovic, Jun 17 2003
Name shortened by Gus Wiseman, Apr 18 2021

A083206 a(n) is the number of ways of partitioning the divisors of n into two disjoint sets with equal sum.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 17, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 3, 0, 0, 0, 14, 0, 0, 0, 1, 0, 13, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 2, 0, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 22 2003

Keywords

Comments

a(n)=0 for deficient numbers n (A005100), but the converse is not true, as 18 is abundant (A005101) and a(18)=0, see A083211;
a(n)=1 for perfect numbers n (A000396), see A083209 for all numbers with a(n)=1;
records: A083213(k)=a(A083212(k)).
In order that a(n)>0, the sum of divisors of n must be even by definition: a(n) = half the number of partitions of A000203(n)/2 into divisors of n, see formula. [Reinhard Zumkeller, Jul 10 2010]

Examples

			a(24)=3: 1+2+3+4+8+12=6+24, 1+3+6+8+12=2+4+24, 4+6+8+12=1+2+3+24.
		

Crossrefs

Cf. A083208 [= a(A083207(n))], A083211, A000005, A000203, A082729, A378446 (inverse Möbius transform), A378449.
Cf. A083207 (positions of terms > 0), A083210 (positions of 0's), A083209 (positions of 1's), A378652 (of 2's).

Programs

  • Mathematica
    a[n_] := (s = DivisorSigma[1, n]; If[Mod[s, 2] == 1, 0, f[n, s/2, 2]]); f[n_, m_, k_] := f[n, m, k] = If[k <= m, f[n, m, k+1] + f[n, m-k, k+1]*Boole[Mod[n, k] == 0], Boole[m == 0]]; Array[a, 105] (* Jean-François Alcover, Jul 29 2015, after Reinhard Zumkeller *)
  • PARI
    A083206(n) = { my(s=sigma(n),p=1); if(s%2 || s < 2*n, 0, fordiv(n, d, p *= ('x^d + 'x^-d)); (polcoeff(p, 0)/2)); }; \\ Antti Karttunen, Dec 02 2024, after Ilya Gutkovskiy

Formula

a(n) = if sigma(n) mod 2 = 1 then 0 else f(n,sigma(n)/2,2), where sigma=A000203 and f(n,m,k) = if k<=m then f(n,m,k+1)+f(n,m-k,k+1)*0^(n mod k) else 0^m, cf. A033630, also using f. [Reinhard Zumkeller, Jul 10 2010]
a(n) is half the coefficient of x^0 in Product_{d|n} (x^d + 1/x^d). - Ilya Gutkovskiy, Feb 04 2024

A097986 Number of strict integer partitions of n with a part dividing all the other parts.

Original entry on oeis.org

1, 1, 2, 2, 2, 4, 3, 5, 5, 7, 6, 12, 9, 13, 15, 20, 18, 28, 26, 37, 39, 47, 49, 71, 68, 85, 94, 117, 120, 159, 160, 201, 216, 257, 277, 348, 357, 430, 470, 562, 592, 720, 758, 901, 981, 1134, 1220, 1457, 1542, 1798, 1952, 2250, 2419, 2819, 3023, 3482, 3773, 4291
Offset: 1

Views

Author

Vladeta Jovovic, Oct 23 2004

Keywords

Comments

If n > 0, we can assume such a part is the smallest. - Gus Wiseman, Apr 23 2021
Also the number of uniform (constant multiplicity) partitions of n containing 1, ranked by A367586. The strict case is A096765. The version without 1 is A329436. - Gus Wiseman, Dec 01 2023

Examples

			From _Gus Wiseman_, Dec 01 2023: (Start)
The a(1) = 1 through a(8) = 5 strict partitions with a part dividing all the other parts:
  (1)  (2)  (3)    (4)    (5)    (6)      (7)      (8)
            (2,1)  (3,1)  (4,1)  (4,2)    (6,1)    (6,2)
                                 (5,1)    (4,2,1)  (7,1)
                                 (3,2,1)           (4,3,1)
                                                   (5,2,1)
The a(1) = 1 through a(8) = 5 uniform partitions containing 1:
  (1)  (11)  (21)   (31)    (41)     (51)      (61)       (71)
             (111)  (1111)  (11111)  (321)     (421)      (431)
                                     (2211)    (1111111)  (521)
                                     (111111)             (3311)
                                                          (11111111)
(End)
		

Crossrefs

The non-strict version is A083710.
The case with no 1's is A098965.
The Heinz numbers of these partitions are A339563.
The strict complement is counted by A341450.
The version for "divisible by" instead of "dividing" is A343347.
The case where there is also a part divisible by all the others is A343378.
The case where there is no part divisible by all the others is A343381.
A000005 counts divisors.
A000009 counts strict partitions.
A000070 counts partitions with a selected part.
A006128 counts partitions with a selected position.
A015723 counts strict partitions with a selected part.
A018818 counts partitions into divisors (strict: A033630).
A167865 counts strict chains of divisors > 1 summing to n.

Programs

  • Mathematica
    Take[ CoefficientList[ Expand[ Sum[x^k*Product[1 + x^(k*i), {i, 2, 62}], {k, 62}]], x], {2, 60}] (* Robert G. Wilson v, Nov 01 2004 *)
    Table[Length[Select[IntegerPartitions[n], UnsameQ@@#&&Or@@Table[And@@IntegerQ/@(#/x), {x,#}]&]], {n,0,30}] (* Gus Wiseman, Apr 23 2021 *)
  • PARI
    A_x(N) = {my(x='x+O('x^N)); Vec(sum(k=1,N,x^k*prod(i=2,N-k, (1+x^(k*i)))))}
    A_x(50) \\ John Tyler Rascoe, Nov 19 2024

Formula

a(n) = Sum_{d|n} A025147(d-1).
G.f.: Sum_{k>=1} (x^k*Product_{i>=2} (1+x^(k*i))).
a(n) ~ exp(Pi*sqrt(n/3)) / (8*3^(1/4)*n^(3/4)). - Vaclav Kotesovec, Jul 06 2025

Extensions

More terms from Robert G. Wilson v, Nov 01 2004
Name shortened by Gus Wiseman, Apr 23 2021

A018412 Divisors of 360.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 40, 45, 60, 72, 90, 120, 180, 360
Offset: 1

Views

Author

Keywords

Comments

Comment from J. Lowell: Regular polygons with n sides in which internal angles have integral number of degrees (n >= 3).
360 is a highly composite number: A002182(13) = 360. - Reinhard Zumkeller, Jun 21 2010
There are 22209 ways to represent 360 as a sum of its distinct divisors (A033630). That's more than any smaller number, hence 360 is in A065218. - Alonso del Arte, Oct 09 2017

Crossrefs

Programs

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

A018266 Divisors of 60.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60
Offset: 1

Views

Author

Keywords

Comments

Sequence is finite with last term a(12) = 60; A000005(60) = 12. - Reinhard Zumkeller, Dec 08 2009.
60 is a highly composite number: A002182(9) = 60. - Reinhard Zumkeller, Jun 21 2010
There are 35 ways to partition 60 as a sum of its distinct divisors (see A033630). This is more than any smaller number (hence 60 is listed in A065218). - Alonso del Arte, Oct 12 2017

Crossrefs

Programs

Formula

a(n) = n + floor((n-1)/6)*(60/(13-n)-n). - Aaron J Grech, Aug 11 2024

A065205 Number of subsets of proper divisors of n that sum to n.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 5, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 0, 7, 0, 0, 0, 3, 0, 2, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 3, 0, 2, 0, 0, 0, 34, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 1, 0, 6, 0, 0, 0, 25, 0, 0, 0, 1, 0, 23, 0, 0, 0, 0, 0, 21, 0, 0, 0, 2
Offset: 1

Views

Author

Jonathan Ayres (jonathan.ayres(AT)btinternet.com), Oct 19 2001

Keywords

Comments

Deficient and weird numbers have a(n) = 0, perfect numbers and others (see A064771) have a(n) = 1.
Number of partitions of n into distinct proper divisors of n; a(A136447(n)) = 0; a(A005835(n)) > 0; a(A064771(n)) = 1. - Reinhard Zumkeller, Jan 21 2013

Examples

			a(20) = 1 because {1, 4, 5, 10} is the only subset of proper divisors of 20 that sum to 20.
a(24) = 5 because there are five different subsets we can use to sum up to 24: {1, 2, 3, 4, 6, 8}, {1, 2, 3, 6, 12}, {1, 3, 8, 12}, {2, 4, 6, 12}, {4, 8, 12}.
		

Crossrefs

Cf. A065218 for records.

Programs

  • Haskell
    a065205 n = p (a027751_row n) n where
       p _      0 = 1
       p []     _ = 0
       p (k:ks) m = if m < k then 0 else p ks (m - k) + p ks m
    -- Reinhard Zumkeller, Jan 21 2013
    
  • Mathematica
    a[n_] := (dd = Most[ Divisors[n] ]; cc = Array[c, Length[dd]]; Length[ {ToRules[ Reduce[ And @@ (0 <= # <= 1 &) /@ cc && dd . cc == n, cc, Integers]]}]); Table[ a[n], {n, 1, 100}] (* Jean-François Alcover, Feb 23 2012 *)
  • PARI
    a(n,s,d)={s || (s=sigma(n)-n) || return; d||d=vecextract(divisors(n),"^-1"); while(d[#d]>n, s-=d[#d]; d=d[1..-2]); s<=n && return(s==n); if( n>d[#d], a(n-d[#d],s-d[#d],d[1..-2]), 1)+a(n,s-d[#d],d[1..-2])} \\ M. F. Hasler, May 11 2015

Formula

a(n) = A033630(n) - 1.

Extensions

More terms and additional comments from Jud McCranie, Oct 21 2001

A200745 Number of partitions of n into distinct non-divisors of n.

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 0, 2, 1, 2, 2, 6, 1, 9, 5, 6, 5, 20, 4, 28, 7, 19, 24, 55, 6, 51, 45, 49, 27, 136, 16, 180, 50, 117, 143, 146, 28, 403, 242, 260, 68, 668, 91, 852, 246, 260, 649, 1370, 90, 1191, 493, 1110, 634, 2701, 386, 1635, 462, 2160, 2486, 5154, 167
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 22 2011

Keywords

Examples

			a(10) = #{7+3, 6+4} = 2;
a(11) = #{9+2, 8+3, 7+4, 6+5, 6+3+2, 5+4+2} = 6;
a(12) = #{7+5} = 1;
a(13) = #{11+2, 10+3, 9+4, 8+5, 8+3+2, 7+6, 7+4+2, 6+5+2, 6+4+3} = 9;
a(14) = #{11+3, 10+4, 9+5, 8+6, 6+5+3} = 5;
a(15) = #{13+2, 11+5, 9+6, 9+4+2, 8+7, 8+5+2} = 6.
		

Crossrefs

Programs

  • Haskell
    a200745 n = p [nd | nd <- [1..n], mod n nd /= 0] n where
       p _  0 = 1
       p [] _ = 0
       p (k:ks) m | m < k = 0 | otherwise = p ks (m - k) + p ks m
  • Maple
    a:= proc(n) option remember; local b, l;
          l:= sort([({$1..n} minus numtheory[divisors](n))[]]);
          b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
                 b(n, i-1) +`if`(l[i]>n, 0, b(n-l[i], i-1))))
              end: forget(b):
          b(n, nops(l))
        end:
    seq(a(n), n=0..80);  # Alois P. Heinz, Jan 18 2013
  • Mathematica
    a[0] = 1; a[n_] := a[n] = Module[{b, l}, l = Sort[Range[n] ~Complement~ Divisors[n]]; b[m_, i_] := b[m, i] = If[m == 0, 1, If[i < 1, 0, b[m, i - 1] + If[l[[i]] > m, 0, b[m - l[[i]], i - 1]]]]; b[n, Length[l]]];
    Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Feb 06 2017, after Alois P. Heinz *)
Previous Showing 11-20 of 83 results. Next