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 41-50 of 50 results.

A058400 Triangle of partial row sums of partition triangle A058398.

Original entry on oeis.org

1, 2, 1, 3, 2, 1, 5, 4, 3, 1, 7, 6, 5, 3, 1, 11, 10, 9, 7, 4, 1, 15, 14, 13, 11, 8, 4, 1, 22, 21, 20, 18, 15, 10, 5, 1, 30, 29, 28, 26, 23, 18, 12, 5, 1, 42, 41, 40, 38, 35, 30, 23, 14, 6, 1, 56, 55, 54, 52, 49, 44, 37, 27, 16, 6, 1, 77, 76, 75, 73, 70, 65, 58, 47, 34, 19, 7, 1, 101
Offset: 1

Views

Author

Wolfdieter Lang, Dec 11 2000

Keywords

Comments

Mirror of A026820. - Omar E. Pol, Apr 21 2012

Examples

			Triangle begins:
1;
2,   1;
3,   2,  1;
5,   4,  3,  1;
7,   6,  5,  3, 1;
11, 10,  9,  7, 4, 1;
15, 14, 13, 11, 8, 4, 1;
		

Crossrefs

Columns 1-3: A000041(n), A000065(n), A007042(n+1).
Cf. A008284.

Formula

a(n, m) = sum(A058398(n, k), k=m..n).

A171985 Number of partitions of 2*n-1 into parts not greater than n.

Original entry on oeis.org

1, 2, 5, 11, 23, 44, 82, 146, 252, 423, 695, 1116, 1763, 2738, 4192, 6334, 9459, 13968, 20425, 29588, 42496, 60547, 85628, 120246, 167762, 232605, 320635, 439544, 599412, 813360, 1098480, 1476870, 1977087, 2635869, 3500382, 4630932, 6104533, 8019131, 10499093
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 21 2010

Keywords

Comments

Central terms of the triangle in A026820: a(n)=A026820(2*n-1,n).

Examples

			a(4) = (partitions of 7 into parts <= 4) = #{4+3, 4+2+1, 4+1+1+1, 3+3+1, 3+2+2, 3+2+1+1, 3+1+1+1+1, 2+2+2+1, 2+2+1+1+1, 2+1+1+1+1+1, 1+1+1+1+1+1+1} = 11.
		

Programs

  • Maple
    g:= proc(n, i) option remember;
         `if`(n=0, 1, `if`(i>1, g(n, i-1), 0)+`if`(i>n, 0, g(n-i, i)))
        end:
    a:= n-> g(2*n-1, n):
    seq (a(n), n=1..40);  # Alois P. Heinz, Jul 18 2012
  • Mathematica
    g[n_, i_] := g[n, i] = If[n==0, 1, If[i>1, g[n, i-1], 0]+If[i>n, 0, g[n-i, i]]]; a[n_] := g[2*n-1, n]; Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Feb 16 2017, after Alois P. Heinz *)

A233322 Triangle read by rows: T(n,k) = number of palindromic partitions of n in which no part exceeds k, 1 <= k <= n.

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 1, 3, 3, 4, 1, 2, 3, 3, 4, 1, 4, 5, 6, 6, 7, 1, 2, 5, 5, 6, 6, 7, 1, 5, 7, 10, 10, 11, 11, 12, 1, 3, 7, 8, 10, 10, 11, 11, 12, 1, 6, 9, 14, 15, 17, 17, 18, 18, 19, 1, 3, 9, 11, 15, 15, 17, 17, 18, 18, 19, 1, 7, 12, 20, 22, 26, 26, 28, 28, 29, 29, 30
Offset: 1

Views

Author

L. Edson Jeffery, Dec 10 2013

Keywords

Comments

See A025065 for a definition of palindromic partition.

Examples

			Triangle begins:
