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

A067538 Number of partitions of n in which the number of parts divides n.

Original entry on oeis.org

1, 2, 2, 4, 2, 8, 2, 11, 9, 14, 2, 46, 2, 24, 51, 66, 2, 126, 2, 202, 144, 69, 2, 632, 194, 116, 381, 756, 2, 1707, 2, 1417, 956, 316, 2043, 5295, 2, 511, 2293, 9151, 2, 10278, 2, 8409, 14671, 1280, 2, 36901, 8035, 21524, 11614, 25639, 2, 53138, 39810, 85004
Offset: 1

Views

Author

Naohiro Nomoto, Jan 27 2002

Keywords

Comments

Also sum of p(n,d) over the divisors d of n, where p(n,m) is the count of partitions of n in exactly m parts. - Wouter Meeussen, Jun 07 2009
From Gus Wiseman, Sep 24 2019: (Start)
Also the number of integer partitions of n whose maximum part divides n. The Heinz numbers of these partitions are given by A326836. For example, the a(1) = 1 through a(8) = 11 partitions are:
(1) (2) (3) (4) (5) (6) (7) (8)
(11) (111) (22) (11111) (33) (1111111) (44)
(211) (222) (422)
(1111) (321) (431)
(2211) (2222)
(3111) (4211)
(21111) (22211)
(111111) (41111)
(221111)
(2111111)
(11111111)
(End)

Examples

			a(3)=2 because 3 is a prime; a(4)=4 because the five partitions of 4 are {4}, {3, 1}, {2, 2}, {2, 1, 1}, {1, 1, 1, 1}, and the number of parts in each of them divides 4 except for {2, 1, 1}.
From _Gus Wiseman_, Sep 24 2019: (Start)
The a(1) = 1 through a(8) = 11 partitions whose length divides their sum are the following. The Heinz numbers of these partitions are given by A316413.
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (111)  (22)    (11111)  (33)      (1111111)  (44)
                    (31)             (42)                 (53)
                    (1111)           (51)                 (62)
                                     (222)                (71)
                                     (321)                (2222)
                                     (411)                (3221)
                                     (111111)             (3311)
                                                          (4211)
                                                          (5111)
                                                          (11111111)
(End)
		

Crossrefs

The strict case is A102627.
Partitions with integer geometric mean are A067539.

