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

A053154 Number of 2-element intersecting families (with not necessarily distinct sets) of an n-element set.

Original entry on oeis.org

0, 1, 5, 22, 95, 406, 1715, 7162, 29615, 121486, 495275, 2009602, 8124935, 32761366, 131834435, 529712842, 2125993055, 8525430046, 34166159195, 136858084882, 548012945975, 2193794127526, 8780404589555, 35137304693722
Offset: 0

Views

Author

Vladeta Jovovic, Goran Kilibarda, Feb 28 2000

Keywords

Comments

Let P(A) be the power set of an n-element set A. Then a(n) = the number of pairs of elements {x,y} of P(A) for which either 0) x and y are disjoint and for which either x is a subset of y or y is a subset of x, or 1) x and y are intersecting but for which x is not a subset of y and y is not a subset of x, or 2) x and y are intersecting and for which either x is a proper subset of y or y is a proper subset of x. - Ross La Haye, Jan 11 2008

Crossrefs

Programs

  • Magma
    [(4^n-3^n+2^n-1)/2: n in [0..30]]; // Vincenzo Librandi, Oct 06 2017
  • Mathematica
    Table[(4^n-3^n+2^n-1)/2, {n,1,30}] (* Clark Kimberling, Mar 12 2012 *)
    CoefficientList[Series[x (1 - 5 x + 7 x^2) / ((1 - x) (1 - 4 x) (1 - 3 x) (1 - 2 x)), {x, 0, 33}], x] (* Vincenzo Librandi, Oct 06 2017 *)
  • PARI
    a(n) = (4^n-3^n+2^n-1)/2; \\ Michel Marcus, Nov 30 2015
    

Formula

a(n) = (A083324(n) - 1)/2.
a(n) = (4^n - 3^n + 2^n - 1)/2.
a(n) = 3*StirlingS2(n+1,4) + 2*StirlingS2(n+1,3) + StirlingS2(n+1,2). - Ross La Haye, Jan 11 2008
From Wolfdieter Lang, Oct 28 2011 (Start)
E.g.f.: Sum_{j=1..4} ((-1)^j*exp(j*x))/2 = exp(x)*(exp(4*x)-1)/(exp(x)+1)/2.
O.g.f.: Sum_{j=1..4} (((-1)^j)/(1-j*x))/2 = x*(1-5*x+7*x^2)/product(1-j*x,j=1..4). See A196847.
(End)
G.f.: x*(1-5*x+7*x^2)/((1-x)*(1-4*x)*(1-3*x)*(1-2*x)). - Vincenzo Librandi, Oct 06 2017

A196848 Coefficient array of numerator polynomials of the ordinary generating functions for the alternating sums of powers for the numbers 1,2,...,2*n+1.

Original entry on oeis.org

1, 1, -4, 5, 1, -12, 55, -114, 94, 1, -24, 238, -1248, 3661, -5736, 3828, 1, -40, 690, -6700, 40053, -151060, 351800, -465000, 270576, 1, -60, 1595, -24720, 247203, -1665900, 7660565, -23745720, 47560876, -55805520, 29400480, 1, -84, 3185, -72030, 1081353, -11344872, 85234175, -461800710, 1790256286, -4843901664, 8693117160, -9320129280, 4546558080
Offset: 0

Views

Author

Wolfdieter Lang, Oct 27 2011

Keywords

Comments

The row length sequence of this array is A005408(n), n>=0: 1,3,5,7,...
This is the array for the numerator polynomials of the o.g.f. of alternating sums of powers of the first 2*n+1 positive integers.
The corresponding array for the first 2*n positive integers is found in A196847.
The obvious e.g.f. of a(k,2*n+1) := Sum_{j=1..2*n+1} (-1)^(j+1) * j^k is go(n,x) := Sum_{k>=0} a(k,2*n+1)*(x^k)/k! = Sum_{j=1..2*n+1} (-1)^(j+1) * exp(j*x) = exp(x)*(exp((2*n+1)*x) + 1)/(exp(x) + 1).
Via Laplace transformation (see the link under A196837, addendum) one finds the corresponding o.g.f.: Go(n,x) = Po(n,x)/Product_{j=1..2*n+1} (1 - j*x) with the numerator polynomial Po(n,x) = Sum_{m=0..2*n} a(n,m)*x^m.

Examples

			n\m 0   1   2     3     4       5      6       7       8
0:  1
1:  1  -4   5
2:  1 -12  55  -114    94
3:  1 -24 238 -1248  3661   -5736   3828
4:  1 -40 690 -6700 40053 -151060 351800 -465000, 270576
...
The o.g.f. for the sequence a(k,5) := (1^k - 2^k + 3^k - 4^k + 5^k) = A198628(k), k >= 0, (n=2) is Go(2,x) = (1 - 12*x + 55*x^2 - 114*x^3 + 94*x^4)/Product_{j=1..5} (1-j*x).
a(3,2) = S_{1,2}(5,1) + S_{3,4}(5,1) + S_{5,6}(5,1) + |s(7,5)| = A196845(5,1) + A196846(5,1) + 17 + |s(7,5)| = 25+21+17+175 = 238. Here S_{5,6}(5,1) = 1+2+3+4+7 = 17 was used.
		

Crossrefs

Formula