1;
1, 2;
1, 1,  2;
1, 3,  3,  4;
1, 2,  3,  3,  4;
1, 4,  5,  6,  6,  7;
1, 2,  5,  5,  6,  6,  7;
1, 5,  7, 10, 10, 11, 11, 12;
1, 3,  7,  8, 10, 10, 11, 11, 12;
1, 6,  9, 14, 15, 17, 17, 18, 18, 19;
1, 3,  9, 11, 15, 15, 17, 17, 18, 18, 19;
1, 7, 12, 20, 22, 26, 26, 28, 28, 29, 29, 30;
...
		

Crossrefs

Cf. A025065, A026820; partial sums of row entries of A233321.
Cf. A233323, A233324 (palindromic compositions of n).

Programs

  • Mathematica
    (* run this first: *)
    Needs["Combinatorica`"];
    (* run the following in a different cell: *)
    a233321[n_] := {}; ; Do[Do[a = Partitions[n]; count = 0; Do[If[Max[a[[j]]] == k, x = Permutations[a[[j]]]; Do[If[x[[m]] == Reverse[x[[m]]], count++; Break[]], {m, Length[x]}]], {j, Length[a]}]; AppendTo[a233321[n], count], {k, n}], {n, nmax}]; a233322[n_] := {}; Do[Do[AppendTo[a233322[n], Sum[a233321[n][[j]], {j, k}]], {k, n}], {n,nmax}]; Table[a233322[n], {n, nmax}](* L. Edson Jeffery, Oct 09 2017 *)
  • PARI
    \\ here PartitionCount is A026820.
    PartitionCount(n,maxpartsize)={my(t=0); forpart(p=n, t++, maxpartsize); t}
    T(n,k)=sum(i=0, (k-n%2)\2, PartitionCount(n\2-i, k));
    for(n=1, 10, for(k=1, n, print1(T(n,k), ", ")); print) \\ Andrew Howroyd, Oct 09 2017

Formula

T(n,k) = Sum_{i=1..k} A233321(n,i).
T(n,k) = Sum_{i=0..(k+2*floor(n/2)-n)/2} A026820(floor(n/2)-i, k). - Andrew Howroyd, Oct 09 2017

Extensions

Corrected row 7 as communicated by Andrew Howroyd. - L. Edson Jeffery, Oct 09 2017

A382041 Triangle read by rows: T(n, k) is the number of partitions of n with at most k parts where 0 <= k <= n, and each part is one of four kinds.

Original entry on oeis.org

1, 0, 4, 0, 4, 14, 0, 4, 20, 40, 0, 4, 30, 70, 105, 0, 4, 36, 116, 196, 252, 0, 4, 46, 170, 350, 490, 574, 0, 4, 52, 236, 556, 896, 1120, 1240, 0, 4, 62, 310, 845, 1505, 2079, 2415, 2580, 0, 4, 68, 400, 1200, 2400, 3584, 4480, 4960, 5180, 0, 4, 78, 494, 1670, 3626, 5910, 7842, 9162, 9822, 10108
Offset: 0

Views

Author

Peter Dolland, Mar 12 2025

Keywords

Comments

Two unrestricted unary predicates on the parts set result in four kinds: The intersection, the both differences and the complement of the union.
The 1-kind case is Euler's table A026820.
The 2-kind case is A381895.
The 3-kind case is A382025.

Examples

			Triangle starts:
  0 : [1]
  1 : [0, 4]
  2 : [0, 4, 14]
  3 : [0, 4, 20,  40]
  4 : [0, 4, 30,  70,  105]
  5 : [0, 4, 36, 116,  196,  252]
  6 : [0, 4, 46, 170,  350,  490,  574]
  7 : [0, 4, 52, 236,  556,  896, 1120, 1240]
  8 : [0, 4, 62, 310,  845, 1505, 2079, 2415, 2580]
  9 : [0, 4, 68, 400, 1200, 2400, 3584, 4480, 4960, 5180]
 10 : [0, 4, 78, 494, 1670, 3626, 5910, 7842, 9162, 9822, 10108]
 ...
		

Crossrefs

Main diagonal gives A023003.

