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

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

Original entry on oeis.org

1, 1, 3, 5, 13, 25, 59, 121, 273, 577, 1275, 2733, 5981, 12905, 28115, 60849, 132289, 286721, 622739, 1350613, 2932109, 6361209, 13806923, 29958441, 65018001, 141086401, 306181963, 664423165, 1441882653, 3128970185, 6790194979, 14735222881, 31976837633
Offset: 0

Views

Author

Sean A. Irvine, Jun 02 2025

Keywords

Comments

The number of walks of length n in the 4-vertex graph {{0,1}, {1,2}, {1,3}, {2,3}} starting at vertex 0 (see Example).
Also, a(n+1) is the number of such walks in the same graph starting at vertex 1.

Examples

			Consider walks starting at 0 in the following graph:
      2
     /|
  0-1 |
     \|
      3
The 5 walks of length 3 are 0-1-0-1, 0-1-2-1, 0-1-2-3, 0-1-3-1, and 0-1-3-2.
		

Crossrefs

Cf. A087640 (walks starting at 2).
Cf. A000079 (missing edge {0,1}), A108411 (missing edge {2,3}), A026581 (adding edge {0,2}), A000244 (K4).

Programs

  • Maple
    a:= n-> (<<0|1|0>, <0|0|1>, <-1|3|1>>^n. <<1,1,3>>)[1,1]:
    seq(a(n), n=0..32);  # Alois P. Heinz, Jun 04 2025
  • Mathematica
    LinearRecurrence[{1,3,-1},{1,1,3},33] (* or *) CoefficientList[Series[ (1-x^2) / (1-x-3*x^2+x^3),{x,0,32}],x] (* James C. McMahon, Jun 02 2025 *)

Formula

a(n) = A052973(n) + A052973(n-1). a(n) = A087640(n+1) - A087640(n). - R. J. Mathar, Jun 03 2025

A087956 a(n) is the square of the n-th partial sum minus the n-th partial sum of the squares, divided by a(n-1), for all n>=1, starting with a(0)=1, a(1)=3.

Original entry on oeis.org

1, 3, 2, 11, 14, 45, 76, 197, 380, 895, 1838, 4143, 8762, 19353, 41496, 90793, 195928, 426811, 923802, 2008307, 4352902, 9454021, 20504420, 44513581, 96572820, 209609143, 454814022, 987068631, 2141901554, 4648293425, 10086929456
Offset: 0

Views

Author

Paul D. Hanna, Sep 16 2003

Keywords

Examples

			a(4) = 14 since ((1+3+2+11)^2 - (1^2+3^2+2^2+11^2))/11 = (17^2-135)/11 = 14.
		

Crossrefs

Essentially the same as A052973.

