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.

A360672 Triangle read by rows where T(n,k) is the number of integer partitions of n whose left half (exclusive) sums to k, where k ranges from 0 to n.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 3, 1, 0, 1, 0, 2, 3, 1, 0, 1, 0, 1, 4, 4, 1, 0, 1, 0, 0, 3, 6, 4, 1, 0, 1, 0, 0, 1, 7, 7, 5, 1, 0, 1, 0, 0, 1, 4, 8, 10, 5, 1, 0, 1, 0, 0, 0, 3, 6, 14, 11, 6, 1, 0, 1, 0, 0, 0, 1, 5, 12, 16, 14, 6, 1, 0
Offset: 0

Views

Author

Gus Wiseman, Feb 27 2023

Keywords

Comments

Also the number of integer partitions of n whose right half (inclusive) sums to n-k.

Examples

			Triangle begins:
  1
  1  0
  1  1  0
  1  1  1  0
  1  0  3  1  0
  1  0  2  3  1  0
  1  0  1  4  4  1  0
  1  0  0  3  6  4  1  0
  1  0  0  1  7  7  5  1  0
  1  0  0  1  4  8 10  5  1  0
  1  0  0  0  3  6 14 11  6  1  0
  1  0  0  0  1  5 12 16 14  6  1  0
  1  0  0  0  1  2 12 14 23 16  7  1  0
  1  0  0  0  0  2  7 13 24 27 19  7  1  0
  1  0  0  0  0  1  5  9 24 30 35 21  8  1  0
  1  0  0  0  0  1  3  7 17 31 42 40 25  8  1  0
  1  0  0  0  0  0  2  4 16 23 46 51 51 27  9  1  0
  1  0  0  0  0  0  1  3 10 21 37 57 69 57 31  9  1  0
  1  0  0  0  0  0  1  2  7 15 34 47 83 81 69 34 10  1  0
For example, row n = 9 counts the following partitions:
  (9)  .  .  (333)  (432)        (54)        (63)      (72)    (81)
                    (441)        (522)       (621)     (711)
                    (22221)      (531)       (3321)    (4311)
                    (111111111)  (3222)      (4221)    (5211)
                                 (32211)     (33111)   (6111)
                                 (2211111)   (42111)
                                 (3111111)   (51111)
                                 (21111111)  (222111)
                                             (321111)
                                             (411111)
For example, the partition y = (3,2,2,1,1) has left half (exclusive) (3,2), with sum 5, so y is counted under T(9,5).
		

Crossrefs

