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 51-57 of 57 results.

A078031 Expansion of (1-x)/(1 + x^2 - x^3).

Original entry on oeis.org

1, -1, -1, 2, 0, -3, 2, 3, -5, -1, 8, -4, -9, 12, 5, -21, 7, 26, -28, -19, 54, -9, -73, 63, 64, -136, -1, 200, -135, -201, 335, 66, -536, 269, 602, -805, -333, 1407, -472, -1740, 1879, 1268, -3619, 611, 4887, -4230, -4276, 9117, 46, -13393, 9071, 13439, -22464, -4368, 35903, -18096
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

The Ca2 sums, see A180662, of triangle A108299 equal the terms of this sequence. - Johannes W. Meijer, Aug 14 2011

Crossrefs

Programs

  • GAP
    a:=[1,-1,-1];; for n in [4..60] do a[n]:=-a[n-2]+a[n-3]; od; a; # G. C. Greubel, Aug 05 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 60); Coefficients(R!( (1-x)/(1+x^2-x^3) )); // G. C. Greubel, Aug 05 2019
    
  • Maple
    A078031 := proc(n) option remember: coeftayl((1-x)/(1+x^2-x^3),x=0,n) end: seq(A078031(n), n=0..60); # Johannes W. Meijer, Aug 14 2011
  • Mathematica
    CoefficientList[Series[(1-x)/(1+x^2-x^3),{x,0,60}],x] (* or *) LinearRecurrence[{0,-1,1},{1,-1,-1},60] (* Harvey P. Dale, Apr 08 2012 *)
  • PARI
    Vec((1-x)/(1+x^2-x^3)+O(x^60)) \\ Charles R Greathouse IV, Sep 26 2012
    
  • Sage
    ((1-x)/(1+x^2-x^3)).series(x, 60).coefficients(x, sparse=False) # G. C. Greubel, Aug 05 2019
    

Formula

G.f.: (1-x)/(1 + x^2 - x^3).
a(n) = -a(n-2) + a(n-3); a(0)=1, a(1)=-1, a(2)=-1. - Harvey P. Dale, Apr 08 2012

A134668 Period 6: repeat [1, -1, 0, 0, -1, 1].

Original entry on oeis.org

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

Views

Author

Paul Curtz, Jan 26 2008

Keywords

Comments

The Fi2 sums, see A180662, of triangle A108299 equal the terms of this sequence. - Johannes W. Meijer, Aug 11 2011

Examples

			G.f. = 1 - x - x^4 + x^5 + x^6 - x^7 - x^10 + x^11 + x^12 - x^13 - x^16 + ...
		

Crossrefs

Programs

  • Magma
    &cat [[1, -1, 0, 0, -1, 1]^^20]; // Wesley Ivan Hurt, Jun 20 2016
  • Maple
    A134668 :=proc(n): (1/6)*(-2*((n+1) mod 6)+((n+2) mod 6)-((n+4) mod 6)+2*((n+5) mod 6)) end: seq(A134668(n), n=0..74); # Johannes W. Meijer, Aug 14 2011
  • Mathematica
    PadRight[{},120,{1,-1,0,0,-1,1}] (* or *) LinearRecurrence[{0,-1,0,-1},{1,-1,0,0},120] (* Harvey P. Dale, Dec 03 2012 *)
  • PARI
    {a(n)=[1, -1, 0, 0, -1, 1][n%6+1]}; /* Michael Somos, Feb 08 2008 */
    

Formula

First differences of A134667.
Euler transform of length 6 sequence [-1, 0, 0, -1, 0, 1]. - Michael Somos, Feb 08 2008
a(n) = a(-1-n) for all n in Z. - Michael Somos, Feb 08 2008
G.f.: (1-x)*(1-x^4) / (1-x^6) = (1-x)*(1+x^2) / ((1-x+x^2)*(1+x+x^2)) = (1-x+x^2-x^3) / (1+x^2+x^4).
a(6*n + 2) = a(6*n + 3) = 0. - Michael Somos, Oct 16 2015
From Wesley Ivan Hurt, Jun 20 2016: (Start)
a(n) + a(n-2) + a(n-4) = 0 for n>3.
a(n) = cos(n*Pi/6) * (3*cos(n*Pi/2) + 2*sqrt(3)*sin(n*Pi/6) - 3*sqrt(3)*sin(n*Pi/2))/3. (End)

A191315 Sum of the heights of all dispersed Dyck paths of length n (i.e., of Motzkin paths of length n with no (1,0) steps at positive heights).

