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

A231148 Array of coefficients of numerator polynomials of the rational function p(n, x - 1/x), where p(n,x) = (x^n - 1)/(x - 1).

Original entry on oeis.org

1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 2, -1, -2, 1, 1, 1, -1, -3, 2, 5, -2, -3, 1, 1, -1, 1, 4, -3, -8, 5, 8, -3, -4, 1, 1, 1, -1, -5, 4, 12, -8, -15, 8, 12, -4, -5, 1, 1, -1, 1, 6, -5, -17, 12, 27, -15, -27, 12, 17, -5, -6, 1, 1, 1, -1, -7, 6, 23, -17, -44
Offset: 1

Views

Author

Clark Kimberling, Nov 05 2013

Keywords

Examples

			First 4 rows:
1
-1 1 1
1 -1 -1 1 1
-1 1 2 -1 -2 1 1
First 4 polynomials: 1, -1 + x + x^2, 1 - x - x^2 + x^3 + x^4
		

Crossrefs

Cf. A231147.

Programs

  • Mathematica
    z = 60; p[n_, x_] := p[x] = (x^n - 1)/(x - 1); Table[p[n, x], {n, 1, z/4}]; f1[n_, x_] := f1[n, x] = Numerator[Factor[p[n, x] /. x -> x - 1/x]]; Table[Expand[f1[n, x]], {n, 0, z/4}]
    Flatten[Table[CoefficientList[f1[n, x], x], {n, 1, z/4}]]

A361863 Number of set partitions of {1..n} such that the median of medians of the blocks is (n+1)/2.

Original entry on oeis.org

1, 2, 3, 9, 26, 69, 335, 1018, 6629, 22805, 182988, 703745
Offset: 1

Views

Author

Gus Wiseman, Apr 04 2023

Keywords

Comments

The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).
Since (n+1)/2 is the median of {1..n}, this sequence counts "transitive" set partitions.

Examples

			The a(1) = 1 through a(4) = 9 set partitions:
  {{1}}  {{12}}    {{123}}      {{1234}}
         {{1}{2}}  {{13}{2}}    {{12}{34}}
                   {{1}{2}{3}}  {{124}{3}}
                                {{13}{24}}
                                {{134}{2}}
                                {{14}{23}}
                                {{1}{23}{4}}
                                {{14}{2}{3}}
                                {{1}{2}{3}{4}}
The set partition {{1,4},{2,3}} has medians {5/2,5/2}, with median 5/2, so is counted under a(4).
The set partition {{1,3},{2,4}} has medians {2,3}, with median 5/2, so is counted under a(4).
		

Crossrefs

