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.

A342354 M(n,k) = 2*n^2 + 2*k + 1 for 0 <= k <= n and M(n,k) = 2*k^2 + 4*k - 2*n + 1 for 0 <= n <= k; square array M(n,k) read by ascending antidiagonals (n, k >= 0).

Original entry on oeis.org

1, 3, 7, 9, 5, 17, 19, 11, 15, 31, 33, 21, 13, 29, 49, 51, 35, 23, 27, 47, 71, 73, 53, 37, 25, 45, 69, 97, 99, 75, 55, 39, 43, 67, 95, 127, 129, 101, 77, 57, 41, 65, 93, 125, 161, 163, 131, 103, 79, 59, 63, 91, 123, 159, 199, 201, 165, 133, 105, 81, 61, 89, 121, 157, 197, 241, 243, 203, 167, 135, 107, 83, 87, 119, 155, 195, 239, 287
Offset: 0

Views

Author

Petros Hadjicostas, Mar 08 2021

Keywords

Comments

This is a square array defined by J. M. Bergot in A005917 (originally by mistake in A047926). Here is the edited description of the array by this contributor.
Construct an array M with M(0,n) = 2*n^2 + 4*n + 1 = A056220(n+1), M(n,0) = 2*n^2 + 1 = A058331(n) and M(n,n) = 2*n*(n+1) + 1 = A001844(n). Row(n) begins with all the increasing odd numbers from A058331(n) to A001844(n) and column(n) begins with all the decreasing odd numbers from A056220(n+1) to A001844(n). The sum of the terms in row(n) plus those in column(n) minus M(n,n) equals A005917(n+1).

Examples

			Square array M(n,k) (n, k >= 0) begins:
   1,  7, 17, 31, 49, 71, 97, 127, ...
   3,  5, 15, 29, 47, 69, 95, 125, ...
   9, 11, 13, 27, 45, 67, 93, 123, ...
  19, 21, 23, 25, 43, 65, 91, 121, ...
  33, 35, 37, 39, 41, 63, 89, 119, ...
  51, 53, 55, 57, 59, 61, 87, 117, ...
  73, 75, 77, 79, 81, 83, 85, 115, ...
  ...
The triangular array T(n,k) = M(n-k,k) (with rows n >= 0 and columns k = 0..n) is obtained by reading array M by ascending antidiagonals:
   1;
   3,  7;
   9,  5, 17;
  19, 11, 15, 31;
  33, 21, 13, 29, 49;
  51, 35, 23, 27, 47, 71;
  73, 53, 37, 25, 45, 69, 97;
  99, 75, 55, 39, 43, 67, 95, 127;
  ...
		

Crossrefs

Antidiagonal sums are in A342362.

Programs

  • PARI
    tabl(nn) = {my(M=matrix(nn+1,nn+1)); for(n=1, nn+1, for(k=1, nn+1, M[n,k]=if(k == n, 2*n^2-2*n+1, if(k < n, 2*n^2-4*n+2*k+1, 2*k^2-2*n+1)))); M}

Formula

O.g.f. for rectangular M: (x^4*y^4 + 4*x^3*y^4 + 3*x^4*y^2 - 18*x^3*y^3 - x^2*y^4 + 8*x^3*y^2 + 4*x^2*y^3 - 10*x^3*y + 10*x^2*y^2 - 2*x*y^3 + 8*x^2*y + 4*x*y^2 + 3*x^2 - 18*x*y - y^2 + 4*y + 1)/((1 - x)^3*(1 - y)^3*(1 - x*y)^2).
O.g.f. for triangular T: (x^8*y^4 + 4*x^7*y^4 - x^6*y^4 - 18*x^6*y^3 + 3*x^6*y^2 + 4*x^5*y^3 + 8*x^5*y^2 - 2*x^4*y^3 + 10*x^4*y^2 - 10*x^4*y + 4*x^3*y^2 + 8*x^3*y - x^2*y^2 - 18*x^2*y + 3*x^2 + 4*x*y + 1)/((1 - x)^3*(1 - x*y)^3*(1 - x^2*y)^2).

A342397 Expansion of the o.g.f. (2*x^2 + 3*x + 2)*x/((x + 1)^2*(x - 1)^4).

Original entry on oeis.org

0, 2, 7, 18, 35, 62, 98, 148, 210, 290, 385, 502, 637, 798, 980, 1192, 1428, 1698, 1995, 2330, 2695, 3102, 3542, 4028, 4550, 5122, 5733, 6398, 7105, 7870, 8680, 9552, 10472, 11458, 12495, 13602, 14763, 15998, 17290, 18660, 20090, 21602, 23177, 24838, 26565, 28382, 30268, 32248, 34300, 36450
Offset: 0

Views

Author

Petros Hadjicostas, Mar 10 2021

Keywords

Comments

One-half of the antidiagonal sums of array A220508.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(2x^2+3x+2) x/((x+1)^2 (x-1)^4),{x,0,70}],x] (* or *) LinearRecurrence[{2,1,-4,1,2,-1},{0,2,7,18,35,62},70] (* Harvey P. Dale, Jul 08 2023 *)
  • PARI
    /* First program */
    seq1(n)={my(x='x+O('x^n)); Vec((2*x^2 + 3*x + 2)*x/((x + 1)^2*(x - 1)^4), -n)}
    /* Second program (array M is A220508) */
    seq2(nn) = {my(M=matrix(nn+1, nn+1)); my(a=vector(nn+1)); for(n=1, nn+1, for(k=1, nn+1, M[n, k]=if(k == n, n^2-n, if(k < n, n^2-2*n+k, k^2-n)))); for(n=1, nn+1, a[n] = sum(k=1, n, M[n-k+1,k])/2); a}

Formula

a(n) = (n+1)*(1 - (-1)^n)/16 + (7/4)*(binomial(n+3, 3) - binomial(n+2, 2)).
a(n) = (A342362(n) - (n + 1))/4.
a(2*n) = A169607(n) and a(2*n + 1) = 2*A004126(n + 1).
a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6) for n > 5. - Chai Wah Wu, Mar 11 2021
Showing 1-2 of 2 results.