Programs

  • Python
    from sympy import binomial
    from sympy.utilities.iterables import partitions
    from sympy.combinatorics.partitions import IntegerPartition
    kinds = 4 - 1   # the number of part kinds - 1
    def a382041_row( n):
        if n == 0 : return [1]
        t = list( [0] * n)
        for p in partitions( n):
            p = IntegerPartition( p).as_dict()
            fact = 1
            s = 0
            for k in p :
                s += p[k]
                fact *= binomial( kinds + p[k], kinds)
            if s > 0 :
                t[s - 1] += fact
        for i in range( n - 1):
            t[i+1] += t[i]
        return [0] + t

A383352 Triangle read by rows: T(n, k) is the number of partitions of a 2-colored set of n objects into at most k parts where 0 <= k <= n, and each part is one of 2 kinds.

Original entry on oeis.org

1, 0, 4, 0, 6, 16, 0, 8, 32, 52, 0, 10, 63, 123, 158, 0, 12, 100, 264, 384, 440, 0, 14, 158, 506, 876, 1086, 1170, 0, 16, 224, 896, 1800, 2500, 2836, 2956, 0, 18, 317, 1491, 3489, 5359, 6542, 7046, 7211, 0, 20, 420, 2372, 6324, 10848, 14208, 16056, 16776, 16996
Offset: 0

Views

Author

Peter Dolland, Apr 24 2025

Keywords

Examples

			Triangle starts:
 0 : [1]
 1 : [0,  4]
 2 : [0,  6,  16]
 3 : [0,  8,  32,   52]
 4 : [0, 10,  63,  123,   158]
 5 : [0, 12, 100,  264,   384,   440]
 6 : [0, 14, 158,  506,   876,  1086,  1170]
 7 : [0, 16, 224,  896,  1800,  2500,  2836,  2956]
 8 : [0, 18, 317, 1491,  3489,  5359,  6542,  7046,  7211]
 9 : [0, 20, 420, 2372,  6324, 10848, 14208, 16056, 16776, 16996]
10 : [0, 22, 556, 3608, 11002, 20836, 29488, 34976, 37700, 38690, 38976]
...
		

Crossrefs

Row sums of A383351.
Cf. A381895 (1-color), A381891 (1-kind), A026820 (1-color, 1-kind).

Programs

  • Python
    from sympy import binomial
    from sympy.utilities.iterables import partitions
    def calc_w(k , m):
        s = 0
        for p in partitions(m, m=k+1):
            fact = 1
            j = k + 1
            for x in p :
                fact *= binomial(j, p[x]) * (x + 1) ** p[x]
                j -= p[x]
            s += fact
        return s
    def t_row(n):
        if n == 0 : return [1]
        t = list([0] * n)
        for p in partitions( n):
            fact = 1
            s = 0
            for k in p :
                s += p[k]
                fact *= calc_w(k, p[k])
            if s > 0 :
                t[s - 1] += fact
        for i in range(n - 1):
            t[i + 1] += t[i]
        return [0] + t

Formula

T(n,k) = Sum_{i=0..k} A383351(n,i).
T(n,1) = 2*n + 2 for n >= 1.

A106254 Partition table in square format.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Apr 27 2005

Keywords

Comments

The square is the following table:
1 1 1 1 1 1 1...
1 2 2 2 2 2 2...
1 2 3 3 3 3 3...
1 3 4 5 5 5 5...
1 3 5 6 7 7 7...
1 4 7 9 10 11 11...
1 4 8 11 13 14 15...

Examples

			The partitions of 6 are:
1 + 1 + 1 + 1 + 1 + 1; 2 + 1 + 1 + 1 + 1; 3 + 1 + 1 + 1; 2 + 2 + 1 + 1; 4 + 1 + 1; 3 + 2 + 1; 2 + 2 + 2; 5 + 1, 4 + 2, 3 + 3, 6.
There are 9 partitions of 6 having summands no larger than 4, so p_4(6) = 9.
		

References

  • Ivan Niven, "Mathematics of Choice, How to Count Without Counting", MAA, 1965, pp. 98-99 (table p. 98).

Crossrefs

Essentially the same as A008284, except for missing one diagonal thereof (which would be zero row of this array).

