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.

A111133 Number of partitions of n into at least two distinct parts.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 3, 4, 5, 7, 9, 11, 14, 17, 21, 26, 31, 37, 45, 53, 63, 75, 88, 103, 121, 141, 164, 191, 221, 255, 295, 339, 389, 447, 511, 584, 667, 759, 863, 981, 1112, 1259, 1425, 1609, 1815, 2047, 2303, 2589, 2909, 3263, 3657, 4096, 4581, 5119, 5717, 6377
Offset: 0

Views

Author

David Sharp (davidsharp(AT)rcn.com), Oct 17 2005

Keywords

Comments

Old name: Number of sets of natural numbers less than n which sum to n.
From Clark Kimberling, Mar 13 2012: (Start)
(1) Number of partitions of n into at least two distinct parts.
(2) Also, number of partitions of 2n into distinct parts having maximal part n; see Example section. (End)

Examples

			a(6) = 3 because 1+5, 2+4 and 1+2+3 each sum to 6. That is, the three sets are {1,5},{2,4},{1,2,3}.
For n=6, the partitions of 2n into distinct parts having maximum 6 are 6+5+1, 6+4+2, 6+3+2+1, so that a(6)=3, as an example for Comment (2). - _Clark Kimberling_, Mar 13 2012
		

Crossrefs

Cf. A058377.
Cf. A000009.