Programs

  • PARI
    a(0)=1; a(1)=3; for(n=2,50,a(n)=((sum(k=0,n,a(k))^2-sum(k=0,n,a(k)^2))/a(n-1))

Formula

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

A087957 a(n) is the square of the n-th partial sum minus the n-th partial sum of the squares, divided by a(n-1), for all n>=1, starting with a(0)=1, a(1)=4.

Original entry on oeis.org

1, 4, 2, 14, 16, 56, 90, 242, 456, 1092, 2218, 5038, 10600, 23496, 50258, 110146, 237424, 517604, 1119730, 2435118, 5276704, 11462328, 24857322, 53967602, 117077240, 254122724, 551386842, 1196677774, 2596715576, 5635362056
Offset: 0

Views

Author

Paul D. Hanna, Sep 16 2003

Keywords

Examples

			a(4) = 16 since ((1+4+2+14)^2 - (1^2+4^2+2^2+14^2))/14 = (21^2-217)/14 = 16.
		

Crossrefs

Programs

  • PARI
    a(0)=1; a(1)=4; for(n=2,50,a(n)=((sum(k=0,n,a(k))^2-sum(k=0,n,a(k)^2))/a(n-1))

Formula

a(n) = a(n-1) + 3*a(n-2) - a(n-3) for n>3.
G.f.: (1+3*x-5*x^2+x^3)/(1-x-3*x^2+x^3).

A087958 a(n) is the square of the n-th partial sum minus the n-th partial sum of the squares, divided by a(n-1), for all n>=1, starting with a(0)=1, a(1)=5.

Original entry on oeis.org

1, 5, 2, 17, 18, 67, 104, 287, 532, 1289, 2598, 5933, 12438, 27639, 59020, 129499, 278920, 608397, 1315658, 2861929, 6200506, 13470635, 29210224, 63421623, 137581660, 298636305, 647959662, 1406286917, 3051529598, 6622430687
Offset: 0

Views

Author

Paul D. Hanna, Sep 16 2003

Keywords

Examples

			a(4) = 18 since ((1+5+2+17)^2 - (1^2+5^2+2^2+17^2))/17 = (25^2-319)/17 = 18.
		

Crossrefs

Programs

  • Mathematica
    Join[{1},LinearRecurrence[{1,3,-1},{5,2,17},30]] (* Harvey P. Dale, Jul 07 2011 *)
  • PARI
    a(0)=1; a(1)=5; for(n=2,50,a(n)=((sum(k=0,n,a(k))^2-sum(k=0,n,a(k)^2))/a(n-1))

Formula

a(n) = a(n-1) + 3*a(n-2) - a(n-3) for n>3.
G.f.: (1+4*x-6*x^2+x^3)/(1-x-3*x^2+x^3).

A088016 To obtain a(n+1), add the square of the n-th partial sum to the n-th partial sum of the squares, then divide this result by a(n), for all n >= 0, with a(0)=1.

Original entry on oeis.org

1, 1, 6, 17, 56, 179, 576, 1851, 5950, 19125, 61474, 197597, 635140, 2041543, 6562172, 21092919, 67799386, 217928905, 700493182, 2251609065, 7237391472, 23263290299, 74775653304, 240352858739, 772570939222, 2483290023101
Offset: 0

Views

Author

Paul D. Hanna, Sep 18 2003

Keywords

Examples

			G.f.: A(x) = 1 + x + 6*x^2 + 17*x^3 + 56*x^4 + 179*x^5 + 576*x^6 + ...
where A(x) * (1 - 3*x - x^2 + x^3) = 1 - 2*x + 2*x^2 - x^3.
Illustration of the initial terms: set a(0) = a(1) = 1, then
a(2) = ((1+1)^2 + (1^2 + 1^2))/1 = 6;
a(3) = ((1+1+6)^2 + (1^2 + 1^2 + 6^2))/6 = 17;
a(4) = ((1+1+6+17)^2 + (1^2 + 1^2 + 6^2 + 17^2))/17 = 56;
a(5) = ((1+1+6+17+56)^2 + (1^2 + 1^2 + 6^2 + 17^2 + 56^2))/56 = 179; ...
		

Crossrefs

Programs

  • GAP
    a:=[1,6,17];; for n in [4..40] do a[n]:=3*a[n-1]+a[n-2]-a[n-3]; od; Concatenation([1], a); # G. C. Greubel, Oct 27 2019
  • Magma
    I:=[1,6,17]; [1] cat [n le 3 select I[n] else 3*Self(n-1) +Self(n-2) -Self(n-3): n in [1..30]]; // G. C. Greubel, Oct 27 2019
    
  • Maple
    seq(coeff(series((1-2*x+2*x^2-x^3)/(1-3*x-x^2+x^3), x, n+1), x, n), n = 0 .. 40); # G. C. Greubel, Oct 27 2019
  • Mathematica
    LinearRecurrence[{3,1,-1},{1,1,6,17},40] (* Harvey P. Dale, Nov 06 2012 *)
  • PARI
    a(n)=(sum(k=0,n-1,a(k))^2+sum(k=0,n-1,a(k)^2))/a(n-1)
    
  • PARI
    my(x='x+O('x^40)); Vec((1-2*x+2*x^2-x^3)/(1-3*x-x^2+x^3)) \\ G. C. Greubel, Oct 27 2019
    
  • Sage
    def A088016_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P((1-2*x+2*x^2-x^3)/(1-3*x-x^2+x^3)).list()
    A088016_list(40) # G. C. Greubel, Oct 27 2019
    

Formula

a(n) = 3*a(n-1) + a(n-2) - a(n-3) for n>3.
G.f.: (1-2*x+2*x^2-x^3) / (1-3*x-x^2+x^3).
G.f.: A(x) = A030186(x) * (1-x+x^2), where A030186(x) = gf of A030186.
Showing 1-5 of 5 results.