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-3 of 3 results.

A232697 Number of partitions of 2n into parts such that the largest multiplicity equals n.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 5, 5, 8, 9, 13, 15, 22, 25, 35, 42, 56, 67, 89, 106, 138, 166, 211, 254, 321, 384, 479, 575, 709, 848, 1040, 1239, 1508, 1795, 2168, 2574, 3095, 3661, 4379, 5171, 6154, 7246, 8592, 10088, 11915, 13960, 16425, 19197, 22520, 26253, 30702, 35718
Offset: 0

Views

Author

Alois P. Heinz, Nov 27 2013

Keywords

Examples

			a(1) = 1: [2].
a(2) = 2: [2,2], [2,1,1].
a(3) = 2: [2,2,2], [3,1,1,1].
a(4) = 3: [2,2,2,2], [2,2,1,1,1,1], [4,1,1,1,1].
a(5) = 3: [2,2,2,2,2], [3,2,1,1,1,1,1], [5,1,1,1,1,1].
a(6) = 5: [2,2,2,2,2,2], [2,2,2,1,1,1,1,1,1], [3,3,1,1,1,1,1,1], [4,2,1,1,1,1,1,1], [6,1,1,1,1,1,1].
		

Crossrefs

Partial sums give A133041.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, 1,
          `if`(i>n, 0, add(b(n-i*j, i+1, min(k,
           iquo(n-i*j, i+1))), j=0..min(n/i, k))))
        end:
    a:= n-> b(2*n, 1, n)-`if`(n=0, 0, b(2*n, 1, n-1)):
    seq(a(n), n=0..60);
  • Mathematica
    CoefficientList[x/(1-x) + (1-x)/QPochhammer[x] + O[x]^60, x] (* Jean-François Alcover, Dec 18 2016 *)

Formula

G.f.: x/(1-x) + Product_{k>=2} 1/(1-x^k).
a(0) = 1, a(n) = 1 + A002865(n) = 1 + A000041(n)-A000041(n-1) for n>0.
a(n) = A091602(2n,n) = A096144(2n,n).
a(n) ~ Pi * exp(Pi*sqrt(2*n/3)) / (3 * 2^(5/2) * n^(3/2)). - Vaclav Kotesovec, Oct 25 2018

A232665 Number of compositions of 2n such that the largest multiplicity of parts equals n.

Original entry on oeis.org

1, 1, 4, 5, 21, 49, 176, 513, 1720, 5401, 17777, 57421, 188657, 617177, 2033176, 6697745, 22139781, 73262233, 242931322, 806516561, 2681475049, 8925158441, 29740390673, 99196158145, 331163178476, 1106489052969, 3699881730901, 12380449027325, 41454579098853
Offset: 0

Views

Author

Alois P. Heinz, Nov 27 2013

Keywords

Comments

a(n) = A238342(2n,n) = A242447(2n,n).

Examples

			a(1) = 1: [2].
