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.

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

A087640 To obtain a(n+1), take the square of the n-th partial sum, minus the sum of the first n squared terms, then divide this difference by a(n); for all n>1, starting with a(0)=1, a(1)=1.

Original entry on oeis.org

1, 1, 2, 5, 10, 23, 48, 107, 228, 501, 1078, 2353, 5086, 11067, 23972, 52087, 112936, 245225, 531946, 1154685, 2505298, 5437407, 11798616, 25605539, 55563980, 120581981, 261668382, 567850345, 1232273510, 2674156163, 5803126348
Offset: 0

Views

Author

Paul D. Hanna, Sep 15 2003

Keywords

Comments

For n > 0, a(n) counts the number of walks of length n-1 starting at vertex A in the undirected graph with edge set {(A, B), (A, C), (B, C), (C, D)}. - Noah Niederklein, Jun 07 2025

Crossrefs

Cf. A052973.

Programs

  • Mathematica
    CoefficientList[Series[(1-2x^2+x^3)/(1-x-3x^2+x^3),{x,0,40}],x] (* or *) LinearRecurrence[{1,3,-1},{1,1,2,5},40] (* Harvey P. Dale, Dec 06 2015 *)
  • PARI
    {a(n) = if(n<=1,1,( sum(k=0, n-1, a(k))^2 - sum(k=0, n-1, a(k)^2) )/a(n-1))}
    for(n=0,40,print1(a(n),", "))

Formula

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

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).

A117316 Riordan array ((1-x)/(1-x-2x^2),x(1-x)/(1-x-2x^2)).

Original entry on oeis.org

1, 0, 1, 2, 0, 1, 2, 4, 0, 1, 6, 4, 6, 0, 1, 10, 16, 6, 8, 0, 1, 22, 28, 30, 8, 10, 0, 1, 42, 72, 54, 48, 10, 12, 0, 1, 86, 148, 158, 88, 70, 12, 14, 0, 1, 170, 336, 342, 288, 130, 96, 14, 16, 0, 1, 342, 716, 846, 648, 470, 180, 126, 16, 18, 0, 1
Offset: 0

Views

Author

Paul Barry, Mar 07 2006

Keywords

Comments

Product of A007318 and alternating sign version of A073370. Row sums are A001333. Diagonal sums are A052973. First column is A078008. Convolution array for A078008.

Examples

			Triangle begins
1,
0, 1,
2, 0, 1,
2, 4, 0, 1,
6, 4, 6, 0, 1,
10, 16, 6, 8, 0, 1,
22, 28, 30, 8, 10, 0, 1,
42, 72, 54, 48, 10, 12, 0, 1
		

Formula

T(n,k)=sum{j=0..n-k,sum{i=0..k+1, C(k+1,i)C(k+j,j)C(n-i-j,n-k-i-j)(-1)^(i+j)2^(n-k-i-j)}}
T(n,k)=T(n-1,k)+T(n-1,k-1)+2*T(n-2,k)-T(n-2,k-1), T(0,0)= 1, T(1,0)=0, T(1,1)=1, T(n,k)=0 if k<0 or if k>n. - Philippe Deléham, Jan 04 2013
Showing 1-4 of 4 results.