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

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

Original entry on oeis.org

1, 2, 4, 8, 11, 18, 22, 32, 37, 50, 56, 72, 79, 98, 106, 128, 137, 162, 172, 200, 211, 242, 254, 288, 301, 338, 352, 392, 407, 450, 466, 512, 529, 578, 596, 648, 667, 722, 742, 800, 821, 882, 904, 968, 991, 1058, 1082, 1152, 1177, 1250, 1276
Offset: 0

Views

Author

N. J. A. Sloane, Jan 12 2000

Keywords

Comments

a(n) gives the number of vertices encountered along the shortest walk that encounters every edge at least once on the complete graph with n + 1 vertices. - Peter Kagey, Nov 17 2016

Examples

			G.f. = 1 + 2*x + 4*x^2 + 8*x^3 + 11*x^4 + 18*x^5 + 22*x^6 + 32*x^7 + 37*x^8 + ...
		

Crossrefs

Cf. A128223.

Programs

  • Magma
    I:=[1,2,4,8,11]; [n le 5 select I[n] else Self(n-1) +2*Self(n-2) -2*Self(n-3) -Self(n-4) +self(n-5): n in [1..30]]; // G. C. Greubel, May 26 2018
  • Mathematica
    CoefficientList[Series[(1+x+2x^3)/((1-x)(1-x^2)^2),{x,0,50}],x] (* or *)
    LinearRecurrence[{1,2,-2,-1,1},{1,2,4,8,11},50] (* Harvey P. Dale, Apr 26 2011 *)
  • PARI
    x='x+O('x^30); Vec((1+x+2*x^3)/((1-x)*(1-x^2)^2)) \\ G. C. Greubel, May 26 2018
    

Formula

Even: a(2*n)= 2* n^2 +n +1, odd: a(2*n-1)= 2* n^2. - Frank Ellermann, Feb 11 2002
a(n) = Sum_{k=0..n} binomial(n, k mod 2). - Paul Barry, Jul 24 2003
a(n) = A128223(n) + 1. - Peter Kagey, Nov 17 2016
E.g.f.: (1 + x)*((2 + x)*cosh(x) + (1 + x)*sinh(x))/2. - Ilya Gutkovskiy, Nov 17 2016

A128222 A127701 * A128174.

Original entry on oeis.org

1, 1, 2, 3, 1, 3, 1, 4, 1, 4, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10
Offset: 1

Views

Author

Gary W. Adamson, Feb 19 2007

Keywords

Comments

Row sums = A128223: (1, 3, 7, 10, 17, 21, 31, 36, ...).

Examples

			First few rows of the triangle:
  1;
  1, 2;
  3, 1, 3;
  1, 4, 1, 4;
  5, 1, 5, 1, 5;
  1, 6, 1, 6, 1, 6;
  7, 1, 7, 1, 7, 1, 7;
  ...
		

Crossrefs

Programs

  • Mathematica
    a128222[n_, k_] := If[EvenQ[n-k], n, 1]/;1<=k<=n
    a128222[r_] := Table[a128222[n, k], {n, 1, r}, {k, 1, n}]
    TableForm[a128222[7]] (* triangle *)
    Flatten[a128222[10]] (* data *) (* Hartmut F. W. Hoft, Mar 08 2017 *)

Formula

A127701 * A128174 as infinite lower triangular matrices. Odd rows: n terms of n, 1, n, ...; even rows: n terms of 1, n, 1, ...

Extensions

Inserted omitted values a(28) = 7 and a(29) = 1, Hartmut F. W. Hoft, Mar 08 2017

A109094 Length of the longest path (repeated edges not allowed) between two arbitrary, distinct nodes in K_n, the complete graph on n vertices.

Original entry on oeis.org

0, 1, 2, 5, 9, 13, 20, 25, 35, 41, 54, 61, 77, 85, 104, 113, 135, 145, 170, 181, 209, 221, 252, 265, 299, 313, 350, 365, 405, 421, 464, 481, 527, 545, 594, 613, 665, 685, 740, 761, 819, 841, 902, 925, 989, 1013, 1080, 1105, 1175, 1201, 1274, 1301, 1377, 1405
Offset: 1

Views

Author

Ryan Propper, Jun 18 2005

Keywords

Examples

			a(4) = 5 because the length of the longest path between any two distinct vertices in K_4 is 5.
		

Crossrefs

Formula

a(1)=0; a(2n+1) = n*(n-1)/2-1 = A014107(n+1), n>0; a(2n)=n*(n-2)/2+1= A001844(n-1). - Martin Fuller, R. J. Mathar and Mitch Harris, Dec 06 2007
O.g.f.: x^2*(x^4-2*x^3-x^2-x-1)/((-1+x)^3 *(x+1)^2) . - R. J. Mathar, Jan 17 2008
Showing 1-3 of 3 results.