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

A034299 Alternating sum transform (PSumSIGN) of A000975.

Original entry on oeis.org

1, 1, 4, 6, 15, 27, 58, 112, 229, 453, 912, 1818, 3643, 7279, 14566, 29124, 58257, 116505, 233020, 466030, 932071, 1864131, 3728274, 7456536, 14913085, 29826157, 59652328, 119304642, 238609299
Offset: 0

Views

Author

Keywords

Examples

			G.f. = 1 + x + 4*x^2 + 6*x^3 + 15*x^4 + 27*x^5 + 58*x^6 + 112*x^7 + ...
		

Crossrefs

Cf. A160156.

Programs

  • Magma
    [(2^(n+5)+(6*n+13)*(-1)^n-9)/36: n in [0..50]]; // G. C. Greubel, Oct 12 2017
  • Mathematica
    CoefficientList[Series[(1/(1-x^2))/(1-x-2x^2),{x,0,40}],x] (* Vincenzo Librandi, Apr 04 2012 *)
    Table[(2^(n + 5) + (6 n + 13) (-1)^n - 9)/36, {n, 0, 28}] (* Bruno Berselli, Apr 04 2012 *)
    LinearRecurrence[{1,3,-1,-2},{1,1,4,6},30] (* Harvey P. Dale, Jun 11 2019 *)
  • PARI
    {a(n) = (32 * 2^n - 9 + (6*n + 13) * (-1)^n) / 36}; /* Michael Somos, Jan 23 2014 */
    

Formula

a(n) = sum{k=0..floor(n/2), A001045(n-2k+1)}. - Paul Barry, Nov 24 2003
G.f.: (1/(1-x^2))/(1-x-2x^2); a(n) = sum{k=0..n+1, A001045(k)*(1-(-1)^floor((n+k)/2))}; - Paul Barry, Apr 16 2005
a(n) = sum_{k, 0<=k<=n} A126258(n,k). - Philippe Deléham, Mar 13 2007
a(n) = 2*a(n-1)+A001057(n+1), with a(0)=1. - Bruno Berselli, Nov 09 2010
a(n) = (2^(n+5)+(6n+13)(-1)^n-9)/36. - Bruno Berselli, Apr 04 2012
a(n) = a(n-1) + 2*a(n-2) + (1 + (-1)^n) / 2. - Michael Somos, Jan 23 2014
A160156(n) = a(2*n). - Michael Somos, Oct 16 2020

A116914 Number of UUDD's, where U=(1,1) and D=(1,-1), in all hill-free Dyck paths of semilength n (a hill in a Dyck path is a peak at level 1).

Original entry on oeis.org

1, 1, 5, 16, 58, 211, 781, 2920, 11006, 41746, 159154, 609324, 2341060, 9021559, 34855741, 134972368, 523689718, 2035462990, 7923732118, 30889008112, 120566373676, 471134916286, 1842964183570, 7216096752496, 28279240308268, 110913181145716, 435333520075796, 1709861650762900
Offset: 2

Views

Author

Emeric Deutsch, May 08 2006

Keywords

Comments

Catalan transform of A034299. - R. J. Mathar, Jun 29 2009

Examples

			a(4)=5 because in the 6 (=A000957(5)) hill-free Dyck paths of semilength 4, namely UU(UUDD)DD, UUUDUDDD, UUD(UUDD)D, UUDUDUDD, U(UUDD)UDD and (UUDD)(UUDD) (U=(1,1), D=(1,-1)) we have altogether 5 UUDD's (shown between parentheses).
		

Crossrefs

Cf. A105640.

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 40); Coefficients(R!( x*(1 + 5*x-(1-x)*Sqrt(1-4*x))/(2*(2+x)^2*Sqrt(1-4*x)) )); // G. C. Greubel, May 08 2019
    
  • Maple
    G:=z*(1+5*z-(1-z)*sqrt(1-4*z))/2/(2+z)^2/sqrt(1-4*z): Gser:=series(G,z=0,31): seq(coeff(Gser,z^n),n=2..28);
  • Mathematica
    Rest[Rest[CoefficientList[Series[x*(1+5*x-(1-x)*Sqrt[1-4*x])/2/(2+x)^2/Sqrt[1-4*x], {x, 0, 40}], x]]] (* Vaclav Kotesovec, Mar 20 2014 *)
  • PARI
    my(x='x+O('x^40)); Vec(x*(1+5*x-(1-x)*sqrt(1-4*x))/(2*(2+x)^2 *sqrt(1-4*x))) \\ G. C. Greubel, Feb 08 2017
    
  • Sage
    a=(x*(1+5*x-(1-x)*sqrt(1-4*x))/(2*(2+x)^2*sqrt(1-4*x))).series(x, 40).coefficients(x, sparse=False); a[2:] # G. C. Greubel, May 08 2019

Formula

a(n) = Sum_{k=0..floor(n/2)} k*A105640(n,k).
G.f.: x*(1 + 5*x - (1-x)*sqrt(1-4*x))/(2*(2+x)^2*sqrt(1-4*x)).
a(n+2) = A126258(2*n,n). - Philippe Deléham, Mar 13 2007
a(n) ~ 2^(2*n-1)/(9*sqrt(Pi*n)). - Vaclav Kotesovec, Mar 20 2014
D-finite with recurrence +2*(-n+1)*a(n) +3*(-n+6)*a(n-1) +3*(13*n-44)*a(n-2) +10*(2*n-5)*a(n-3)=0. - R. J. Mathar, Jul 26 2022
Showing 1-2 of 2 results.