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

A270060 Number of incomplete rectangles of area n.

Original entry on oeis.org

0, 0, 1, 1, 3, 3, 6, 7, 9, 11, 14, 15, 19, 22, 23, 28, 30, 34, 36, 41, 42, 51, 49, 57, 55, 68, 64, 75, 71, 84, 79, 95, 89, 106, 92, 116, 104, 127, 116, 134, 121, 150, 130, 160, 143, 172, 148, 188, 156, 193, 177, 209, 177, 226, 185, 231, 210, 246, 207, 269, 218, 272, 239, 287, 238, 312, 250, 317, 279, 320, 271, 359, 283, 355, 316
Offset: 1

Views

Author

Stanislav Mikusek, Mar 09 2016

Keywords

Comments

An incomplete rectangle is a six-sided figure obtained when two rectangles with different widths are coupled together so that two of the edges form a straight line.
In other words, this shape is a rectangle from which a smaller rectangle has been removed from one corner.
Incomplete rectangles which differ by a rotation and/or reflection are not counted as different.
Also the number of integer partitions of n into parts of 2 distinct sizes, where any integer partition and its conjugate are considered equivalent. For example a(8)=7 counts (7,1), (6,2), (6,1,1), (5,3), (5,1,1,1), (4,2,2), and (3,3,2).
The unit squares composing the incomplete rectangle can be viewed as the boxes of a Ferrers diagram of an integer partition of n with 2 different sizes of rows. A002133(n) counts all Ferrers diagrams with 2 different sizes of rows. A100073(n) counts all self-conjugate Ferrers diagrams with 2 different sizes of rows since these Ferrers diagrams look like a square with a smaller square removed from the corner. Thus a(n)=(A002133(n)+A100073(n))/2. Lara Pudwell, Apr 03 2016

Examples

			n = 3
.___.
| ._|
|_|
.
n = 4
._____.
| .___|
|_|
.
n = 5
._______. ._____. ._____.
| ._____| |   ._| | .___|
|_|       |___|   | |
                  |_|
.
The three solutions for n = 6:
XXXXX
X
.....
XXXX
XX
.....
XXXX
X
X
.....
		

Crossrefs

Cf. A038548 (number of complete rectangles of area n), A002133, A100073, A067627.

Programs

  • Maple
    # see A067627(n,k=2).
  • Pseudocode
    /* rectangle : LL = long side, SS = short side
    removed corner : L = long side, S = short side */
    {
    int a[100];
    int LL,SS,L,S,area;
    for(area:=1;area<=100;area++){
    a[area]:=0;
    };
    for(LL:=1;LL<=100;LL++){
    for(SS:=1;SS<=LL;SS++){
      for(L:=1;L<=LL;L++){
        for(S:=1;S<=LL;S++){
          area=LL*SS-L*S;
          if( area>=1 && area<=100 ){
            if( L>=S || LSS ){
              a[area]++;
            };
          };
        };
      };
    };
    };
    for(area:=1;area<=100;area++){
      print a[area];
    };
    }

Formula

a(n)=(A002133(n)+A100073(n))/2. See the integer partition comment above. Lara Pudwell, Apr 03 2016
G.f.: sum(sum(x^(i+j)/(2*(1-x^i)*(1-x^j))+x^(i^2-j^2)/2,j=1..i-1),i=1..infinity). See the integer partition comment above. Lara Pudwell, Apr 03 2016

A363129 Number of integer partitions of n with a unique non-co-mode.

Original entry on oeis.org

0, 0, 0, 0, 1, 3, 3, 9, 12, 18, 24, 37, 43, 64, 81, 99, 129, 162, 201, 247, 303, 364, 457, 535, 653, 765, 943, 1085, 1315, 1517, 1830, 2096, 2516, 2877, 3432, 3881, 4622, 5235, 6189, 7003, 8203, 9261, 10859, 12199, 14216, 15985, 18544, 20777, 24064, 26897
Offset: 0

Views

Author

Gus Wiseman, May 18 2023

Keywords

Comments