Programs

  • Mathematica
    T[n_, k_] := T[n, k] = If[n == 0 || k == 1, 1, T[n, k-1] + If[k > n, 0, T[n-k, k]]];
    Table[T[n-k+1, k], {n, 1, 13}, {k, 1, n}] // Flatten (* Jean-François Alcover, Aug 08 2018, after Alois P. Heinz *)

Formula

Antidiagonals of table of values of p_k(n) (the number of partitions of n with no summand greater than k).
T(n,m) = sum_{i=1..m} A008284(n,i). T(n,m) = A026820(n,m) if m<=n and T(n,m)=T(n,n) if m>=n. G.f. column m: 1/(1-x)/(1-x^2)/.../(1-x^m) = sum_(n=1,2,3..) T(n,m) x^n [Comtet]. - R. J. Mathar, Aug 31 2007

Extensions

Edited, corrected and extended by Franklin T. Adams-Watters, Jan 12 2006

A318806 Triangular array read by rows, where T(n,k) is the number of almost distinct partitions of n in which every part is <= k for 1 <= k <= n.

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 4, 5, 6, 1, 2, 4, 6, 7, 8, 1, 2, 4, 7, 9, 10, 11, 1, 2, 4, 7, 10, 12, 13, 14, 1, 2, 4, 8, 12, 15, 17, 18, 19, 1, 2, 4, 8, 13, 17, 20, 22, 23, 24, 1, 2, 4, 8, 14, 20, 24, 27, 29, 30, 31, 1, 2, 4, 8, 15, 22, 28, 32, 35, 37, 38, 39, 1, 2, 4, 8, 15, 24, 32, 38, 42, 45, 47
Offset: 1

Views

Author

Sara Billey, Sep 04 2018

Keywords

Comments

An almost distinct partition of n with parts bounded by k is a decreasing sequence of positive integers (a(1), a(2), ..., a(k)) such that n = a(1) + a(2) +...+ a(k), any a(i) > 1 is distinct from all other values, and all a(i) <= k.

Examples

			There are T(5,6) = 7 almost distinct partitions of 6 in which every part is <= 5: [5,1], [4,2], [4,1,1], [3,2,1], [3,1,1,1], [2,1,1,1,1], [1,1,1,1,1,1].
Triangle starts:
1;
1, 2;
1, 2, 3;
1, 2, 3, 4;
1, 2, 4, 5,  6;
1, 2, 4, 6,  7,  8;
1, 2, 4, 7,  9, 10, 11;
1, 2, 4, 7, 10, 12, 13, 14;
1, 2, 4, 8, 12, 15, 17, 18, 19;
1, 2, 4, 8, 13, 17, 20, 22, 23, 24;
...
		

Crossrefs

Programs

A382241 Triangle read by rows: T(n,k) is the number of partitions of a 4-colored set of n objects into at most k parts with 0 <= k <= n.

Original entry on oeis.org

1, 0, 4, 0, 10, 20, 0, 20, 60, 80, 0, 35, 170, 270, 305, 0, 56, 396, 816, 1016, 1072, 0, 84, 868, 2238, 3188, 3538, 3622, 0, 120, 1716, 5616, 9196, 10996, 11556, 11676, 0, 165, 3235, 13140, 24975, 32400, 35445, 36285, 36450, 0, 220, 5720, 28900, 63680, 90700, 104060, 108820, 110020, 110240
Offset: 0

Views

Author

Peter Dolland, Mar 19 2025

Keywords

Comments

Two unrestricted unary predicates on the n objects mean four colors: The intersection, the both differences, and the complement of the union.
The 1-color case is Euler's table A026820.
The 2-color case is A381891.
The 3-color case is A382045.

Examples

			Triangle starts:
 0 : [1]
 1 : [0,   4]
 2 : [0,  10,   20]
 3 : [0,  20,   60,    80]
 4 : [0,  35,  170,   270,    305]
 5 : [0,  56,  396,   816,   1016,   1072]
 6 : [0,  84,  868,  2238,   3188,   3538,   3622]
 7 : [0, 120, 1716,  5616,   9196,  10996,  11556,  11676]
 8 : [0, 165, 3235, 13140,  24975,  32400,  35445,  36285,  36450]
 9 : [0, 220, 5720, 28900,  63680,  90700, 104060, 108820, 110020, 110240]