For mean instead of median we have A361910.
A000110 counts set partitions.
A000975 counts subsets with integer median, mean A327475.
A013580 appears to count subsets by median, A327481 by mean.
A325347 counts partitions w/ integer median, complement A307683.
A359893 and A359901 count partitions by median, odd-length A359902.
A360005 gives twice median of prime indices, distinct A360457.
A361864 counts set partitions with integer median of medians, means A361865.
A361866 counts set partitions with integer sum of medians, means A361911.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]& /@ sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Length[Select[sps[Range[n]],(n+1)/2==Median[Median/@#]&]],{n,6}]

A376117 Irregular triangle of numerator polynomial coefficients of C({1..n},x), T(n,k) for n >= 0 and k >= A000217(n).

Original entry on oeis.org

1, 1, -2, -1, -6, 0, 10, 16, 4, -11, -17, -12, -5, -1, -24, 84, -60, 30, -144, -48, 104, 186, 268, -12, -240, -436, -348, -46, 262, 444, 391, 199, -23, -166, -207, -172, -109, -55, -21, -6, -1, 120, -1200, 4560, -7740, 5064, -2472, 9768, -19152, 35004, -39408
Offset: 0

Views

Author

John Tyler Rascoe, Sep 10 2024

Keywords

Examples

			For row n = 2, C({1,2},x) = (-2*x^3 - x^4)/(1 + x + 2*x^2 - x^3 - x^4).
Triangle begins
  k=0  1  2  3   4   5   6   7   8   9  10   11   12   13  14  15
n=0 1;
n=1 .  1;
n=2 .  .  . -2, -1;
n=3 .  .  .  .   .   .  -6,  0, 10, 16,  4, -11, -17, -12, -5, -1;
		

Crossrefs

Programs

  • PARI
    C_x(s)={my( g=if(#s <1, 1, sum(i=1, #s, C_x(s[^i]) * x^(s[i]) )/(1-sum(i=1, #s, x^(s[i]))))); return(g)}
    A376117_row(n)={my(t=n*(n+1)/2, c=C_x([1..n]), d=poldegree(numerator(c))-t, z=vector(d+1)); for(k=0,d,z[k+1]=polcoeff(numerator(c),k+t)); z}

Formula

C({s},x) = Sum_{i in {s}} (C({s}-{i},x)*x^i)/(1 - Sum_{i in {s}} (x^i)) with C({},x) = 1.

A231150 Array of coefficients of numerator polynomials of the rational function p(n, x^(1/2)+x^(-1/2)), where p(n,x) is the n-th Chebyshev polynomial of the 1st kind.

Original entry on oeis.org

1, 1, 2, 3, 2, 4, 9, 9, 4, 8, 24, 33, 24, 8, 16, 60, 105, 105, 60, 16, 32, 144, 306, 387, 306, 144, 32, 64, 336, 840, 1281, 1281, 840, 336, 64, 128, 768, 2208, 3936, 4737, 3936, 2208, 768, 128, 256, 1728, 5616, 11448, 16065, 16065, 11448, 5616, 1728, 256
Offset: 0

Views

Author

Clark Kimberling, Nov 08 2013

Keywords

Examples

			First 6 rows:
1
1 .... 1
2 .... 3 ..... 2
4 .... 9 ..... 9 ...... 4
8 .... 24 .... 33 .... 24 .... 8
16 ... 60 .... 105 ... 105 ... 60 ... 16
The first 4 polynomials: 1, 1 + x, 2 + 3*x + 2*x^2, 4 + 9*x + 9*x^2 + 4*x^3.
		

Crossrefs

Cf. A231147.

Programs

  • Mathematica
    z = 60; p[n_, x_] := p[n, x] = ChebyshevT[n, x]; f1[n_, x_] := f1[n, x] = Numerator[Factor[p[n, x] /. x -> Sqrt[x] + 1/Sqrt[x]]]; Table[Expand[f1[n, x]], {n, 0, z/4}]; t = Flatten[Table[CoefficientList[f1[n, x], x], {n, 1, z/4}]]

A361802 Irregular triangle read by rows where T(n,k) is the number of k-subsets of {-n+1,...,n} with sum 0, for k = 1,...,2n-1.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 3, 2, 1, 1, 3, 6, 7, 5, 2, 1, 1, 4, 10, 16, 18, 14, 8, 3, 1, 1, 5, 15, 31, 46, 51, 43, 27, 12, 3, 1, 1, 6, 21, 53, 98, 139, 155, 134, 88, 43, 16, 4, 1, 1, 7, 28, 83, 184, 319, 441, 486, 424, 293, 161, 68, 21, 4, 1
Offset: 1

Views

Author

Gus Wiseman, Apr 10 2023

Keywords

Comments

Also the number of k-subsets of {1,...,2n} with mean n.

Examples

			Triangle begins:
   1
   1   1   1
   1   2   3   2   1
   1   3   6   7   5   2   1
   1   4  10  16  18  14   8   3   1
   1   5  15  31  46  51  43  27  12   3   1
   1   6  21  53  98 139 155 134  88  43  16   4   1
   1   7  28  83 184 319 441 486 424 293 161  68  21   4   1
Row n = 3 counts the following subsets:
  {0}  {-1,1}  {-1,0,1}   {-2,-1,0,3}  {-2,-1,0,1,2}
       {-2,2}  {-2,0,2}   {-2,-1,1,2}
               {-2,-1,3}
		

Crossrefs

Row lengths are A005408.
Row sums are A212352.
A007318 counts subsets by length.
A067538 counts partitions with integer mean.
A231147 counts subsets by median.
A327475 counts subsets with integer mean, median A000975.
A327481 counts subsets by mean.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[-n+1,n],{k}],Total[#]==0&]],{n,6},{k,2n-1}]
Previous Showing 11-15 of 15 results.