We define a non-co-mode in a multiset to be an element that appears more times than at least one of the others. For example, the non-co-modes in {a,a,b,b,b,c,d,d,d} are {a,b,d}.

Examples

			The a(4) = 1 through a(9) = 18 partitions:
  (211)  (221)   (411)    (322)     (332)      (441)
         (311)   (3111)   (331)     (422)      (522)
         (2111)  (21111)  (511)     (611)      (711)
                          (2221)    (3221)     (3222)
                          (3211)    (4211)     (3321)
                          (4111)    (5111)     (4221)
                          (22111)   (22211)    (4311)
                          (31111)   (32111)    (5211)
                          (211111)  (41111)    (6111)
                                    (221111)   (22221)
                                    (311111)   (33111)
                                    (2111111)  (42111)
                                               (51111)
                                               (321111)
                                               (411111)
                                               (2211111)
                                               (3111111)
                                               (21111111)
		

Crossrefs

For parts instead of multiplicities we have A002133.
For middles instead of non-co-modes we have A238478, complement A238479.
For modes instead of non-co-modes we have A362608, complement A362607.
For co-modes instead of non-co-modes we have A362610, complement A362609.
For non-modes instead of non-co-modes we have A363125, complement A363124.
The complement is counted by A363128.
A000041 counts integer partitions.
A008284/A058398 count partitions by length/mean.
A362611 counts modes in prime factorization, triangle A362614.
A362613 counts co-modes in prime factorization, triangle A362615.
A363127 counts non-modes in prime factorization, triangle A363126.
A363131 counts non-co-modes in prime factorization, triangle A363130.

