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

A274228 Triangle read by rows: T(n,k) (n>=3, 0<=k<=n-3) = number of n-sequences of 0's and 1's with exactly one pair of adjacent 0's and exactly k pairs of adjacent 1's.

Original entry on oeis.org

2, 3, 2, 4, 4, 2, 5, 8, 5, 2, 6, 12, 12, 6, 2, 7, 18, 21, 16, 7, 2, 8, 24, 36, 32, 20, 8, 2, 9, 32, 54, 60, 45, 24, 9, 2, 10, 40, 80, 100, 90, 60, 28, 10, 2, 11, 50, 110, 160, 165, 126, 77, 32, 11, 2, 12, 60, 150, 240, 280, 252, 168, 96, 36, 12, 2, 13, 72, 195, 350, 455, 448, 364, 216, 117, 40, 13, 2
Offset: 3

Views

Author

Jeremy Dover, Jun 14 2016

Keywords

Examples

			n=3 => 100, 001 -> T(3,0) = 2.
n=4 => 0010, 0100, 1001 -> T(4,0) = 3; 0011, 1100 -> T(4,1) = 2.
Triangle starts:
2,
3, 2,
4, 4, 2,
5, 8, 5, 2,
6, 12, 12, 6, 2,
7, 18, 21, 16, 7, 2,
8, 24, 36, 32, 20, 8, 2,
9, 32, 54, 60, 45, 24, 9, 2,
10, 40, 80, 100, 90, 60, 28, 10, 2,
11, 50, 110, 160, 165, 126, 77, 32, 11, 2,
12, 60, 150, 240, 280, 252, 168, 96, 36, 12, 2,
13, 72, 195, 350, 455, 448, 364, 216, 117, 40, 13, 2,
...
		

Crossrefs

Row sums give A001629.
Cf. A073044.
Columns of table:
T(n,0)=A000027(n-1)
T(n,1)=A007590(n-1)
T(n,2)=A080838(n-1)
T(n,3)=A032091(n)

Programs

  • Mathematica
    Table[(k + 1) (Binomial[Floor[(n + k - 2)/2], k + 1] + Binomial[Floor[(n + k - 3)/2], k + 1]) + 2 Binomial[Floor[(n + k - 3)/2], k], {n, 3, 14}, {k, 0, n - 3}] // Flatten (* Michael De Vlieger, Jun 16 2016 *)
  • PARI
    T(n,k) = (k+1)*(binomial((n+k-2)\2,k+1)+binomial((n+k-3)\2,k+1))+2*binomial((n+k-3)\2,k); \\ Michel Marcus, Jun 17 2016

Formula

T(n,k) = (k+1)*(binomial(floor((n+k-2)/2),k+1)+binomial(floor((n+k-3)/2),k+1))+2*binomial(floor((n+k-3)/2),k).
T(n,k) = (k+1)*A073044(n-2,k+1) + 2*A046854(n-3,k).
T(n,k) = A274742(n,k)+A274742(n-1,k)+A046854(n-3,k).

A060423 Number of obtuse triangles made from vertices of a regular n-gon.

Original entry on oeis.org

0, 0, 0, 0, 0, 5, 6, 21, 24, 54, 60, 110, 120, 195, 210, 315, 336, 476, 504, 684, 720, 945, 990, 1265, 1320, 1650, 1716, 2106, 2184, 2639, 2730, 3255, 3360, 3960, 4080, 4760, 4896, 5661, 5814, 6669, 6840, 7790, 7980, 9030, 9240, 10395, 10626
Offset: 0

Views

Author

Sen-Peng Eu, Apr 05 2001

Keywords

Crossrefs

Programs

  • Magma
    [n*(2*n-3-(-1)^n)*(2*n-7-(-1)^n)/32 : n in [0..60]]; // Wesley Ivan Hurt, Apr 14 2017
  • Maple
    A060423:=n->n*(2*n-3-(-1)^n)*(2*n-7-(-1)^n)/32; seq(A060423(n), n=0..100); # Wesley Ivan Hurt, Dec 31 2013
  • Mathematica
    Table[n(2n-3-(-1)^n)(2n-7-(-1)^n)/32, {n, 0, 100}] (* Wesley Ivan Hurt, Dec 31 2013 *)
    Table[If[EvenQ[n],(n(n-2)(n-4))/8,(n(n-1)(n-3))/8],{n,0,50}] (* Harvey P. Dale, Sep 18 2018 *)
    LinearRecurrence[{1, 3, -3, -3, 3, 1, -1}, {0, 0, 0, 0, 0, 5, 6}, 51] (* Mike Sheppard, Feb 17 2025 *)
  • PARI
    a(n)=polcoeff(x^5*(5+x)/(1-x)/(1-x^2)^3+x*O(x^n),n)
    

Formula

a(n) = n*(n-1)*(n-3)/8 when n odd; n*(n-2)*(n-4)/8 when n even.
G.f.: x^5*(x+5)/((1-x)(1-x^2)^3). - Michael Somos, Jan 30 2004
For n odd, a(n) = A080838(n). - Gerald McGarvey, Sep 14 2008
a(n) = n*(2*n-3-(-1)^n)*(2*n-7-(-1)^n)/32. - Wesley Ivan Hurt, Dec 31 2013
E.g.f.: x*((x - 3)*x*cosh(x) + (x^2 - x + 3)*sinh(x))/8. - Stefano Spezia, May 28 2022
a(n) = a(n-1) + 3*a(n-2) - 3*a(n-3) - 3*a(n-4) + 3*a(n-5) + a(n-6) - a(n-7). - Mike Sheppard, Feb 17 2025
Showing 1-2 of 2 results.