a(2) = 4: [2,2], [1,2,1], [2,1,1], [1,1,2].
a(3) = 5: [2,2,2], [1,3,1,1], [1,1,3,1], [3,1,1,1], [1,1,1,3].
a(4) = 21: [2,2,2,2], [1,1,4,1,1], [4,1,1,1,1], [1,4,1,1,1], [1,1,1,4,1], [1,1,1,1,4], [1,2,1,1,1,2], [2,1,1,1,1,2], [2,1,2,1,1,1], [1,2,2,1,1,1],[1,2,1,2,1,1], [2,1,1,2,1,1], [1,2,1,1,2,1], [2,1,1,1,2,1],[1,1,2,1,2,1], [1,1,2,2,1,1], [2,2,1,1,1,1], [1,1,1,2,2,1], [1,1,2,1,1,2], [1,1,1,2,1,2], [1,1,1,1,2,2].
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember;
         `if`(n<5, [1, 1, 4, 5, 21][n+1],
          ((n-1)*(14911*n^4 -102036*n^3 +249203*n^2
           -252880*n +87794) *a(n-1)
          +(27528*n^5 -239548*n^4 +803564*n^3 -1283816*n^2
           +963472*n -266160) *a(n-2)
          -2*(2*n-5)*(10323*n^4 -62876*n^3 +136848*n^2
           -125584*n +40329) *a(n-3)
          +2*(2*n-7)*(n-2)*(1147*n^3 -4055*n^2 +4742*n
           -1762) *a(n-4)) / (5*(n-1)*n*
          (1147*n^3 -7496*n^2 +16293*n -11706)))
        end:
    seq(a(n), n=0..35);
  • Mathematica
    b[n_, s_] := b[n, s] = If[n == 0, 1, If[nJean-François Alcover, Feb 09 2015, after A238342 *)

Formula

Recurrence: see Maple program.
a(n) ~ c*r^n/sqrt(Pi*n), where r = 3.408698199842151... is the root of the equation 4 - 32*r - 8*r^2 + 5*r^3 = 0 and c = 0.479880052557486135... is the root of the equation 1 + 384*c^2 - 2368*c^4 + 2960*c^6 = 0. - Vaclav Kotesovec, Nov 27 2013

A331332 Sparse ruler statistics: T(n,k) (0 <= k <= n) is the number of rulers with length n where the length of the first segment appears k times. Triangle read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 3, 0, 1, 0, 4, 3, 0, 1, 0, 8, 4, 3, 0, 1, 0, 14, 9, 4, 4, 0, 1, 0, 26, 16, 12, 4, 5, 0, 1, 0, 46, 34, 21, 15, 5, 6, 0, 1, 0, 85, 64, 45, 28, 20, 6, 7, 0, 1, 0, 155, 124, 90, 64, 36, 27, 7, 8, 0, 1, 0, 286, 236, 183, 128, 90, 48, 35, 8, 9, 0, 1, 0, 528, 452, 361, 269, 185, 126, 63, 44, 9, 10, 0, 1
Offset: 0

Views

Author

Peter Luschny, Jan 24 2020

Keywords

Comments

A sparse ruler, or simply a ruler, is a strict increasing finite sequence of nonnegative integers starting from 0 called marks. See A103294 for more definitions.

Examples

			Triangle starts:
[ 0][1]
[ 1][0,   1]
[ 2][0,   1,   1]
[ 3][0,   3,   0,  1]
[ 4][0,   4,   3,  0,  1]
[ 5][0,   8,   4,  3,  0,  1]
[ 6][0,  14,   9,  4,  4,  0,  1]
[ 7][0,  26,  16, 12,  4,  5,  0, 1]
[ 8][0,  46,  34, 21, 15,  5,  6, 0, 1]
[ 9][0,  85,  64, 45, 28, 20,  6, 7, 0, 1]
[10][0, 155, 124, 90, 64, 36, 27, 7, 8, 0, 1]
		

Crossrefs

Columns k=0-1 give: A000007, A331330.
Row sums give A011782.
Row sums over even columns give A331609 (for n>0).
Row sums over odd columns give A331606 (for n>0).
T(2n,n) gives A332051.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, x, add(expand(
         `if`(i=j, x, 1)*b(n-j, `if`(n (p-> seq(coeff(p, x, i), i=0..degree(p)))(
                `if`(n=0, 1, add(b(n-j, j), j=1..n))):
    seq(T(n), n=0..12);  # Alois P. Heinz, Feb 06 2020
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, x, Sum[Expand[If[i == j, x, 1] b[n - j, If[n < i + j, 0, i]]], {j, 1, n}]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][ If[n == 0, 1, Sum[b[n - j, j], {j, 1, n}]]];
    T /@ Range[0, 12] // Flatten (* Jean-François Alcover, Nov 08 2020, after Alois P. Heinz *)
  • SageMath
    def A331332_row(n):
        if n == 0: return [1]
        L = [0 for k in (0..n)]
        for c in Compositions(n):
            L[list(c).count(c[0])] += 1
        return L
    for n in (0..10): print(A331332_row(n))

Formula

Sum_{k=1..n} k * T(n,k) = A175656(n-1) for n>0. - Alois P. Heinz, Feb 07 2020
Showing 1-3 of 3 results.