<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 <p>
<img src="http
Step1:  Pascal array $\mathcal{P}$
This notebook studies the Riordan array $\mathcal{P}$, aka the Pascal triangle, defined according to the following definition
Step2:  OEIS content about $\mathcal{P}$
<ASSISTANT_TASK:>
Python Code:
%run "../src/start_session.py"
%run "../src/recurrences.py"
import oeis
Explanation: <p>
<img src="http://www.cerm.unifi.it/chianti/images/logo%20unifi_positivo.jpg" 
        alt="UniFI logo" style="float:left;width:20%;height:20%;">
<div align="right"> Massimo Nocentini<br>
<small>
<br>September 27, 2016: refactoring and sync
</small>
</div>
</p>
<div align="center">
<br><b>Abstract</b><br>
In this notebook we study the *Pascal triangle*, locking at it recursively: using it's $A$-sequence, we perform a series of unfolding using the main recurrence relation, where subscripts dependends on *two* dimensions, as rewriting rule. This is a natural enhancement to the case of recurrences where subscripts have *one* dimension only, as the *Fibonacci* sequence; on the other hand, Pascal array is a deeply studied and well know triangle, yet simple, toy we can play with.
</div>
<br>
End of explanation
d = IndexedBase('d')
n, k = symbols('n k')
pascal_recurrence_spec = recurrence_spec(recurrence_eq=Eq(d[n+1, k+1], d[n, k] + d[n, k+1]), 
                                         recurrence_symbol=d, 
                                         variables=[n,k])
pascal_recurrence_spec
unfolded = pascal_recurrence_spec.unfold(depth=2)
unfolded
instantiated = unfolded.instantiate(strategy=raw(substitutions={n:9,k:4}))
instantiated
known_binomials = {d[n,k]:binomial(n,k) for n in [7] for k in range(2,6)}
checked = instantiated.instantiate(strategy=raw(substitutions=known_binomials))
checked
checked.subsume()
based_recurrence_spec = unfolded.instantiate(strategy=based(arity=doubly_indexed()))
based_recurrence_spec
based_recurrence_spec.subsume()
ipython_latex_description(rec_spec=pascal_recurrence_spec, depths=range(6), arity=doubly_indexed())
Explanation: Pascal array $\mathcal{P}$
This notebook studies the Riordan array $\mathcal{P}$, aka the Pascal triangle, defined according to the following definition:
$$\mathcal{P}=\left(\frac{1}{1-t}, \frac{t}{1-t}\right)$$
with $A$-sequence $A(t)=1+t$ and $Z$-sequence $Z(t)=1$.
End of explanation
s = oeis.oeis_search(id=7318)
s()
Explanation: OEIS content about $\mathcal{P}$
End of explanation
<END_TASK>