Programs

  • Mathematica
    ncomsi[ms_]:=Select[Union[ms],Count[ms,#]>Min@@Length/@Split[ms]&];
    Table[Length[Select[IntegerPartitions[n],Length[ncomsi[#]]==1&]],{n,0,30}]

A365630 Number of partitions of n with exactly four part sizes.

Original entry on oeis.org

1, 2, 5, 10, 20, 30, 52, 77, 117, 162, 227, 309, 414, 535, 692, 873, 1100, 1369, 1661, 2030, 2438, 2925, 3450, 4108, 4759, 5570, 6440, 7457, 8491, 9798, 11020, 12593, 14125, 15995, 17820, 20074, 22182, 24833, 27379, 30422, 33351, 36996, 40346, 44445, 48336, 53048, 57494
Offset: 10

Views

Author

Seiichi Manyama, Sep 13 2023

Keywords

Examples

			a(11) = 2 because we have 5+3+2+1, 4+3+2+1+1.
		

Crossrefs

A diagonal of A060177.
Column k=4 of A116608.

Programs

  • Maple
    # Using function P from A365676:
    A365630 := n -> P(n, 4, n): seq(A365630(n), n = 10..56); # Peter Luschny, Sep 15 2023
  • Python
    from sympy.utilities.iterables import partitions
    def A365630(n): return sum(1 for p in partitions(n) if len(p)==4) # Chai Wah Wu, Sep 14 2023

Formula

G.f.: Sum_{0

A365631 Number of partitions of n with exactly five part sizes.

Original entry on oeis.org

1, 2, 5, 10, 20, 36, 58, 95, 147, 222, 323, 462, 636, 889, 1184, 1584, 2060, 2686, 3403, 4353, 5433, 6768, 8319, 10230, 12363, 15011, 17943, 21467, 25403, 30044, 35231, 41294, 48002, 55718, 64328, 74086, 84880, 97071, 110607, 125692, 142313, 160728, 181112, 203438, 228124
Offset: 15

Author

Seiichi Manyama, Sep 13 2023

Keywords

Examples

			a(16) = 2 because we have 6+4+3+2+1, 5+4+3+2+1+1.
		

Crossrefs

A diagonal of A060177.
Column k=5 of A116608.
Cf. A364809.

Programs

  • Maple
    # Using function P from A365676:
    A365631 := n -> P(n, 5, n): seq(A365631(n), n = 15..59); # Peter Luschny, Sep 15 2023
  • Python
    from sympy.utilities.iterables import partitions
    def A365631(n): return sum(1 for p in partitions(n) if len(p)==5) # Chai Wah Wu, Sep 14 2023

Formula

G.f.: Sum_{0

A088142 Number of partitions of n-set with 2 block sizes.

Original entry on oeis.org

3, 10, 50, 116, 560, 1730, 6123, 30122, 116908, 507277, 2492737, 15328119, 56182092, 441156796, 2093130576, 15965840718, 77353276330, 693400983344, 3517825829117, 35126205660152, 187347585491624, 1952969742765476
Offset: 3

Author

Vladeta Jovovic, Nov 02 2003

Keywords

Crossrefs

Column k=2 of A208437.

Programs

  • Maple
    with(numtheory): with(combinat):
    a:= n-> add(add(add(multinomial(n, i$j, d$((n-i*j)/d))/j!/((n-i*j)/d)!,
            d=select(x->xAlois P. Heinz, Feb 01 2014
  • Mathematica
    max = 25; G[x_] = Sum[Exp[x^k/k!]-1, {k, 1, max}]; H[x_] = Sum[(Exp[x^k/k!]-1)^2, {k, 1, max}]; Drop[CoefficientList[(G[x]^2-H[x])/2 + O[x]^max, x]*Range[0, max-1]!, 3] (* Jean-François Alcover, Jul 01 2015 *)

Formula

E.g.f.: (G(x)^2-H(x))/2 where G(x) = Sum {k>=1} (exp(x^k/k!)-1) and H(x) = Sum {k>=1} (exp(x^k/k!)-1)^2. - Vladeta Jovovic, Sep 18 2007

A117955 Number of partitions of n into exactly 2 types of odd parts.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 3, 5, 4, 7, 8, 10, 11, 13, 12, 19, 18, 20, 22, 25, 24, 30, 31, 36, 33, 39, 38, 45, 45, 48, 51, 57, 54, 60, 56, 69, 67, 72, 72, 79, 78, 84, 84, 90, 87, 97, 97, 112, 99, 107, 112, 117, 115, 126, 118, 131, 134, 137, 136, 152, 143, 149, 149, 163, 152, 174, 164
Offset: 1

Author

Emeric Deutsch, Apr 05 2006

Keywords

Examples

			a(8)=5 because we have [7,1],[5,3],[5,1,1,1],[3,3,1,1] and [3,3,1,1].
		

Crossrefs

Cf. A002133.

Programs

  • Maple
    g:=sum(sum(x^(2*i+2*j-2)/(1-x^(2*i-1))/(1-x^(2*j-1)),j=1..i-1),i=1..40): gser:=series(g,x=0,75): seq(coeff(gser,x^n),n=1..72);
  • Mathematica
    With[{nmax = 60}, CoefficientList[Series[Sum[Sum[x^(2*k+2*j-2)/((1-x^(2*k -1))*(1-x^(2*j-1))), {j, 1, k-1}], {k, 1, 3*nmax}], {x, 0, nmax}], x]] (* G. C. Greubel, Oct 05 2018 *)
  • Python
    from sympy import divisors
    def A117955(n): return sum(1 for ax in range(1,n-1) for a in divisors(ax,generator=True) for b in divisors(n-ax,generator=True) if aChai Wah Wu, Dec 14 2024

Formula

G.f.: sum(sum(x^(2i+2j-2)/[(1-x^(2i-1))(1-x^(2j-1))], j=1..i-1), i=1..infinity).
G.f. for number of partitions of n into exactly m types of odd parts is obtained if we substitute x(i) with -Sum_{k>0}(x^(2*n-1)/(x^(2*n-1)-1))^i in the cycle index Z(S(m); x(1),x(2),..,x(m)) of the symmetric group S(m) of degree m. - Vladeta Jovovic, Sep 20 2007

A265250 Number of partitions of n having no parts strictly between the smallest and the largest part (n>=1).

Original entry on oeis.org

1, 2, 3, 5, 7, 10, 13, 17, 20, 26, 29, 35, 39, 48, 48, 60, 61, 74, 73, 87, 86, 106, 99, 120, 112, 140, 130, 155, 143, 176, 159, 194, 180, 216, 186, 240, 209, 258, 234, 274, 243, 308, 261, 325, 289, 348, 297, 383, 314, 392, 356, 423, 355, 460, 372, 468, 422
Offset: 1

Author

Emeric Deutsch, Dec 25 2015

Keywords

Examples

			a(3) = 3 because we have [3], [1,2], [1,1,1] (all partitions of 3).
a(6) = 10 because we have all A000041(6) = 11 partitions of 6 except [1,2,3].
a(7) = 13 because we have all A000041(7) = 15 partitions of 7 except [1,2,4] and [1,1,2,3].
		

Crossrefs

Programs

  • Maple
    g := add(x^i/(1-x^i), i = 1 .. 80)+add(add(x^(i+j)/((1-x^i)*(1-x^j)), j = i+1..80),i=1..80): gser := series(g,x=0,60): seq(coeff(gser,x,n),n=1..50);
    # second Maple program:
    b:= proc(n, i, t) option remember; `if`(n=0, 1, `if`(i<1, 0,
          `if`(t=1, `if`(irem(n, i)=0, 1, 0)+b(n, i-1, t),
           add(b(n-i*j, i-1, t-`if`(j=0, 0, 1)), j=0..n/i))))
        end:
    a:= n-> b(n$2, 2):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jan 01 2016
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = If[n == 0, 1, If[i < 1, 0, If[t == 1, If[Mod[n, i] == 0, 1, 0] + b[n, i - 1, t], Sum[b[n - i*j, i - 1, t - If[j == 0, 0, 1]], {j, 0, n/i}]]]]; a[n_] := b[n, n, 2]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Dec 22 2016, after Alois P. Heinz *)

Formula

a(n) = A265249(n,0).
G.f.: G(x) = Sum_{i>=1} x^i/(1-x^i) + Sum_{i>=1} Sum_{j>=i+1} x^(i+j)/ ((1-x^i)*(1-x^j)).
a(n) = A116608(n,1) + A116608(n,2) = A000005(n) + A002133(n). - Seiichi Manyama, Sep 14 2023

A117956 Number of partitions of n into exactly 2 types of parts: one odd and one even.

Original entry on oeis.org

0, 0, 1, 1, 4, 3, 8, 6, 13, 10, 19, 13, 26, 20, 32, 23, 41, 31, 49, 34, 58, 45, 66, 47, 76, 60, 88, 60, 96, 76, 106, 76, 122, 93, 126, 94, 140, 111, 158, 106, 163, 134, 175, 127, 196, 150, 198, 149, 212, 170, 240, 164, 238, 200, 250, 180, 284, 214, 277, 216, 292, 238
Offset: 1

Author

Emeric Deutsch, Apr 05 2006

Keywords

Examples

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

Crossrefs

Programs

  • Magma
    m:=80; R:=PowerSeriesRing(Integers(), m); [0,0] cat Coefficients(R!((&+[(&+[x^(2*k + 2*j - 2)/((1 - x^(2*k - 1))*(1 - x^(2*j))): j in [1..100]]): k in [1..100]]))); // G. C. Greubel, Oct 06 2018
    
  • Maple
    g := add(add(x^(2*i+2*j-1)/(1-x^(2*i-1))/(1-x^(2*j)), j=1..70), i=1..70):
    gser:=series(g, x=0, 70): seq(coeff(gser, x^n), n=1..67);
  • Mathematica
    With[{nmax = 80}, CoefficientList[Series[Sum[Sum[x^(2*k + 2*j - 2)/((1 - x^(2*k - 1))*(1 - x^(2*j))), {j, 1, 2*nmax}], {k, 1, 2*nmax}], {x, 0, nmax}], x]] (* G. C. Greubel, Oct 06 2018 *)
  • PARI
    my(x='x+O('x^80)); concat([0,0], Vec(sum(k=1,100, sum(j=1,100, x^(2*k + 2*j - 2)/((1 - x^(2*k - 1))*(1 - x^(2*j))))))) \\ G. C. Greubel, Oct 06 2018
    
  • Python
    from sympy import divisors
    def A117956(n): return sum(1 for ax in range(1,n-1) for a in divisors(ax,generator=True) for b in divisors(n-ax,generator=True) if aChai Wah Wu, Dec 14 2024

Formula

G.f.: Sum_{i>=1} Sum{j>=1} x^(2*i+2*j-1)/((1-x^(2*i-1))*(1-x^(2*j))).
Convolution of x(n) and y(n), where x(n) is the number of even divisors of n and y(n) is the number of odd divisors of n. - Vladeta Jovovic, Apr 05 2006

A131661 Number of compositions of n such that the cardinality of the set of parts is 2.

Original entry on oeis.org

0, 0, 2, 5, 14, 22, 44, 68, 107, 172, 261, 396, 606, 950, 1414, 2238, 3418, 5411, 8368, 13297, 20840, 33268, 52549, 84120, 133775, 214611, 343025, 551064, 883600, 1421767, 2284870, 3680296, 5924725, 9551161, 15393855, 24834827, 40061700
Offset: 1

Author

Vladeta Jovovic, Sep 13 2007

Keywords

Crossrefs

Column k=2 of A235998.
Cf. A242900 (with distinct multiplicities).

Programs

  • Maple
    with(numtheory):
    a:= n-> add(add(add(binomial(j+(n-i*j)/d, j), d=select(x->xAlois P. Heinz, Feb 01 2014
  • Mathematica
    Rest@ CoefficientList[ Series[ Sum[ x^(i + j)*(x^i + x^j - 2)/((x^i - 1)*(x^j - 1)*(x^i + x^j - 1)), {i, 2, 37}, {j, i - 1}], {x, 0, 37}], x] (* Robert G. Wilson v, Sep 16 2007 *)

Formula

G.f.: Sum(Sum(x^(i+j)*(x^i+x^j-2)/((x^i-1)*(x^j-1)*(x^i+x^j-1)), j=1..i-1), i=2..infinity).
a(n) ~ 1/sqrt(5) * ((1+sqrt(5))/2)^(n+1). - Vaclav Kotesovec, May 01 2014

Extensions

More terms from Robert G. Wilson v, Sep 16 2007

A191822 Number of solutions to the Diophantine equation x1*x2 + x2*x3 + x3*x4 + x4*x5 = n, with all xi >= 1.

Original entry on oeis.org

0, 0, 0, 1, 2, 6, 8, 16, 20, 32, 36, 58, 58, 86, 92, 125, 122, 178, 164, 228, 224, 286, 268, 382, 330, 436, 424, 534, 474, 660, 556, 740, 692, 840, 752, 1043, 846, 1094, 1032, 1276, 1078, 1476, 1204, 1582, 1458, 1710, 1480, 2070, 1628, 2096, 1924, 2332, 1946, 2652, 2148, 2770, 2480, 2908, 2480, 3512
Offset: 1

Author

N. J. A. Sloane, Jun 17 2011

Keywords

Comments

Related to "Liouville's Last Theorem".

Examples

			G.f.: x^4 + 2 x^5 + 6 x^6 + 8 x^7 + 16 x^8 + 20 x^9 + 32 x^10 + ...
		

Crossrefs

Programs

  • Maple
    with(numtheory);
    D00:=n->add(tau(j)*tau(n-j),j=1..n-1);
    L4:=n->sigma[2](n)-n*sigma[0](n)-D00(n);
    [seq(L4(n),n=1..60)];
  • Mathematica
    a[ n_] := Length @ FindInstance[{x1 > 0, x2 > 0, x3 > 0, x4 > 0, x5 > 0, n == x1 x2 + x2 x3 + x3 x4 + x4 x5}, {x1, x2, x3, x4, x5}, Integers, 10^9]; (* Michael Somos, Nov 12 2016 *)

Formula

a(n) = sigma_2(n) - n*sigma_0(n) - A055507(n-1).
Previous Showing 11-20 of 33 results. Next