Programs

  • Haskell
    a111133 = subtract 1 . a000009  -- Reinhard Zumkeller, Sep 09 2015
  • Maple
    seq(coeff(series(mul((1+x^k),k=1..n)-1/(1-x), x,n+1),x,n),n=0..60); # Muniru A Asiru, Aug 10 2018
  • Mathematica
    Needs["DiscreteMath`Combinatorica`"]
    f[n_] := Block[{lmt = Floor[(Sqrt[8n + 1] - 1)/2] + 1, t}, Sum[ Length[ Select[Plus @@@ KSubsets[ Range[n - k(k - 1)/2 + 1], k], # == n &]], {k, 2, lmt}]]; Array[f, 55] (* Robert G. Wilson v, Oct 17 2005 *)
    (* Next program shows the partitions (sets) *)
    d[n_] := Select[IntegerPartitions[n], Max[Length /@ Split@ #] == 1 &]; Table[d[n], {n, 1, 12}]
    TableForm[%]
    (* Clark Kimberling, Mar 13 2012 *)
    Table[PartitionsQ[n]-1, {n, 0, 55}] (* Jean-François Alcover, Jan 17 2014, after Vladeta Jovovic *)
  • PARI
    N=66;  x='x+O('x^N);
    gf=sum(k=0,N, x^((k^2+k)/2) / prod(j=1,k, 1-x^j)) - 1/(1-x);
    concat( [0,0,0], Vec(gf) ) /* Joerg Arndt, Sep 17 2012 */
    

Formula

a(n) = A000009(n) - 1. - Vladeta Jovovic, Oct 19 2005
G.f.: Sum_{k>=0} (x^((k^2+k)/2) / Product_{j=1..k} (1-x^j)) - 1/(1-x). - Joerg Arndt, Sep 17 2012
a(n) = A026906(floor(n-1)/2) + A258259(n). - Bob Selcoe, Oct 05 2015
G.f.: -1/(1 - x) + Product_{k>=1} (1 + x^k). - Ilya Gutkovskiy, Aug 10 2018
G.f.: Sum_{n >= 1} x^(2*n+1)/Product_{k = 1..n+1} 1 - x^(2*k-1). - Peter Bala, Nov 20 2024

Extensions

More terms from Vladeta Jovovic and Robert G. Wilson v, Oct 17 2005
a(0)=0 prepended by Joerg Arndt, Sep 17 2012

A368484 Number of compositions (ordered partitions) of n into parts not greater than n/2.

Original entry on oeis.org

1, 0, 1, 1, 5, 8, 24, 44, 108, 208, 464, 912, 1936, 3840, 7936, 15808, 32192, 64256, 129792, 259328, 521472, 1042432, 2091008, 4180992, 8375296, 16748544, 33525760, 67047424, 134156288, 268304384, 536739840, 1073463296, 2147205120, 4294377472, 8589344768
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 26 2023

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1 - 2 x - 3 x^2 + 7 x^3 + 3 x^4 - 6 x^5)/((1 - 2 x) (1 - 2 x^2)^2), {x, 0, 34}], x]
    Join[{1}, LinearRecurrence[{2, 4, -8, -4, 8}, {0, 1, 1, 5, 8}, 34]]

Formula

G.f.: (1 - 2*x - 3*x^2 + 7*x^3 + 3*x^4 - 6*x^5) / ((1 - 2*x) * (1 - 2*x^2)^2).
a(n) = [x^n] 1 / (1 - Sum_{1 <= j <= n/2} x^j).

A368501 Number of compositions (ordered partitions) of n into distinct parts not greater than n/2.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 6, 0, 6, 6, 36, 30, 66, 60, 120, 234, 318, 432, 666, 894, 1272, 2226, 2772, 3960, 5496, 7524, 10068, 13776, 22488, 27756, 39162, 51264, 70398, 91386, 124152, 158574, 247554, 301656, 416748, 537690, 730854, 929196, 1248798, 1576014, 2078328, 2956110
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 27 2023

Keywords

Examples

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

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(i*(i+1)/2 b(n, iquo(n, 2), 0):
    seq(a(n), n=0..45);  # Alois P. Heinz, Dec 28 2023
  • Mathematica
    Table[Sum[Count[IntegerPartitions[n, {k}], _?(And[UnsameQ @@ #, AllTrue[#, # <= n/2 &]] &)] k!, {k, 0, n}], {n, 0, 45}]

Formula

a(n) = Sum_{k=1..floor(n/2)} A072575(n,k) for n>=1. - Alois P. Heinz, Dec 31 2023

A262885 Irregular triangle T(n,k) read by rows: T(n,k) = number of partitions of n into at least two distinct parts, where the largest part is n-k.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 3, 2, 1, 1, 2, 2, 3, 3, 2, 1, 1, 2, 2, 3, 4, 3, 1, 1, 1, 2, 2, 3, 4, 4, 3, 1, 1, 1, 2, 2, 3, 4, 5, 4, 3, 1, 1, 1, 2, 2, 3, 4, 5, 5, 5, 3, 1, 1, 2, 2, 3, 4, 5, 6, 6, 5, 2, 1, 1, 2, 2, 3, 4, 5, 6, 7, 7, 5, 2
Offset: 1

Views

Author

Bob Selcoe, Oct 04 2015

Keywords

Comments

Alternate name: T(n,k) = the number of ways that at least two distinct positive integers sum to n, where the largest of these integers is n-k.
Row sums = A111133(n).
Row sums {k <= floor((n-1)/2)} = A026906(n)
Row sums {k > floor((n-1)/2)} = A258259(n)

Examples

			Triangle starts T(1,1):
n/k  1 2 3 4 5 6 7 8 9 10 11 12 13 14
1    0
2    0
3    1
4    1
5    1 1
6    1 1 1
7    1 1 2
8    1 1 2 1
9    1 1 2 2 1
10   1 1 2 2 2 1
11   1 1 2 2 3 2
12   1 1 2 2 3 3 2
13   1 1 2 2 3 4 3 1
14   1 1 2 2 3 4 4 3 1
15   1 1 2 2 3 4 5 4 3 1
16   1 1 2 2 3 4 5 5 5 3
17   1 1 2 2 3 4 5 6 6 5  2
18   1 1 2 2 3 4 5 6 7 7  5  2
19   1 1 2 2 3 4 5 6 8 8  7  5  1
20   1 1 2 2 3 4 5 6 8 9  9  8  4  1
T(15,8) = 4: the four partitions of 15 into at least two distinct parts with largest part 15-8 = 7 are  {7,6,2}; {7,5,3}; {7,5,2,1} and {7,4,3,1}.
T(14,k) for k=1..F, with F = floor(13/2) = 6: T(14,1) = 0+1 = 1; T(14,2) = 0+1 = 1; T(14,3) = 1+1 = 2; T(14,4) = 1+1 = 2; T(14,5) = 2+1 = 3; T(14,6) = 3+1 = 4.
T(14,k) for k>6: T(14,7) = T(7,1)+T(7,2)+T(7,3) = 1+1+2 = 4; T(14,8) = T(8,3)+T(8,4) = 2+1 = 3; T(14,9) = T(9,5) = 1.
		

Crossrefs

Formula

Given T(1,1) = T(2,1) = 0, to find row n>=3: Let k" be the maximum value of k in row g
T(n,k) = S(g)+1 g=k when g<=F (equivalent to A000009(g));
T(n,k) = Sum_{j=2*(g-F)-1..k"} T(g,j) g=k when g>F, 2*(g-F)-1 <= k" and n is even;
T(n,k) = Sum_{j=2*(g-F)..k"} T(g,j) g=k when g>F, 2*(g-F) <= k" and n is odd.
Showing 1-4 of 4 results.