a(n,m) = [x^m](Go(n,x)*Product_{j=1..2*n+1} (1-j*x)), with the o.g.f. Go(n,x) of the sequence a(k,2*n+1) := Sum_{j=1..2*n+1} (-1)^(j+1) * j^k. See a comment above.
a(n,0) = 1, n >= 0, and a(n,m) = (-1)^m*((Sum_{i=1..n} S_{2*i-1,2*i}(2*(n-1),m)) + |s(2*n+1,2n+1-m)|), n >= 0, m = 1..2*n, with the (i,j)-family of number triangles S_{i,j}(n,k) defined in a comment on A196845, and the Stirling numbers of the first kind s(n,m) = A048994(n,m).

A198628 Alternating sums of powers for 1,2,3,4 and 5.

Original entry on oeis.org

1, 3, 15, 81, 435, 2313, 12195, 63801, 331395, 1710153, 8775075, 44808921, 227890755, 1155180393, 5839846755, 29458152441, 148335904515, 745888593033, 3746364947235, 18799770158361, 94271405748675, 472449569948073, 2366624981836515, 11850654345690681, 59323452211439235
Offset: 0

Views

Author

Wolfdieter Lang, Oct 27 2011

Keywords

Comments

See A196848 for the e.g.f.s and o.g.f.s of such sequences for the numbers 1,2,...,2*n+1, and A196847
for the numbers 1,2,...,2*n.

Crossrefs

Programs

  • Maple
    A198628 := proc(n)
        3^n-4^n+1-2^n+5^n ;
    end proc:
    seq(A198628(n),n=0..20) ; # R. J. Mathar, May 11 2022
  • Mathematica
    LinearRecurrence[{15,-85,225,-274,120},{1,3,15,81,435},30] (* Harvey P. Dale, Dec 30 2024 *)

Formula

a(n) = sum(((-1)^(j+1))*j^n,j=1..5) = 1-2^n+3^n-4^n+5^n.
E.g.f.: sum(((-1)^(j+1))*exp(j*x),j=1..5) =
exp(x)*(1+exp(5*x))/(1+exp(x)).
O.g.f.: sum(((-1)^(j+1))/(1-j*x),j=1..5) =
(1-12*x+55*x^2-114*x^3+94*x^4)/product(1-j*x,j=1..5).
A formula for the numbers of the numerator polynomial is given in A196848.

A198629 Alternating sums of powers of 1,2,...,6, divided by 3.

Original entry on oeis.org

0, 1, 7, 45, 287, 1821, 11487, 72045, 449407, 2789181, 17230367, 105996045, 649630527, 3968504541, 24174772447, 146908944045, 890924667647, 5393590283901, 32604530573727, 196853323284045, 1187295678104767, 7154833690143261
Offset: 0

Views

Author

Wolfdieter Lang, Oct 28 2011

Keywords

Comments

For the e.g.f.s and o.g.f.s of such alternating power sums see A196847 (even case) and A196848 (odd case).

Crossrefs

Programs

  • Maple
    A198629 := proc(n)
        (-3^n+4^n-1+2^n-5^n+6^n)/3 ;
    end proc:
    seq(A198629(n),n=0..20) ; # R. J. Mathar, May 11 2022
  • Mathematica
    Table[Total[Times@@@Partition[Riffle[Range[6]^n,{-1,1},{2,-1,2}],2]]/3,{n,0,30}] (* Harvey P. Dale, Jul 17 2016 *)

Formula

a(n)=sum(((-1)^j)*j^n,j=1..6)/3, n>=0.
E.g.f.: sum(((-1)^j)*exp(j*x),j=1..6)/3 = exp(x)*(exp(6*x)-1)/(3*(exp(x)+1)).
O.g.f.: sum(((-1)^j)/(1-j*x),j=1..6)/3 = x*(1-14*x+73*x^2-168*x^3+148*x^4)/
product(1-j*x,j=1..6). See A196847 for a formula for the coefficients of the numerator polynomial.

A198630 Alternating sums of powers of 1,2,...,7.

Original entry on oeis.org

1, 4, 28, 208, 1540, 11344, 83188, 607408, 4416580, 31986064, 230784148, 1659338608, 11892395620, 84983496784, 605698755508, 4306834677808, 30560156566660
Offset: 0

Views

Author

Wolfdieter Lang, Oct 28 2011

Keywords

Comments

For the e.g.f.s and o.g.f.s of such alternating power sums see A196847 (even case) and A196848 (odd case).

Examples

			a(2) = 1^2-2^2+3^2-4^2+5^2-6^2+7^2 = 28.
		

Crossrefs

Programs

  • Maple
    A198630 := proc(n)
        3^n-4^n+1-2^n+5^n-6^n+7^n ;
    end proc:
    seq(A198630(n),n=0..20) ; # R. J. Mathar, May 11 2022
  • PARI
    a(n)=([0,1,0,0,0,0,0; 0,0,1,0,0,0,0; 0,0,0,1,0,0,0; 0,0,0,0,1,0,0; 0,0,0,0,0,1,0; 0,0,0,0,0,0,1; 5040,-13068,13132,-6769,1960,-322,28]^n*[1;4;28;208;1540;11344;83188])[1,1] \\ Charles R Greathouse IV, Jul 06 2017

Formula

a(n)=sum(((-1)^(j+1))*j^n,j=1..7), n>=0.
E.g.f.: sum(((-1)^(j+1))*exp(j*x),j=1..7)= exp(x)*
(1+exp(7*x))/(1+exp(x)).
O.g.f: sum(((-1)^(j+1))/(1-j*x),j=1..7) = (1-24*x+238*x^2-1248*x^3+3661*x^4-5736*x^5+3828*x^6)/
product(1-j*x,j=1..7). See A196848 for a formula for the coefficients of the numerator polynomial.

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.
Showing 1-6 of 6 results.