Original entry on oeis.org

0, 0, 1, 2, 6, 11, 27, 50, 115, 216, 481, 913, 1992, 3809, 8192, 15748, 33512, 64685, 136546, 264422, 554686, 1077055, 2248105, 4375221, 9095238, 17735812, 36745504, 71776633, 148288346, 290092160, 597876033, 1171153370, 2408702852, 4723840544, 9697826974, 19038878297
Offset: 0

Views

Author

Emeric Deutsch, May 31 2011

Keywords

Comments

a(n) = Sum_{k>=0} k * A191314(n,k).

Examples

			a(4)=6 because the sum of the heights of the paths HHHH, HHUD, HUDH, UDHH, UDUD, and UUDD is 0+1+1+1+1+2=6; here U=(1,1), H=(1,0), D=(1,-1).
		

Crossrefs

Programs

  • Maple
    F[0] := 1: F[1] := 1-z: for k from 2 to 36 do F[k] := sort(expand(F[k-1]-z^2*F[k-2])) end do: G := sum(j*z^(2*j)/(F[j]*F[j+1]), j = 0 .. 34): Gser := series(G, z = 0, 40): seq(coeff(Gser, z, n), n = 0 .. 35);
    # second Maple program:
    b:= proc(x, y, m) option remember;
          `if`(y>x or y<0, 0, `if`(x=0, m, b(x-1, y-1, m)+
          `if`(y=0, b(x-1, y, m), 0)+b(x-1, y+1, max(m, y+1))))
        end:
    a:= n-> b(n, 0$2):
    seq(a(n), n=0..30);  # Alois P. Heinz, Mar 13 2017
  • Mathematica
    b[x_, y_, m_] := b[x, y, m] = If[y > x || y < 0, 0, If[x == 0, m, b[x - 1, y - 1, m] + If[y == 0, b[x - 1, y, m], 0] + b[x - 1, y + 1, Max[m, y + 1]]]]; a[n_] := b[n, 0, 0]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, May 16 2017, after Alois P. Heinz *)

Formula

G.f.: G(z) = Sum_{j>=0}(jz^(2j)/(F(j)F(j+1))), where F(k) are polynomials in z defined by F(0)=1, F(1)=1-z, F(k)=F(k-1)-z^2*F(k-2) for k>=2. The coefficients of these polynomials form the triangle A108299.

A193669 Expansion of o.g.f.(1-x^4)/(1-x+x^8).

Original entry on oeis.org

1, 1, 1, 1, 0, 0, 0, 0, -1, -2, -3, -4, -4, -4, -4, -4, -3, -1, 2, 6, 10, 14, 18, 22, 25, 26, 24, 18, 8, -6, -24, -46, -71, -97, -121, -139, -147, -141, -117, -71, 0, 97, 218, 357, 504, 645, 762, 833, 833, 736, 518, 161, -343, -988, -1750, -2583, -3416, -4152
Offset: 0

Views

Author

Johannes W. Meijer, Aug 11 2011

Keywords

Comments

The Gi1 sums, see A180662, of triangle A108299 equal the terms of this sequence.

Crossrefs

Programs

  • Maple
    A193669 := proc(n) option remember: coeftayl((1-x^4) / (1-x+x^8) ,x=0,n) end: seq(A193669(n), n=0..57);
  • Mathematica
    CoefficientList[Series[(1-x^4)/(1-x+x^8),{x,0,80}],x] (* or *) LinearRecurrence[ {1,0,0,0,0,0,0,-1},{1,1,1,1,0,0,0,0},80] (* Harvey P. Dale, Jul 16 2014 *)

Formula

G.f.: -(x-1)*(1+x)*(x^2+1) / ( (x^2-x+1)*(x^6+x^5-x^3-x^2+1) ).
a(n) = a(n-1) - a(n-8), a(0) = a(1) = a(2) = a(3) = 1, a(4) = a(5) = a(6) = a(7) = 0.

A193884 Expansion of o.g.f. (1-x^2)/(1-x+x^4).

Original entry on oeis.org

1, 1, 0, 0, -1, -2, -2, -2, -1, 1, 3, 5, 6, 5, 2, -3, -9, -14, -16, -13, -4, 10, 26, 39, 43, 33, 7, -32, -75, -108, -115, -83, -8, 100, 215, 298, 306, 206, -9, -307, -613, -819, -810, -503, 110, 929, 1739, 2242, 2132, 1203, -536, -2778, -4910, -6113, -5577
Offset: 0

Views

Author

Johannes W. Meijer, Aug 11 2011