10 : [0, 286, 9752, 60232, 154262, 242254, 294140, 315980, 323000, 324650, 324936]
...
		

Crossrefs

Main diagonal gives A255050.

Programs

  • Maple
    b:= proc(n, i) option remember; expand(`if`(n=0, 1, `if`(i<1, 0, add(
          b(n-i*j, min(n-i*j, i-1))*binomial(i*(i^2+6*i+11)/6+j, j)*x^j, j=0..n/i))))
        end:
    T:= proc(n, k) option remember;
         `if`(k<0, 0, T(n, k-1)+coeff(b(n$2), x, k))
        end:
    seq(seq(T(n, k), k=0..n), n=0..10);  # Alois P. Heinz, Mar 19 2025
  • Python
    from sympy import binomial
    from sympy.utilities.iterables import partitions
    from sympy.combinatorics.partitions import IntegerPartition
    colors = 4 - 1   # the number of colors - 1
    def a382241_row( n):
        if n == 0 : return [1]
        t = list( [0] * n)
        for p in partitions( n):
            p = IntegerPartition( p).as_dict()
            fact = 1
            s = 0
            for k in p :
                s += p[k]
                fact *= binomial( binomial( k + colors, colors) + p[k] - 1, p[k])
            if s > 0 :
                t[s - 1] += fact
        for i in range( n - 1):
            t[i+1] += t[i]
        return [0] + t

Formula

T(n,1) = binomial(n + 3, 3) = A000292(n + 1) for n >= 1.

A383353 Square array A(n,k), n>=0, k>=0, read by antidiagonals downwards, where n 2-colored objects are distributed into k containers of two kinds. Containers may be left empty.

Original entry on oeis.org

1, 2, 0, 3, 4, 0, 4, 8, 6, 0, 5, 12, 22, 8, 0, 6, 16, 38, 40, 10, 0, 7, 20, 54, 92, 73, 12, 0, 8, 24, 70, 144, 196, 112, 14, 0, 9, 28, 86, 196, 354, 376, 172, 16, 0, 10, 32, 102, 248, 512, 760, 678, 240, 18, 0, 11, 36, 118, 300, 670, 1200, 1554, 1136, 335, 20, 0
Offset: 0

Views

Author

Peter Dolland, Apr 24 2025

Keywords

Examples

			Array starts:
 0 : [1,  2,   3,    4,     5,     6,     7,      8,      9,     10,     11, ...]
 1 : [0,  4,   8,   12,    16,    20,    24,     28,     32,     36,     40, ...]
 2 : [0,  6,  22,   38,    54,    70,    86,    102,    118,    134,    150, ...]
 3 : [0,  8,  40,   92,   144,   196,   248,    300,    352,    404,    456, ...]
 4 : [0, 10,  73,  196,   354,   512,   670,    828,    986,   1144,   1302, ...]
 5 : [0, 12, 112,  376,   760,  1200,  1640,   2080,   2520,   2960,   3400, ...]
 6 : [0, 14, 172,  678,  1554,  2640,  3810,   4980,   6150,   7320,   8490, ...]
 7 : [0, 16, 240, 1136,  2936,  5436,  8272,  11228,  14184,  17140,  20096, ...]
 8 : [0, 18, 335, 1826,  5315, 10674, 17216,  24262,  31473,  38684,  45895, ...]
 9 : [0, 20, 440, 2812,  9136, 19984, 34192,  50248,  67024,  84020, 101016, ...]
10 : [0, 22, 578, 4186, 15188, 36024, 65512, 100488, 138188, 176878, 215854, ...]
...
		

Crossrefs

Antidiagonal sums give A161870.
Cf. A382345 (1-color), A381891 (1-kind), A026820 (1-color, 1-kind).
Cf. A278710.