Row sums are A000041.
Column sums are A360673, inclusive A360671.
The central diagonal T(2n,n) is A360674, ranks A360953.
The left inclusive version is A360675 with rows reversed.
A008284 counts partitions by length.
A359893 and A359901 count partitions by median.
First for prime indices, second for partitions, third for prime factors:
- A360676 gives left sum (exclusive), counted by A360672, product A361200.
- A360677 gives right sum (exclusive), counted by A360675, product A361201.
- A360678 gives left sum (inclusive), counted by A360675, product A347043.
- A360679 gives right sum (inclusive), counted by A360672, product A347044.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], Total[Take[#,Floor[Length[#]/2]]]==k&]],{n,0,10},{k,0,n}]

A360675 Triangle read by rows where T(n,k) is the number of integer partitions of n whose right half (exclusive) sums to k, where k ranges from 0 to n.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 0, 0, 1, 2, 2, 0, 0, 1, 3, 3, 0, 0, 0, 1, 3, 5, 2, 0, 0, 0, 1, 4, 6, 4, 0, 0, 0, 0, 1, 4, 9, 5, 3, 0, 0, 0, 0, 1, 5, 10, 10, 4, 0, 0, 0, 0, 0, 1, 5, 13, 12, 9, 2, 0, 0, 0, 0, 0, 1, 6, 15, 18, 11, 5, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Gus Wiseman, Feb 27 2023

Keywords

Comments

Also the number of integer partitions of n whose left half (inclusive) sums to n-k.

Examples

			Triangle begins:
  1
  1  0
  1  1  0
  1  2  0  0
  1  2  2  0  0
  1  3  3  0  0  0
  1  3  5  2  0  0  0
  1  4  6  4  0  0  0  0
  1  4  9  5  3  0  0  0  0
  1  5 10 10  4  0  0  0  0  0
  1  5 13 12  9  2  0  0  0  0  0
  1  6 15 18 11  5  0  0  0  0  0  0
  1  6 18 22 20  6  4  0  0  0  0  0  0
  1  7 20 29 26 13  5  0  0  0  0  0  0  0
  1  7 24 34 37 19 11  2  0  0  0  0  0  0  0
  1  8 26 44 46 30 16  5  0  0  0  0  0  0  0  0
  1  8 30 50 63 40 27  8  4  0  0  0  0  0  0  0  0
  1  9 33 61 75 61 36 15  6  0  0  0  0  0  0  0  0  0
  1  9 37 70 96 75 61 21 12  3  0  0  0  0  0  0  0  0  0
For example, row n = 9 counts the following partitions:
  (9)  (81)   (72)     (63)       (54)
       (441)  (432)    (333)      (3222)
       (531)  (522)    (3321)     (21111111)
       (621)  (4311)   (4221)     (111111111)
       (711)  (5211)   (22221)
              (6111)   (222111)
              (32211)  (321111)
              (33111)  (411111)
              (42111)  (2211111)
              (51111)  (3111111)
For example, the partition y = (3,2,2,1,1) has right half (exclusive) (1,1), with sum 2, so y is counted under T(9,2).
		

Crossrefs

The central diagonal T(2n,n) is A000005.
Row sums are A000041.
Diagonal sums are A360671, exclusive A360673.
The right inclusive version is A360672 with rows reversed.
The left version has central diagonal A360674, ranks A360953.
A008284 counts partitions by length.
A359893 and A359901 count partitions by median.
First for prime indices, second for partitions, third for prime factors:
- A360676 gives left sum (exclusive), counted by A360672, product A361200.
- A360677 gives right sum (exclusive), counted by A360675, product A361201.
- A360678 gives left sum (inclusive), counted by A360675, product A347043.
- A360679 gives right sum (inclusive), counted by A360672, product A347044.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], Total[Take[#,-Floor[Length[#]/2]]]==k&]],{n,0,18},{k,0,n}]

A360673 Number of multisets of positive integers whose right half (exclusive) sums to n.

Original entry on oeis.org

1, 2, 7, 13, 27, 37, 73, 89, 156, 205, 315, 387, 644, 749, 1104, 1442, 2015, 2453, 3529, 4239, 5926, 7360, 9624, 11842, 16115, 19445, 25084, 31137, 39911, 48374, 62559, 75135, 95263, 115763, 143749, 174874, 218614, 261419, 321991, 388712, 477439, 569968, 698493
Offset: 0

Views

Author

Gus Wiseman, Mar 04 2023

Keywords

Examples

			The a(0) = 1 through a(3) = 13 multisets:
  {}  {1,1}    {1,2}        {1,3}
      {1,1,1}  {2,2}        {2,3}
               {1,1,2}      {3,3}
               {1,2,2}      {1,1,3}
               {2,2,2}      {1,2,3}
               {1,1,1,1}    {1,3,3}
               {1,1,1,1,1}  {2,2,3}
                            {2,3,3}
                            {3,3,3}
                            {1,1,1,2}
                            {1,1,1,1,2}
                            {1,1,1,1,1,1}
                            {1,1,1,1,1,1,1}
For example, the multiset y = {1,1,1,1,2} has right half (exclusive) {1,2}, with sum 3, so y is counted under a(3).
		

Crossrefs

The inclusive version is A360671.
Column sums of A360672.
The case of sets is A360954, inclusive A360955.
The even-length case is A360956.
A359893 and A359901 count partitions by median.
First for prime indices, second for partitions, third for prime factors:
- A360676 gives left sum (exclusive), counted by A360672, product A361200.
- A360677 gives right sum (exclusive), counted by A360675, product A361201.
- A360678 gives left sum (inclusive), counted by A360675, product A347043.
- A360679 gives right sum (inclusive), counted by A360672, product A347044.

Programs

  • Mathematica
    Table[Length[Select[Join@@IntegerPartitions/@Range[0,3*k], Total[Take[#,Floor[Length[#]/2]]]==k&]],{k,0,15}]
  • PARI
    seq(n)={my(s=1 + O(x*x^n), p=s); for(k=1, n, s += p*x^k*(2-x^k)/(1-x^k + O(x*x^(n-k)))^(k+2); p /= 1 - x^k); Vec(s)} \\ Andrew Howroyd, Mar 11 2023

Formula

G.f.: 1 + Sum_{k>=1} x^k*(2 - x^k)/((1 - x^k)^(k+2) * Product_{j=1..k-1} (1-x^j)). - Andrew Howroyd, Mar 11 2023

Extensions

Terms a(21) and beyond from Andrew Howroyd, Mar 11 2023

A360674 Number of integer partitions of 2n whose left half (exclusive) and right half (inclusive) both sum to n.

Original entry on oeis.org

1, 1, 3, 4, 7, 6, 12, 9, 16, 15, 21, 16, 34, 22, 33, 36, 47, 36, 62, 44, 75, 68, 78, 68, 120, 93, 113, 117, 151, 122, 195, 148, 209, 197, 220, 226, 315, 249, 304, 309, 402, 332, 463, 387, 496, 515, 539, 514, 712, 609, 738, 723, 845, 774, 983, 914, 1111
Offset: 0

Views

Author

Gus Wiseman, Mar 04 2023

Keywords

Comments

Of course, only one of the two conditions is necessary.

Examples

			The a(1) = 1 through a(6) = 12 partitions:
  (11)  (22)    (33)      (44)        (55)          (66)
        (211)   (321)     (422)       (532)         (633)
        (1111)  (21111)   (431)       (541)         (642)
                (111111)  (2222)      (32221)       (651)
                          (22211)     (211111111)   (3333)
                          (2111111)   (1111111111)  (33222)
                          (11111111)                (33321)
                                                    (42222)
                                                    (222222)
                                                    (2222211)
                                                    (21111111111)
                                                    (111111111111)
For example, the partition y = (3,2,2,2,1) has halves (3,2) and (2,2,1), both with sum 5, so y is counted under a(5).
		

Crossrefs

The even-length case is A000005.
Central diagonal of A360672.
These partitions have ranks A360953.
A008284 counts partitions by length, row sums A000041.
A359893 and A359901 count partitions by median.
First for prime indices, second for partitions, third for prime factors:
- A360676 gives left sum (exclusive), counted by A360672, product A361200.
- A360677 gives right sum (exclusive), counted by A360675, product A361201.
- A360678 gives left sum (inclusive), counted by A360675, product A347043.
- A360679 gives right sum (inclusive), counted by A360672, product A347044.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[2n], Total[Take[#,Floor[Length[#]/2]]]==n&]],{n,0,15}]
  • Python
    def accel_asc(n):
        a = [0 for i in range(n + 1)]
        k = 1
        y = n - 1
        while k != 0:
            x = a[k - 1] + 1
            k -= 1
            while 2 * x <= y:
                a[k] = x
                y -= x
                k += 1
            l = k + 1
            while x <= y:
                a[k] = x
                a[l] = y
                yield a[:k + 2]
                x += 1
                y -= 1
            a[k] = x + y
            y = x + y - 1
            yield a[:k + 1]
    for y in range(1000):
        num = 0
        for x in accel_asc(2*y):
            stop = len(x)//2+1
            if len(x) % 2 == 0:
                stop -= 1
            right = x[0:stop]
            left = x[stop:]
            if sum(right) == sum(left):
                num += 1
        print(y,num)
    # David Consiglio, Jr., Mar 09 2023

Formula

a(n) = A360672(2n,n).

Extensions

More terms from David Consiglio, Jr., Mar 09 2023
Showing 1-4 of 4 results.