# Is there a multidimensional FindSequenceFunction for multi-parameter pattern discovery?

FindSequenceFunction is a great tool for discovering formulas of sequences depending on a single index. OEIS is another tool for the case of integer sequences depending on a single index.

I often find myself looking for patterns in multi-dimensional sequences though, and the automated tools are quite lacking. Are there any automated tools for multidimensional pattern discovery? In my experience, not every multidimensional problem can be divided-and-conquered as the following simple example.

### example

Here's a concrete example: imagine we are given the black-box generator

p[i_Integer, j_Integer] = Binomial[i, j];


and we need to discover its formula depending on two parameters $$i$$ and $$j$$. In this particularly easy example, we can get to the result by using FindSequenceFunction twice:

1. For every value of $$j$$ we can use FindSequenceFunction to discover a formula in $$i$$:

Table[{j, FindSequenceFunction[Table[{i, p[i, j]}, {i, 0, 20}], i]}, {j, 0, 10}]


$$\left\{ \left\{0, 1\right\}, \left\{1, i\right\}, \left\{2, \frac{(i-1) i}{2}\right\}, \left\{3, \frac{(i-2) (i-1) i}{6}\right\}, \left\{4, \frac{(i-3) (i-2) (i-1) i}{24}\right\}, \left\{5, \frac{(i-4) (i-3) (i-2) (i-1) i}{120}\right\}, \left\{6, \frac{(i-5) (i-4) (i-3) (i-2) (i-1) i}{720}\right\}, \left\{7, \frac{(i-6) (i-5) (i-4) (i-3) (i-2) (i-1) i}{5040}\right\}, \left\{8, \frac{(i-7) (i-6) (i-5) (i-4) (i-3) (i-2) (i-1) i}{40320}\right\}, \left\{9, \frac{(i-8) (i-7) (i-6) (i-5) (i-4) (i-3) (i-2) (i-1) i}{362880}\right\}, \left\{10, \frac{(i-9) (i-8) (i-7) (i-6) (i-5) (i-4) (i-3) (i-2) (i-1) i}{3628800}\right\} \right\}$$

1. We can then apply FindSequenceFunction again on this list of formulae:

FindSequenceFunction[%, j]


((-1)^(2 + j) Pochhammer[-i, j])/Pochhammer[1, j]

This is close enough to the desired result that we can proceed with standard tools like FunctionExpand and FullSimplify.