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.

A103718 Triangle of coefficients of certain polynomials used with prime numbers as variables in the computation of the array A103728.

Original entry on oeis.org

1, 2, -1, 5, -4, 1, 17, -17, 7, -1, 74, -85, 45, -11, 1, 394, -499, 310, -100, 16, -1, 2484, -3388, 2359, -910, 196, -22, 1, 18108, -26200, 19901, -8729, 2282, -350, 29, -1, 149904, -227708, 185408, -89733, 26985, -5082, 582, -37, 1, 1389456, -2199276, 1896380, -993005, 332598, -72723, 10320, -915, 46, -1
Offset: 0

Views

Author

Wolfdieter Lang, Feb 24 2005

Keywords

Comments

The g.f. for the sequence {b(N,p)}, with b(N,p) the number of cyclically inequivalent two-color, N bead necklaces with p beads of one color and N-p beads of the other color is, for prime numbers p, G(p(n),x):=P(p(n)-1,x)/((1-x)^(p(n)-1)*(1-x^p(n))), with the numerator polynomial P(p(n)-1,x):= sum(r(n,k)*x^k,k=0..p(n)-1) and the row polynomials of this triangle r(n,k):=sum(a(k,m)*p(n)^m,m=0..k). p(n)=A000040(n) (prime numbers).
Row sums (signed) give A000142(k)=k!. Row sums (unsigned) coincide with A007680(k)=(2*k+1)*k!, k>=0.
The (unsigned) column sequences are, for m=0..10: A000774, A081052, A103719-A103727.

Examples

			Triangle begins:
    1;
    2,   -1;
    5,   -4,    1;
   17,  -17,    7,   -1;
   74,  -85,   45,  -11,    1;
  394, -499,  310, -100,   16,   -1;
  ...
		

Crossrefs

Cf. A008275.

Programs

  • Mathematica
    a[0, 0] = 1; a[k_, 0] := (k - 1)! + k*a[k - 1, 0]; a[k_, m_]:= If[kIndranil Ghosh, Mar 11 2017 *)
  • PARI
    a(k, m) = if(m==0, if(k==0, 1, (k - 1)! + k*a(k - 1, 0)) , if(kIndranil Ghosh, Mar 11 2017

Formula

a(k, m) = ((-1)^m)*(|S1(k+1, m+1)| + |S1(k+1, m+2)|) = ((-1)^m)*(|S1(k+2, m+2)|-k*|S1(k+1, m+2)|), with the (signed) Stirling number triangle S1(n, m) = A048994(n, m), n >= m >= 0.
a(0, 0)=1, a(k, 0) = (k-1)! + k*a(k-1, 0); a(k, m) = -a(k-1, m-1) + k*a(k-1, m), m > 0 and a(k, m)=0 if k < m.
Let B = (n+1)-st row of Stirling cycle numbers (unsigned, A008275); say a,b,c,d,.... Then n-th row of present triangle = ((a+b), (b+c), (c+d), ..., (d)). E.g., 4th row of the Stirling cycle numbers = (6, 11, 6, 1). Then third row of A103718 = ((6+11), (11+6), (6+1), (1)) = (17, 17, 7, 1). - Gary W. Adamson, May 07 2006

Extensions

More terms from Indranil Ghosh, Mar 11 2017

A081103 Alternating sum of first three Stirling numbers of the first kind.

Original entry on oeis.org

0, 1, -4, 18, -95, 584, -4123, 32969, -294992, 2922956, -31791716, 376719892, -4832017320, 66713229192, -986611705584, 15561976320144, -260804276106624, 4628322010931328, -86710491660063744, 1710290952899283456, -35427639035553292800, 768970029545198092800
Offset: 0

Views

Author

Paul Barry, Mar 05 2003

Keywords

Crossrefs

Formula

a(n) = s(n, 1)-s(n, 2)+s(n, 3), s(n, m)= signed Stirling numbers of the first kind.
E.g.f.: (1+x)^(-1)*(log(1+x)-log(1+x)^2/2+log(1+x)^3/6).

A323618 Expansion of e.g.f. (1 + x)*log(1 + x)*(2 + log(1 + x))/2.

Original entry on oeis.org

0, 1, 2, -1, 1, -1, -2, 34, -324, 2988, -28944, 300816, -3371040, 40710240, -528439680, 7348717440, -109109064960, 1723814265600, -28888702617600, 512030734387200, -9572240647065600, 188274945999974400, -3887144020408320000, 84062926436751360000, -1900475323780239360000
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 20 2019

Keywords

Crossrefs

Programs

  • Magma
    [(&+[StirlingFirst(n,k)*Binomial(k+1,2): k in [0..n]]): n in [0..25]]; // G. C. Greubel, Feb 07 2019
    
  • Maple
    f:= gfun:-rectoproc({a(n) =  (5-2*n)*a(n-1) - (n-3)^2*a(n-2), a(0)=0, a(1)=1, a(2)=2, a(3)=-1}, a(n), remember):
    map(f, [$0..30]); # Robert Israel, Jan 20 2019
  • Mathematica
    nmax = 24; CoefficientList[Series[(1 + x) Log[1 + x] (2 + Log[1 + x])/2, {x, 0, nmax}], x] Range[0, nmax]!
    Table[Sum[StirlingS1[n, k] k (k + 1)/2, {k, 0, n}], {n, 0, 24}]
    Join[{0,1,2,-1}, RecurrenceTable[{a[n]==(5-2*n)*a[n-1]-(n-3)^2*a[n-2], a[2]==2, a[3]==-1}, a, {n,4,25}]] (* G. C. Greubel, Feb 07 2019 *)
  • PARI
    {a(n) = sum(k=0,n, stirling(n,k,1)*binomial(k+1,2))};
    vector(30, n, n--; a(n)) \\ G. C. Greubel, Feb 07 2019
    
  • Sage
    [sum((-1)^(k+n)*stirling_number1(n,k)*binomial(k+1,2) for k in (0..n)) for n in (0..25)] # G. C. Greubel, Feb 07 2019

Formula

a(n) = Sum_{k=0..n} Stirling1(n,k)*A000217(k).
a(n) ~ -(-1)^n * log(n) * n! / n^2 * (1 + (gamma - 2)/log(n)), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Jan 20 2019
a(n) = (5-2*n)*a(n-1) - (n-3)^2*a(n-2) for n >= 4. - Robert Israel, Jan 20 2019
Showing 1-3 of 3 results.