Programs

  • Maple
    b:= proc(n, i) option remember; expand(`if`(n=0 or i=1, (n+1)*x^n,
          add(b(n-i*j, min(n-i*j, i-1))*binomial(i+j, j)*x^j, j=0..n/i)))
        end:
    g:= proc(n, k) option remember;
          `if`(k<0, 0, g(n, k-1)+coeff(b(n$2), x, k))
        end:
    A:= (n, k)-> add(add(g(j, h)*g(n-j, k-h), h=0..k), j=0..n):
    seq(seq(A(n, d-n), n=0..d), d=0..10);  # Alois P. Heinz, May 05 2025
  • Python
    from sympy import binomial
    from sympy.utilities.iterables import partitions
    def calc_w( k , m):
        s = 0
        for p in partitions( m, m=k+1):
            fact = 1
            j = k + 1
            for x in p :
                fact *= binomial( j, p[x]) * (x + 1) ** p[x]
                j -= p[x]
            s += fact
        return s
    def a_row( n, length=11):
        if n == 0 : return [ k + 1 for k in range( length) ]
        t = list( [0] * length)
        for p in partitions( n):
            fact = 1
            s = 0
            for k in p :
                s += p[k]
                fact *= calc_w( k, p[k])
            if s > 0 :
                t[s - 1] += fact
        t = [0] + t
        for i in range( 1, length):
            t[i+1] += t[i] * 2 - t[i - 1]
        return t

Formula

A(0,k) = k + 1.
A(1,k) = 4*k.
A(2,k+1) = 6 + 16 * k.
A(n,1) = 2 + 2 * n.
A(n,n+k) = A(n,n) + k * A383352(n,n).
A(n,k) = Sum_{i=0..k} (k + 1 - i) * A383351(n,i) for 0 <= k <= n.
Sum_{k=0..n} (-1)^k*T(n-k,k) = A278710(n). - Alois P. Heinz, May 05 2025

A140652 Partial sums of A062968.

Original entry on oeis.org

1, 2, 4, 6, 10, 13, 19, 24, 31, 38, 48, 55, 67, 78, 90, 102, 118, 131, 149, 164, 182, 201, 223, 240, 263, 286, 310, 333, 361, 384, 414, 441, 471, 502, 534, 562, 598, 633, 669, 702, 742, 777, 819, 858, 898, 941, 987, 1026, 1073, 1118, 1166, 1213, 1265, 1312
Offset: 1

Views

Author

R. J. Mathar, Jul 09 2008

Keywords

Comments

A062968(n) counts fractions of the format i/j with 1<=j
The partial sum gives the number of "essentially" distinct values on the unit circle for all roots up to the n-th. This relates to the problem of decomposing the generating function of the restricted partitions of n, A026820, into partial fractions.

Examples

			A062968(1)=1 counts the fraction 0/1.
A062968(2)=1 counts 1/2.
A062968(3)=2 counts {1/3,2/3}.
A062968(4)=2 counts {1/4,3/4} skipping 2/4 which could be reduced to 1/2.
A062968(5)=4 counts {1/5,2/5,3/5,4/5}. The value a(5)=1+1+2+2+4=10 counts all these distinct fractions {0/1,1/2,1/3,2/3,..,4/5}, which represent the phases of the roots of the polynomials 1-x^j, j=1..5.
		

Crossrefs

Programs

  • Mathematica
    Table[n + 1 - DivisorSigma[0, n], {n, 1, 54}] // Accumulate (* Jean-François Alcover, Jun 24 2013 *)
  • PARI
    A062968(n)={ return(n+1-numdiv(n)) ; }
    A(n)={ return(sum(i=1,n,A062968(i))) ; }
    { for(n=1,100,print1(A(n),", ")) ; }

Formula

a(n) = Sum_{i=1..n} A062968(i).
a(n) = Sum_{i=1..n} i - floor(n/(i+1)). - Wesley Ivan Hurt, Sep 13 2017
G.f.: x*(2 - x)/(1 - x)^3 - (1/(1 - x))*Sum_{k>=1} x^k/(1 - x^k). - Ilya Gutkovskiy, Sep 18 2017
Previous Showing 41-50 of 50 results.