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.

A118402 Row sums of triangle A118401.

Original entry on oeis.org

1, 1, 3, 1, 5, -1, 7, -3, 9, -5, 11, -7, 13, -9, 15, -11, 17, -13, 19, -15, 21, -17, 23, -19, 25, -21, 27, -23, 29, -25, 31, -27, 33, -29, 35, -31, 37, -33, 39, -35, 41, -37, 43, -39, 45, -41, 47, -43, 49, -45, 51, -47, 53, -49, 55, -51, 57, -53, 59, -55, 61, -57, 63, -59, 65, -61, 67, -63, 69, -65, 71
Offset: 0

Views

Author

Paul D. Hanna, Apr 27 2006

Keywords

Crossrefs

Programs

  • Maple
    a := n -> `if`(n=1, 1, (5+(-1)^n*(2*n-3))/2);
    seq(a(n), n=0..70); # Peter Luschny, Aug 04 2014
  • Mathematica
    Join[{1, 1}, LinearRecurrence[{-1, 1, 1}, {3, 1, 5}, 70]] (* Jean-François Alcover, Jun 13 2019 *)
  • PARI
    {a(n)=polcoeff((1+2*x+2*x^2)*(1+x^2)/(1+x+x*O(x^n))^2/(1-x),n,x)}

Formula

G.f.: (1+2*x+2*x^2)*(1+x^2)/(1+x)^2/(1-x).
a(n^2-n+2) = A118403(n).
a(2n) = 2n+1, a(2n+1) = 3-2n, n>0. - Ralf Stephan, Aug 18 2013
a(n) = (5+(-1)^n*(2*n-3))/2 for n>1. - Peter Luschny, Aug 04 2014

A118401 Triangle, read by rows, equal to the matrix square of triangle A118400; also equals the matrix inverse of triangle A118407.

Original entry on oeis.org

1, 0, 1, 2, 0, 1, -2, 2, 0, 1, 4, -2, 2, 0, 1, -6, 4, -2, 2, 0, 1, 8, -6, 4, -2, 2, 0, 1, -10, 8, -6, 4, -2, 2, 0, 1, 12, -10, 8, -6, 4, -2, 2, 0, 1, -14, 12, -10, 8, -6, 4, -2, 2, 0, 1, 16, -14, 12, -10, 8, -6, 4, -2, 2, 0, 1, -18, 16, -14, 12, -10, 8, -6, 4, -2, 2, 0, 1, 20, -18, 16, -14, 12, -10, 8, -6, 4, -2, 2, 0, 1
Offset: 0

Views

Author

Paul D. Hanna, Apr 27 2006

Keywords

Comments

This triangle has an integer matrix square-root (A118400) if the main diagonal of the square-root is allowed to be signed. Even though the columns of this triangle are all the same, the columns of the matrix square-root A118400 are all different.

Examples

			Triangle begins:
1;
0, 1;
2, 0, 1;
-2, 2, 0, 1;
4,-2, 2, 0, 1;
-6, 4,-2, 2, 0, 1;
8,-6, 4,-2, 2, 0, 1;
-10, 8,-6, 4,-2, 2, 0, 1;
12,-10, 8,-6, 4,-2, 2, 0, 1;
-14, 12,-10, 8,-6, 4,-2, 2, 0, 1;
16,-14, 12,-10, 8,-6, 4,-2, 2, 0, 1; ...
		

Crossrefs

Cf. A118400 (matrix square-root), A118402 (row sums), A118403 (unsigned row sums), A118407 (matrix inverse).

Programs

  • PARI
    {T(n,k)=polcoeff(polcoeff((1+2*x+2*x^2)*(1+x^2)/(1+x)^2/(1-x*y+x*O(x^n)),n,x)+y*O(y^k),k,y)}

Formula

G.f.: A(x,y) = (1 + 2*x + 2*x^2)*(1+x^2)/(1+x)^2/(1-x*y). Column g.f.: (1 + 2*x + 2*x^2)*(1+x^2)/(1+x)^2.

A376832 Irregular triangle read by rows: the n-th row gives the number of points of an n X n square lattice that lie above or to the left of a line of increasing slope that passes through two lattice points one of which is the bottom-left corner of the lattice, (0, 0).

Original entry on oeis.org

2, 1, 0, 6, 5, 3, 2, 0, 12, 11, 10, 9, 6, 5, 4, 3, 0, 20, 19, 18, 17, 16, 15, 14, 10, 9, 8, 7, 6, 5, 4, 0, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 0, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 0
Offset: 2

Views

Author

Stefano Spezia, Dec 22 2024

Keywords

Comments

The increasing slopes of the line are given by the Farey series of order n - 1. Specifically, they are given by the fractions A006842(n-1)/A006843(n-1) followed by their reciprocals A006843(n-1)/A006842(n-1) in reverse order, with the fraction 1/1 included only once.

Examples

			The irregular triangle begins as:
   2,  1,  0;
   6,  5,  3,  2,  0;
  12, 11, 10,  9,  6,  5,  4,  3, 0;
  20, 19, 18, 17, 16, 15, 14, 10, 9, 8, 7, 6, 5, 4, 0;
  ...
		

Crossrefs

Cf. A002378, A006842, A006843, A118403 (row lengths), A161680, A379540 (row sums).

Programs

  • Mathematica
    A118403[n_]:=SeriesCoefficient[(1-2*x+2*x^2)*(1+x^2)/(1-x)^3,{x,0,n}]; T[n_,k_]:=If[1<=k<(A118403[n]+1)/2,n(n-1)-k+1,If[(A118403[n]+1)/2<=k<A118403[n],n(n-1)/2-k+(A118403[n]+1)/2,0]]; Table[T[n,k],{n,2,7},{k,A118403[n]}]//Flatten

Formula

T(n, k) = n*(n - 1) - k + 1 for 1 <= k < (A118403(n)+1)/2.
T(n, k) = n*(n - 1)/2 - k + (A118403(n)+1)/2 for (A118403(n)+1)/2 <= k < A118403(n).
T(n, A118403(n)) = 0.
Showing 1-3 of 3 results.