Programs

  • Mathematica
    Do[p = IntegerPartitions[n]; l = Length[p]; c = 0; k = 1; While[k < l + 1, If[ IntegerQ[ n/Length[ p[[k]] ]], c++ ]; k++ ]; Print[c], {n, 1, 57}, All]
    p[n_,k_]:=p[n,k]=p[n-1,k-1]+p[n-k,k];p[n_,k_]:=0/;k>n;p[n_,n_]:=1;p[n_,0]:=0
    Table[Plus @@ (p[n,# ]&/ @ Divisors[n]),{n,36}] (* Wouter Meeussen, Jun 07 2009 *)
    Table[Count[IntegerPartitions[n], q_ /; IntegerQ[Mean[q]]], {n, 50}]  (*Clark Kimberling, Apr 23 2019 *)
  • PARI
    a(n) = {my(nb = 0); forpart(p=n, if ((vecsum(Vec(p)) % #p) == 0, nb++);); nb;} \\ Michel Marcus, Jul 03 2018
    
  • Python
    # uses A008284_T
    from sympy import divisors
    def A067538(n): return sum(A008284_T(n,d) for d in divisors(n,generator=True)) # Chai Wah Wu, Sep 21 2023

Formula

a(p) = 2 for all primes p.

Extensions

Extended by Robert G. Wilson v, Oct 16 2002

A275870 Number of collapsible integer partitions of n.

Original entry on oeis.org

1, 2, 2, 4, 2, 7, 2, 10, 5, 9, 2, 34, 2, 11, 10, 36, 2, 64, 2, 60, 12, 15, 2, 320, 7, 17, 23, 94, 2, 297, 2, 202, 16, 21, 14, 1488, 2, 23, 18, 776, 2, 610, 2, 186, 148, 27, 2, 6978, 9, 319
Offset: 1

Views

Author

Gus Wiseman, Aug 11 2016

Keywords

Comments

If a collapse is a joining of some number of equal parts of an integer partition p, we say p is collapsible if by some sequence of collapses it can be reduced to a single part. An example of such a sequence of collapses is (32211111)->(332211)->(33222)->(6222)->(66)->(n) which shows that (32211111) is a collapsible partition of n=twelve.
One can show that if n is a power of a prime, then a partition of n is collapsible iff its parts are all divisors of n; so this sequence shares many terms with A145515 (number of partitions of k^n into powers of k) and A018818 (number of partitions of n into divisors of n).

Crossrefs

Programs

  • Mathematica
    repcaps[q_List]:=repcaps[q]=Union[{q},If[UnsameQ@@q,{},Union@@repcaps/@Union[Sort[Append[Drop[q,#],Plus@@Take[q,#]],Greater]&/@Select[Tuples[Range[Length[q]],2],And[Less@@#,SameQ@@Take[q,#]]&]]]];
    repenum[n_]:=Length[Select[IntegerPartitions[n],MemberQ[repcaps[#],{n}]&]];
    Table[repenum[n],{n,1,32}](* Gus Wiseman, Aug 11 2016 *)

Formula

a(2^n)=A002577(n+1).

A126796 Number of complete partitions of n.

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 5, 8, 10, 16, 20, 31, 39, 55, 71, 100, 125, 173, 218, 291, 366, 483, 600, 784, 971, 1244, 1538, 1957, 2395, 3023, 3693, 4605, 5604, 6942, 8397, 10347, 12471, 15235, 18309, 22267, 26619, 32219, 38414, 46216, 54941, 65838, 77958, 93076, 109908
Offset: 0

Views

Author

Brian Hopkins, Feb 20 2007

Keywords

Comments

A partition of n is complete if every number 1 to n can be represented as a sum of parts of the partition. This generalizes perfect partitions, where the representation for each number must be unique.
A partition is complete iff each part is no more than 1 more than the sum of all smaller parts. (This includes the smallest part, which thus must be 1.) - Franklin T. Adams-Watters, Mar 22 2007
For n > 0: a(n) = sum of n-th row in A261036 and also a(floor(n/2)) = A261036(n,floor((n+1)/2)). - Reinhard Zumkeller, Aug 08 2015
a(n+1) is the number of partitions of n such that each part is no more than 2 more than the sum of all smaller parts (generalizing Adams-Watters's criterion). Bijection: each partition counted by a(n+1) must contain a 1, removing that gives a desired partition of n. - Brian Hopkins, May 16 2017
A partition (x_1, ..., x_k) is complete if and only if 1, x_1, ..., x_k is a "regular sequence" (see A003513 for definition). As a result, the number of complete partitions with n parts is given by A003513(n+1). - Nathaniel Johnston, Jun 29 2023

Examples

			There are a(5) = 4 complete partitions of 5:
  [1, 1, 1, 1, 1], [1, 1, 1, 2], [1, 2, 2], and [1, 1, 3].
G.f.: 1 = 1*(1-x) + 1*x*(1-x)*(1-x^2) + 1*x^2*(1-x)*(1-x^2)*(1-x^3) + 2*x^3*(1-x)*(1-x^2)*(1-x^3)*(1-x^4) + 2*x^4*(1-x)*(1-x^2)*(1-x^3)*(1-x^4)*(1-x^5) + ...
From _Gus Wiseman_, Oct 14 2023: (Start)
The a(1) = 1 through a(8) = 10 partitions:
  (1)  (11)  (21)   (211)   (221)    (321)     (421)      (3221)
             (111)  (1111)  (311)    (2211)    (2221)     (3311)
                            (2111)   (3111)    (3211)     (4211)
                            (11111)  (21111)   (4111)     (22211)
                                     (111111)  (22111)    (32111)
                                               (31111)    (41111)
                                               (211111)   (221111)
                                               (1111111)  (311111)
                                                          (2111111)
                                                          (11111111)
(End)
		

Crossrefs

For parts instead of sums we have A000009 (sc. coverings), ranks A055932.
The strict case is A188431, complement A365831.
These partitions have ranks A325781.
First column k = 0 of A365923.
The complement is counted by A365924, ranks A365830.

Programs

  • Haskell
    import Data.MemoCombinators (memo3, integral, Memo)
    a126796 n = a126796_list !! n
    a126796_list = map (pMemo 1 1) [0..] where
       pMemo = memo3 integral integral integral p
       p   0 = 1
       p s k m
         | k > min m s = 0
         | otherwise   = pMemo (s + k) k (m - k) + pMemo s (k + 1) m
    -- Reinhard Zumkeller, Aug 07 2015
  • Maple
    isCompl := proc(p,n) local m,pers,reps,f,lst,s; reps := {}; pers := combinat[permute](p); for m from 1 to nops(pers) do lst := op(m,pers); for f from 1 to nops(lst) do s := add( op(i,lst),i=1..f); reps := reps union {s}; od; od; for m from 1 to n do if not m in reps then RETURN(false); fi; od; RETURN(true); end: A126796 := proc(n) local prts, res,p; prts := combinat[partition](n); res :=0; for p from 1 to nops(prts) do if isCompl(op(p,prts),n) then res := res+1; fi; od; RETURN(res); end: for n from 1 to 40 do printf("%d %d ",n,A126796(n)); od; # R. J. Mathar, Feb 27 2007
    # At the beginning of the 2nd Maple program replace the current 15 by any other positive integer n in order to obtain a(n). - Emeric Deutsch, Mar 04 2007
    with(combinat): a:=proc(n) local P,b,k,p,S,j: P:=partition(n): b:=0: for k from 1 to numbpart(n) do p:=powerset(P[k]): S:={}: for j from 1 to nops(p) do S:=S union {add(p[j][i],i=1..nops(p[j]))} od: if nops(S)=n+1 then b:=b+1 else b:=b: fi: od: end: seq(a(n),n=1..30); # Emeric Deutsch, Mar 04 2007
    with(combinat): n:=15: P:=partition(n): b:=0: for k from 1 to numbpart(n) do p:=powerset(P[k]): S:={}: for j from 1 to nops(p) do S:=S union {add(p[j][i],i=1..nops(p[j]))} od: if nops(S)=n+1 then b:=b+1 else b:=b: fi: od: b; # Emeric Deutsch, Mar 04 2007
  • Mathematica
    T[n_, k_] := T[n, k] = If[k <= 1, 1, If[n < 2k-1, T[n, Floor[(n+1)/2]], T[n, k-1] + T[n-k, k]]];
    a[n_] := T[n, Floor[(n+1)/2]];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Apr 11 2017, after Franklin T. Adams-Watters *)
    nmz[y_]:=Complement[Range[Total[y]], Total/@Subsets[y]]; Table[Length[Select[IntegerPartitions[n], nmz[#]=={}&]],{n,0,15}] (* Gus Wiseman, Oct 14 2023 *)
  • PARI
    {T(n,k)=if(k<=1,1,if(n<2*k-1,T(n,floor((n+1)/2)),T(n,k-1)+T(n-k,k)))}
    {a(n)=T(n,floor((n+1)/2))} /* If modified to save earlier results, this would be efficient. */ /* Franklin T. Adams-Watters, Mar 22 2007 */
    
  • PARI
    /* As coefficients in g.f.: */
    {a(n)=local(A=[1,1]);for(i=1,n+1,A=concat(A,0);A[#A]=polcoeff(1-sum(m=1,#A,A[m]*x^m*prod(k=1,m,1-x^k +x*O(x^#A))),#A) );A[n+1]}
    for(n=0,50,print1(a(n),",")) /* Paul D. Hanna, Mar 06 2012 */
    

Formula

G.f.: 1 = Sum_{n>=0} a(n)*x^n*Product_{k=1..n+1} (1-x^k). - Paul D. Hanna, Mar 08 2012
a(n) ~ exp(Pi*sqrt(2*n/3)) / (4*sqrt(3)*n) * (1 - (sqrt(3/2)/Pi + 25*Pi/(24*sqrt(6))) / sqrt(n) + (25/16 - 1679*Pi^2/6912)/n). - Vaclav Kotesovec, May 24 2018, extended Nov 02 2019
a(n) = A000041(n) - A365924(n). - Gus Wiseman, Oct 14 2023

Extensions

More terms from R. J. Mathar, Feb 27 2007
More terms from Emeric Deutsch, Mar 04 2007
Further terms from Franklin T. Adams-Watters and David W. Wilson, Mar 22 2007

A033630 Number of partitions of n into distinct divisors of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 2, 1, 1, 1, 6, 1, 1, 1, 2, 1, 4, 1, 1, 1, 1, 1, 8, 1, 1, 1, 4, 1, 3, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 4, 1, 3, 1, 1, 1, 35, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 32, 1, 1, 1, 1, 1, 2, 1, 7, 1, 1, 1, 26, 1, 1, 1, 2, 1, 24, 1, 1, 1, 1, 1, 22, 1, 1, 1, 3
Offset: 0

Views

Author

Keywords

Examples

			a(12) = 3 because we have the partitions [12], [6, 4, 2], and [6, 3, 2, 1].
		

Crossrefs

Programs

  • Haskell
    a033630 0 = 1
    a033630 n = p (a027750_row n) n where
       p _  0 = 1
       p [] _ = 0
       p (d:ds) m = if d > m then 0 else p ds (m - d) + p ds m
    -- Reinhard Zumkeller, Feb 23 2014, Apr 04 2012, Oct 27 2011
  • Maple
    with(numtheory): a:=proc(n) local div, g, gser: div:=divisors(n): g:=product(1+x^div[j],j=1..tau(n)): gser:=series(g,x=0,105): coeff(gser,x^n): end: seq(a(n),n=1..100); # Emeric Deutsch, Mar 30 2006
    # second Maple program:
    with(numtheory):
    a:= proc(n) local b, l; l:= sort([(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; forget(b):
          b(n, nops(l))
        end:
    seq(a(n), n=0..100); # Alois P. Heinz, Feb 05 2014
  • Mathematica
    A033630 = Table[SeriesCoefficient[Series[Times@@((1 + z^#) & /@ Divisors[n]), {z, 0, n}], n ], {n, 512}] (* Wouter Meeussen *)
    A033630[n_] := f[n, n, 1]; 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[A033630, 101, 0] (* Jean-François Alcover, Jul 29 2015, after Reinhard Zumkeller *)

Formula

a(n) = A065205(n) + 1.
a(A005100(n)) = 1; a(A005835(n)) > 1. - Reinhard Zumkeller, Mar 02 2007
a(n) = f(n, n, 1) with 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. - Reinhard Zumkeller, Dec 11 2009
a(n) = [x^n] Product_{d|n} (1 + x^d). - Ilya Gutkovskiy, Jul 26 2017
a(n) = 1 if n is deficient (A005100) or weird (A006037). a(n) = 2 if n is perfect (A000396). - Alonso del Arte, Sep 24 2017

Extensions

More terms from Reinhard Zumkeller, Apr 21 2003

A304442 Number of partitions of n in which the sequence of the sum of the same summands is constant.

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 5, 2, 7, 3, 5, 2, 13, 2, 5, 4, 11, 2, 13, 2, 12, 4, 5, 2, 28, 3, 5, 5, 12, 2, 18, 2, 17, 4, 5, 4, 44, 2, 5, 4, 24, 2, 18, 2, 12, 10, 5, 2, 63, 3, 9, 4, 12, 2, 34, 4, 24, 4, 5, 2, 67, 2, 5, 10, 27, 4, 18, 2, 12, 4, 14, 2, 120, 2, 5, 7, 12, 4, 18, 2, 54
Offset: 0

Views

Author

Seiichi Manyama, May 12 2018

Keywords

Comments

Said differently, these are partitions whose run-sums are all equal. - Gus Wiseman, Jun 25 2022

Examples

			a(72) = binomial(d(72),1) + binomial(d(36),2) + binomial(d(24),3) + binomial(d(18),4) + binomial(d(12),6) = 12 + 36 + 56 + 15 + 1 = 120, where d(n) is the number of divisors of n.
--+----------------------+-----------------------------------------
n |                      | Sequence of the sum of the same summands
--+----------------------+-----------------------------------------
1 | 1                    | 1
2 | 2                    | 2
  | 1+1                  | 2
3 | 3                    | 3
  | 1+1+1                | 3
4 | 4                    | 4
  | 2+2                  | 4
  | 2+1+1                | 2, 2
  | 1+1+1+1              | 4
5 | 5                    | 5
  | 1+1+1+1+1            | 5
6 | 6                    | 6
  | 3+3                  | 6
  | 3+1+1+1              | 3, 3
  | 2+2+2                | 6
  | 1+1+1+1+1+1          | 6
		

Crossrefs

All parts are divisors of n, see A018818, compositions A100346.
For run-lengths instead of run-sums we have A047966, compositions A329738.
These partitions are ranked by A353833.
The distinct instead of equal version is A353837, ranked by A353838, compositions A353850.
The version for compositions is A353851, ranked by A353848.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],SameQ@@Total/@Split[#]&]],{n,0,15}] (* Gus Wiseman, Jun 25 2022 *)
  • PARI
    a(n) = if (n==0, 1, sumdiv(n, d, binomial(numdiv(n/d), d))); \\ Michel Marcus, May 13 2018

Formula

a(n) >= 2 for n > 1.
a(n) = Sum_{d|n} binomial(A000005(n/d), d) for n > 0.

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 *)

A300273 Sorted list of Heinz numbers of collapsible integer partitions.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 11, 12, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 36, 37, 40, 41, 43, 47, 48, 49, 53, 59, 61, 63, 64, 67, 71, 73, 79, 81, 83, 84, 89, 97, 101, 103, 107, 108, 109, 112, 113, 121, 125, 127, 128, 131, 137, 139, 144, 149, 151, 157, 163, 167, 169
Offset: 1

Views

Author

Gus Wiseman, Mar 01 2018

Keywords

Comments

A positive integer is in this sequence iff it can be reduced to a prime number by a sequence of collapses, where a collapse is a replacement of prime(n)^k with prime(n*k) in a number's prime factorization (k > 1).

Examples

			A sequence of collapses is 84 -> 63 -> 49 -> 19 corresponding to the sequence of partitions (4211) -> (422) -> (44) -> (8). Hence 84 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    repcaps[q_]:=Union[{q},If[SquareFreeQ[q],{},Union@@repcaps/@Union[Times[q/#,Prime[Plus@@primeMS[#]]]&/@Select[Rest[Divisors[q]],!PrimeQ[#]&&PrimePowerQ[#]&]]]];
    Select[Range[200],MemberQ[repcaps[#],_?PrimeQ]&]

A353864 Number of rucksack partitions of n: every consecutive constant subsequence has a different sum.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 8, 11, 14, 19, 25, 33, 39, 51, 65, 82, 101, 126, 154, 191, 232, 284, 343, 416, 496, 600, 716, 855, 1018, 1209, 1430, 1691, 1991, 2345, 2747, 3224, 3762, 4393, 5116, 5946, 6897, 7998, 9257, 10696, 12336, 14213, 16343, 18781, 21538, 24687, 28253, 32291, 36876, 42057
Offset: 0

Views

Author

Gus Wiseman, May 23 2022

Keywords

Comments

In a knapsack partition (A108917), every submultiset has a different sum, so these are run-knapsack partitions or rucksack partitions for short. Another variation of knapsack partitions is A325862.

Examples

			The a(0) = 1 through a(7) = 11 partitions:
  ()  (1)  (2)   (3)    (4)     (5)      (6)       (7)
           (11)  (21)   (22)    (32)     (33)      (43)
                 (111)  (31)    (41)     (42)      (52)
                        (1111)  (221)    (51)      (61)
                                (311)    (222)     (322)
                                (11111)  (321)     (331)
                                         (411)     (421)
                                         (111111)  (511)
                                                   (2221)
                                                   (4111)
                                                   (1111111)
		

Crossrefs

Knapsack partitions are counted by A108917, ranked by A299702.
The strong case is A353838, counted by A353837, complement A353839.
The perfect case is A353865, ranked by A353867.
These partitions are ranked by A353866.
A000041 counts partitions, strict A000009.
A300273 ranks collapsible partitions, counted by A275870.
A304442 counts partitions with all equal run-sums, ranked by A353833.
A353832 represents the operation of taking run-sums of a partition.
A353836 counts partitions by number of distinct run-sums.
A353840-A353846 pertain to partition run-sum trajectory.
A353852 ranks compositions with all distinct run-sums, counted by A353850.
A353863 counts partitions whose weak run-sums cover an initial interval.

Programs

  • Mathematica
    msubs[s_]:=Join@@@Tuples[Table[Take[t,i],{t,Split[s]},{i,0,Length[t]}]];
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@Total/@Select[msubs[#],SameQ@@#&]&]],{n,0,30}]

Extensions

a(50)-a(53) from Robert Price, Apr 03 2025

A002577 Number of partitions of 2^n into powers of 2.

Original entry on oeis.org

1, 2, 4, 10, 36, 202, 1828, 27338, 692004, 30251722, 2320518948, 316359580362, 77477180493604, 34394869942983370, 27893897106768940836, 41603705003444309596874, 114788185359199234852802340, 588880400923055731115178072778, 5642645813427132737155703265972004
Offset: 0

Views

Author

Keywords

Comments

For given m, the general formula for t_m(n, k) and the corresponding tables T, computed as in the example, determine a family of related sequences (placed in the rows or in the columns of T). For example, the numbers from the second row of T, computed for given m and n > 2, are the (m+2)-gonal numbers. So the second row contains the first members of: A000290 (the square numbers) when m=2, A000326 (the pentagonal numbers) when m=3, and so on. But rows IV, V etc. of the given table are not represented in the OEIS till now. - Valentin Bakoev, Feb 25 2009; edited by M. F. Hasler, Feb 09 2014

Examples

			To compute t_2(6,1) we can use a table T, defined as T[i,j]= t_2(i,j), for i=1,2,...,6(=n), and j= 0,1,2,...,32(= k*m^{n-1}). It is: 1,2,3,4,5,6,7,8,9...,33; 1,4,9,16,25,36,49...,81; (so the second row contains the first members of A000290 -- the square numbers) 1,10,35,84,165,...,969; (so the third row contains the first members of A000447. The r-th tetrahedral number is given by formula r(r+1)(r+2)/6. This row (also A000447) contains the tetrahedral numbers, obtained for r=1,3,5,7,...) 1,36,201,656,1625; 1,202,1827; 1,1828; Column 1 contains the first 6 members of A002577. - _Valentin Bakoev_, Feb 25 2009
G.f. = 1 + 2*x + 4*x^2 + 10*x^3 + 36*x^4 + 202*x^5 + 1828*x^6 + ...
		

References

  • R. F. Churchhouse, Binary partitions, pp. 397-400 of A. O. L. Atkin and B. J. Birch, editors, Computers in Number Theory. Academic Press, NY, 1971.
  • Lawrence, Jim. "Dual-Antiprisms and Partitions of Powers of 2 into Powers of 2." Discrete & Computational Geometry, Vol. 16 (2019): 465-478. See page 466.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

a(n) = A000123(2^(n-1)) = A018818(2^n).
Column k=2 of A145515, diagonal of A152977. - Alois P. Heinz, Mar 25 2012
See also A002575, A002576.
A column of A125790.

Programs

  • Haskell
    import Data.MemoCombinators (memo2, list, integral)
    a002577 n = a002577_list !! n
    a002577_list = f [1] where
       f xs = (p' xs $ last xs) : f (1 : map (* 2) xs)
       p' = memo2 (list integral) integral p
       p  0 = 1; p []  = 0
       p ks'@(k:ks) m = if m < k then 0 else p' ks' (m - k) + p' ks m
    -- Reinhard Zumkeller, Nov 27 2015
  • Maple
    A002577 := proc(n) if n<=1 then n+1 else A000123(2^(n-1)); fi; end;
  • Mathematica
    $RecursionLimit = 10^5; (* b = A000123 *) b[0] = 1; b[n_?EvenQ] := b[n] = b[n-1] + b[n/2]; b[n_?OddQ] := b[n] = b[n-1] + b[(n-1)/2]; a[n_] := b[2^(n-1)]; a[0] = 1; Table[a[n], {n, 0, 17}] (* Jean-François Alcover, Nov 23 2011 *)
    a[ n_] := SeriesCoefficient[ 1 / Product[ 1 - x^2^k, {k, 0, n}], {x, 0, 2^n}]; (* Michael Somos, Apr 21 2014 *)
  • PARI
    a(n)=polcoeff(prod(j=0,n,1/(1-x^(2^j)+x*O(x^(2^n)))),2^n) \\ Paul D. Hanna
    

Formula

a(n) is about 0.9233*Sum_j {i=0, 1, 2, 3, ...} 2^(j*(2n-j-1)/2)/j!. - Henry Bottomley, Jul 23 2003
a(n) = A078121(n+1, 1). - Paul D. Hanna, Sep 13 2004
A002577(n)-1 = A125792(n). - Let m > 1, n > 0 and k >= 0. The general formula for the number of all partitions of k*m^n into powers of m is t_m(n, k)= k+1 if n=1, t_m(n, k)= 1 if k=0, and t_m(n, k)= t_m(n, k-1) + t_m(n-1, k*m) if n > 1 and k > 0. A002577 is obtained for m=2 and n=1,2,3,... - Valentin Bakoev, Feb 25 2009
a(n) = [x^(2^n)] 1/Product_{j>=0} (1-x^(2^j)). - Alois P. Heinz, Sep 27 2011

Extensions

Edited by M. F. Hasler, Feb 09 2014

A279787 Twice-partitioned numbers where the first partition is constant.

Original entry on oeis.org

1, 1, 3, 4, 10, 8, 29, 16, 64, 58, 124, 57, 469, 102, 489, 763, 1597, 298, 3858, 491, 8942, 6355, 6187, 1256, 59076, 18766, 20830, 49694, 167078, 4566, 481186, 6843, 752128, 362907, 231592, 1597802, 5951007, 21638, 790404, 2655810, 25274798, 44584, 40898731
Offset: 0

Views

Author

Gus Wiseman, Dec 18 2016

Keywords

Examples

			The a(4)=10 twice-partitions are:
((4)), ((31)), ((22)), ((211)), ((1111)),
((2)(2)), ((2)(11)), ((11)(2)), ((11)(11)),
((1)(1)(1)(1)).
		

Crossrefs

Programs

  • Maple
    with(numtheory): with(combinat):
    a:= proc(n) option remember; `if`(n=0, 1,
          add(numbpart(n/d)^d, d=divisors(n)))
        end:
    seq(a(n), n=0..70);  # Alois P. Heinz, Dec 20 2016
  • Mathematica
    nn=20;Table[DivisorSum[n,Power[PartitionsP[#],n/#]&],{n,nn}]
  • PARI
    a(n)=if(n==0, 1, sumdiv(n, d, numbpart(n/d)^d)) \\ Andrew Howroyd, Aug 26 2018

Formula

a(n) = Sum_{d|n} A000041(n/d)^d for n > 0. - Andrew Howroyd, Aug 26 2018
Showing 1-10 of 112 results. Next