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

A324010 The sum of squares of the number of common points in all pairs of lattice paths from (0,0) to (x,y), for x >= 0, y >= 0 (the unnormalized second moment). The table is read by antidiagonals.

Original entry on oeis.org

1, 4, 4, 9, 26, 9, 16, 92, 92, 16, 25, 240, 474, 240, 25, 36, 520, 1704, 1704, 520, 36, 49, 994, 4879, 8084, 4879, 994, 49, 64, 1736, 11928, 29560, 29560, 11928, 1736, 64, 81, 2832, 25956, 89928, 134450, 89928, 25956, 2832, 81, 100, 4380, 51648, 238440, 498140, 498140, 238440, 51648, 4380, 100
Offset: 0

Views

Author

Günter Rote, Feb 12 2019

Keywords

Examples

			There are two lattice paths from (0,0) to (x,y)=(1,1): P1=(0,0),(1,0),(1,1) and P2=(0,0),(0,1),(1,1), and hence 4 pairs of lattice paths: (P1,P1),(P1,P2),(P2,P1),(P2,P2). The number of common points is 3,2,2,3, respectively, and the sum of the squares of these numbers is 9+4+4+9 = 26 = a(1,1).
Table begins
   1   4    9    16     25 ...
   4  26   92   240    520 ...
   9  92  474  1704   4879 ...
  16 240 1704  8084  29560 ...
  25 520 4879 29560 134450 ...
  ...
		

Crossrefs

See A306687 for the lower triangular half of the same data, read by rows.
See A091044 for the unnormalized first moment (the sum of the number of common points without squaring).

Programs

  • Mathematica
    Table[(# + y + 1) Binomial[# + y + 2, # + 1] Binomial[# + y, #] - Binomial[2 # + 2 y + 2, 2 # + 1]/2 &[x - y], {x, 0, 9}, {y, 0, x}] // Flatten (* Michael De Vlieger, Apr 15 2019 *)
  • PARI
    a(x,y) = (x+y+1)*binomial(x+y+2,x+1)*binomial(x+y,x)-binomial(2*x+2*y+2,2*x+1)/2;
    matrix(10, 10, n, k, a(n-1,k-1)) \\ Michel Marcus, Apr 08 2019

Formula

A(x,y) = (x+y+1) * binomial(x+y+2,x+1) * binomial(x+y,x) - binomial(2*x+2*y+2,2*x+1)/2.
Showing 1-1 of 1 results.