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

A087960 a(n) = (-1)^binomial(n+1,2).

Original entry on oeis.org

1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1
Offset: 0

Views

Author

W. Edwin Clark, Sep 17 2003

Keywords

Comments

Period 4: repeat [1, -1, -1, 1]. - Joerg Arndt, Feb 14 2016
Also equal to the sign of product(j-i, 1<=j
Hankel transform of A097331, A097332. [Paul Barry, Aug 10 2009]
The Kn22 sums, see A180662, of triangle A108299 equal the terms of this sequence. [Johannes W. Meijer, Aug 14 2011]

Examples

			a(1) = -1 since (-1)^binomial(2,2) = (-1)^1 = -1.
G.f. = 1 - x - x^2 + x^3 + x^4 - x^5 - x^6 + x^7 + x^8 - x^9 - x^10 + ...
		

References

  • I. S. Gradstein and I. M. Ryshik, Tables of series, products, and integrals, Volume 1, Verlag Harri Deutsch, 1981.

Programs

  • Haskell
    a087960 n = (-1) ^ (n * (n + 1) `div` 2)
    a087960_list = cycle [1,-1,-1,1]  -- Reinhard Zumkeller, Nov 15 2015
    
  • Magma
    [(-1)^Binomial(n+1,2) : n in [0..100]]; // Wesley Ivan Hurt, Jul 07 2016
    
  • Maple
    A087960:=n->(-1)^binomial(n+1,2): seq(A087960(n), n=0..100); # Wesley Ivan Hurt, Jul 07 2016
  • Mathematica
    (-1)^Binomial[Range[0,110],2] (* or *) LinearRecurrence[{0,-1},{1,1},110] (* Harvey P. Dale, Jul 07 2014 *)
    a[ n_] := (-1)^(n (n + 1) / 2); (* Michael Somos, Jul 20 2015 *)
    a[ n_] := (-1)^Quotient[ n + 1, 2]; (* Michael Somos, Jul 20 2015 *)
  • PARI
    {a(n) = (-1)^((n + 1)\2)}; /* Michael Somos, Jul 20 2015 */
    
  • Python
    def A087960(n): return -1 if n+1&2 else 1 # Chai Wah Wu, Jan 31 2023

Formula

a(n) = (-1)^A000217(n).
a(n) = (-1)^floor((n+1)/2). - Benoit Cloitre and Ray Chandler, Sep 19 2003
G.f.: (1-x)/(1+x^2). - Paul Barry, Aug 10 2009
a(n) = I^(n*(n+1)). - Bruno Berselli, Oct 17 2011
a(n) = Product_{k=1..n} 2*cos(2*k*Pi/(2*n+1)) for n>=0 (for n=0 the empty product is put to 1). See the Gradstein-Ryshik reference, p. 63, 1.396 2. with x = sqrt(-1). - Wolfdieter Lang, Oct 22 2013
a(n) + a(n-2) = 0 for n>1, a(n) = a(n-4) for n>3. - Wesley Ivan Hurt, Jul 07 2016
E.g.f.: cos(x) - sin(x). - Ilya Gutkovskiy, Jul 07 2016
a(n) = Sum_{s=0..n} (-1)^(n-s)*A111125(n, s)*2^s (row polynomials of signed A111125 evaluated at 2). - Wolfdieter Lang, May 02 2021

Extensions

More terms from Benoit Cloitre and Ray Chandler, Sep 19 2003
Offset and Vandermonde formula corrected by R. J. Mathar, Sep 25 2009

A097331 Expansion of 1 + 2x/(1 + sqrt(1 - 4x^2)).

Original entry on oeis.org

1, 1, 0, 1, 0, 2, 0, 5, 0, 14, 0, 42, 0, 132, 0, 429, 0, 1430, 0, 4862, 0, 16796, 0, 58786, 0, 208012, 0, 742900, 0, 2674440, 0, 9694845, 0, 35357670, 0, 129644790, 0, 477638700, 0, 1767263190, 0, 6564120420, 0, 24466267020, 0, 91482563640, 0, 343059613650, 0
Offset: 0

Author

Paul Barry, Aug 05 2004

Keywords

Comments

Binomial transform is A097332. Second binomial transform is A014318.
Essentially the same as A126120. - R. J. Mathar, Jun 15 2008
Hankel transform is A087960(n) = (-1)^binomial(n+1,2). - Paul Barry, Aug 10 2009

Programs

  • Maple
    A097331_list := proc(n) local j, a, w; a := array(0..n); a[0] := 1;
    for w from 1 to n do a[w]:=a[w-1]-(-1)^w*add(a[j]*a[w-j-1],j=1..w-1) od; convert(a,list)end: A097331_list(48); # Peter Luschny, May 19 2011
  • Mathematica
    a[0] = 1; a[n_?OddQ] := CatalanNumber[(n-1)/2]; a[] = 0; Table[a[n], {n, 0, 48}] (* _Jean-François Alcover, Jul 24 2013 *)
  • Sage
    def A097331_list(n) :
        D = [0]*(n+2); D[1] = 1
        b = True; h = 1; R = []
        for i in range(2*n-1) :
            if b :
                for k in range(h,0,-1) : D[k] -= D[k-1]
                h += 1; R.append(abs(D[1]))
            else :
                for k in range(1,h, 1) : D[k] += D[k+1]
            b = not b
        return R
    A097331_list(49) # Peter Luschny, Jun 03 2012

Formula

a(n) = 0^n + Catalan((n-1)/2)(1-(-1)^n)/2.
Unsigned version of A090192, A105523. - Philippe Deléham, Sep 29 2006
From Paul Barry, Aug 10 2009: (Start)
G.f.: 1+xc(x^2), c(x) the g.f. of A000108;
G.f.: 1/(1-x/(1+x/(1+x/(1-x/(1-x/(1+x/(1+x/(1-x/(1-x/(1+... (continued fraction);
G.f.: 1+x/(1-x^2/(1-x^2/(1-x^2/(1-x^2/(1-... (continued fraction). (End)
G.f.: 1/(1-z/(1-z/(1-z/(...)))) where z=x/(1+2*x) (continued fraction); more generally g.f. C(x/(1+2*x)) where C(x) is the g.f. for the Catalan numbers (A000108). - Joerg Arndt, Mar 18 2011
Conjecture: (n+1)*a(n) + n*a(n-1) + 4*(-n+2)*a(n-2) + 4*(-n+3)*a(n-3)=0. - R. J. Mathar, Dec 02 2012
Recurrence: (n+3)*a(n+2) = 4*n*a(n), a(0)=a(1)=1. For nonzero terms, a(n) ~ 2^(n+1)/((n+1)^(3/2)*sqrt(2*Pi)). - Fung Lam, Mar 17 2014

A014318 Convolution of Catalan numbers and powers of 2.

Original entry on oeis.org

1, 3, 8, 21, 56, 154, 440, 1309, 4048, 12958, 42712, 144210, 496432, 1735764, 6145968, 21986781, 79331232, 288307254, 1054253208, 3875769606, 14315659632, 53097586284, 197677736208, 738415086066
Offset: 0

Keywords

Comments

Binomial transform of A097332: (1, 2, 3, 5, 9, 18, 39, ...). - Gary W. Adamson, Aug 01 2011
Hankel transform is A087960. - Wathek Chammam, Dec 02 2011

Crossrefs

Programs

  • Magma
    A014318:= func< n | (&+[2^(n-j)*Catalan(j): j in [0..n]]) >;
    [A014318(n): n in [0..40]]; // G. C. Greubel, Jan 09 2023
    
  • Maple
    a:=proc(n) options operator, arrow: sum(2^(n-j)*binomial(2*j,j)/(j+1), j=0..n) end proc: seq(a(n), n=0..23); # Emeric Deutsch, Oct 16 2008
  • Mathematica
    a[n_]:= a[n]= Sum[2^(n-j)*CatalanNumber[j], {j,0,n}];
    Table[a[n], {n,0,40}] (* G. C. Greubel, Jan 09 2023 *)
  • SageMath
    def A014318(n): return sum(2^(n-j)*catalan_number(j) for j in range(n+1))
    [A014318(n) for n in range(41)] # G. C. Greubel, Jan 09 2023

Formula

From Emeric Deutsch, Oct 16 2008: (Start)
G.f.: (1-sqrt(1-4*z))/(2*z*(1-2*z)).
a(n) = Sum_{j=0..n} (2^(n-j) * binomial(2*j,j)/(j+1)). (End)
a(n) = Sum_{j=0..n} abs(A106270(n, j)) * A000079(j). - Gary W. Adamson, Apr 02 2009
Recurrence: (n+1)*a(n) = 32*(2*n-7)*a(n-5) + 48*(8-3*n)*a(n-4) + 8*(16*n-29)*a(n-3) + 4*(13-14*n)*a(n-2) + 12*n*a(n-1), n>=5. - Fung Lam, Mar 09 2014
Asymptotics: a(n) ~ 2^(2n+1)/n^(3/2)/sqrt(Pi). - Fung Lam, Mar 21 2014
G.f. A(x) satisfies: A(x) = 1 / (1 - 2*x) + x * (1 - 2*x) * A(x)^2. - Ilya Gutkovskiy, Nov 21 2021

A185812 Riordan array ( 1/(1-x), x*A005043(x) ).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 3, 1, 1, 1, 6, 5, 4, 1, 1, 1, 12, 12, 7, 5, 1, 1, 1, 27, 26, 19, 9, 6, 1, 1, 1, 63, 63, 43, 27, 11, 7, 1, 1, 1, 154, 153, 110, 63, 36, 13, 8, 1, 1, 1, 386, 386, 275, 169, 86, 46, 15, 9, 1, 1
Offset: 0

Author

Vladimir Kruchinin, Feb 05 2011

Keywords

Examples

			Array begins:
  1;
  1,  1;
  1,  1,  1;
  1,  2,  1,  1;
  1,  3,  3,  1,  1;
  1,  6,  5,  4,  1,  1;
  1, 12, 12,  7,  5,  1,  1;
  1, 27, 26, 19,  9,  6,  1,  1;
		

Crossrefs

Cf. A082395, apparently R(n,1), A097332 (row sums). - R. J. Mathar, Feb 10 2011

Programs

  • Maple
    A185812 := proc(n,k) if n = k  or k =0 then 1; else k*add(1/(n-i)*add(binomial(2*j-k-1,j-1) *(-1)^(n-j-i) *binomial(n-i,j),j=k..n-i),i=0..n-k) ; end if; end proc:
    seq(seq(A185812(n,k),k=0..n),n=0..15) ; # R. J. Mathar, Feb 10 2011
  • Mathematica
    r[n_, k_] := k*Sum[Binomial[2*j - k - 1, j - 1]*(-1)^(n - j - i)*Binomial[n - i, j]/(n - i), {i, 0, n - k}, {j, k, n - i}]; r[n_, 0] = 1; Table[r[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 21 2013 *)

Formula

R(n,k) = k*Sum_{i=0..(n-k)} (Sum_{j=k..(n-i)} binomial(2*j-k-1,j-1) *(-1)^(n-j-i) *binomial(n-i,j))/(n-i), k>0.
R(n,0)=1.
Showing 1-4 of 4 results.