Keywords

Comments

The Kn11 sums, see A180662, of triangle A108299 equal the terms of this sequence.

Crossrefs

Programs

  • Maple
    A193884 := proc(n) option remember: if n=0 then 1 elif n=1 then 1 elif n=2 then 0 elif n=3 then 0 elif n>=4 then procname(n-1)-procname(n-4) fi: end: seq(A193884(n), n=0..54);
  • Mathematica
    CoefficientList[Series[(1-x^2)/(1-x+x^4),{x,0,80}],x] (* or *) LinearRecurrence[{1,0,0,-1},{1,1,0,0},80] (* Harvey P. Dale, Jul 15 2020 *)

Formula

G.f.: (1+x)*(1-x)/(1-x+x^4).
a(n) = a(n-1)-a(n-4), a(0) = a(1) = 1, a(2) = a(3) = 0.
a(n) = A099530(n) - A099530(n-2).

A193885 a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) - a(n-4), n>=4; a(0) = 1, a(1) = 1, a(2) = 2, a(3) = 3.

Original entry on oeis.org

1, 1, 2, 3, 3, 1, -5, -18, -41, -75, -115, -143, -118, 35, 431, 1213, 2499, 4254, 6047, 6665, 3609, -7375, -32334, -77933, -147781, -234503, -305765, -283634, -20329, 718653, 2239077, 4824577, 8495482, 12533139, 14698471, 10166901, -9557053, -57006530
Offset: 0

Views

Author

Johannes W. Meijer, Aug 11 2011

Keywords

Comments

The Ze1 sums, see A180662, of triangle A108299 equal the terms of this sequence.

Crossrefs

Programs

  • Magma
    I:=[1, 1, 2, 3 ]; [n le 4 select I[n] else 3*Self(n-1)-3*Self(n-2)+Self(n-3)-Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jul 10 2012
  • Maple
    A193885 := proc(n) option remember: if n=0 then 1 elif n=1 then 1 elif n=2 then 2 elif n=3 then 3 elif n>=4 then 3*procname(n-1)-3*procname(n-2)+procname(n-3)-procname(n-4) fi: end: seq(A193885(n),n=0..37);
  • Mathematica
    CoefficientList[Series[(1-x)*(1-x+x^2)/(1-3*x+3*x^2-x^3+x^4),{x,0,50}],x] (* Vincenzo Librandi, Jul 10 2012 *)

Formula

a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) - a(n-4), n>=4; a(0) = 1, a(1) = 1, a(2) = 2, a(3) = 3.
G.f.: (1-x)*(1-x+x^2)/(1-3*x+3*x^2-x^3+x^4).
a(n) = (-1)^(n+1)*(A099531(n+4) + 2*A099531(n+3) + 2*A099531(n+2) + A099531(n+1)).

A209235 Rectangular array read by antidiagonals, with entry k in row n given by T(n,k) = 2^{k-1}*Sum_{j=1..n} (cos((2*j-1)*Pi/(2*n+1)))^{k-1}.

Original entry on oeis.org

1, 2, 1, 3, 1, 1, 4, 1, 3, 1, 5, 1, 5, 4, 1, 6, 1, 7, 4, 7, 1, 8, 1, 11, 4, 19, 16, 18, 1, 9, 1, 13, 4, 25, 16, 38, 29, 1, 10, 1, 15, 4, 31, 16, 58, 57, 47, 1, 11, 1, 17, 4, 37, 16, 78, 64, 117, 76, 1, 12, 1, 19, 4, 43, 16, 98, 64, 187, 193, 123, 1
Offset: 1

Views

Author

L. Edson Jeffery, Jan 12 2013

Keywords

Comments

Antidiagonal sums: {1,3,5,9,16,26,46,78,136,...}.

Examples

			Array begins as
.1..1...1..1...1...1
.2..1...3..4...7..11
.3..1...5..4..13..16
.4..1...7..4..19..16
.5..1...9..4..25..16
.6..1..11..4..31..16
		

Crossrefs

Formula

T(n,k) = 2^{k-1}*Sum_{j=1..n} (cos((2*j-1)*Pi/(2*n+1)))^{k-1}.
Empirical g.f. for row n: F(x) = (Sum_{u=0..n-1} A122765(n,n-1-u)*x^u)/(Sum_{v=0..n} A108299(n,v)*x^v).
Empirical: odd column first differences tend to A000984 = {1, 2, 6, 20, 70, 252, ...} (central binomial coefficients).
Previous Showing 51-57 of 57 results.