Problem 992
Another Frog Jumping
There are $n+1$ stones in a pond, numbered $0$ to $n$.
A frog starts by jumping onto stone $0$. It then jumps between the stones, only ever jumping to adjacent ones. For fixed $k$, it makes exactly $k+i$ visits to each stone $i$ for $0 \le i \lt n$; however, there are no restrictions on the number of times stone $n$ is visited. The frog can finish on any stone.
If $n=3$ and $k=2$ it would visit stone $0$ two times, stone $1$ three times and stone $2$ four times.
One way of achieving this is:
$0 \to 1 \to 0 \to 1 \to 2 \to 3 \to 2 \to 1 \to 2 \to 3 \to 2$.
Let $J(n,k)$ be the number of ways the frog can make such a journey. For example, $J(3,2) = 17$, $J(6,1) = 1320$ and $J(6,5) = 16793280$.
Find $\displaystyle \sum_{s=0}^4 J(500,10^s)$. Give your answer modulo $987898789$.
又一个青蛙跳跃问题
池塘中有$n+1$块石头,编号为$0$到$n$。
一只青蛙首先跳上石头$0$,然后开始在石头之间跳跃,但每次只能跳到相邻的石头上。对于给定的$k$,它必须恰好跳到石头$i$上$k+i$次,其中$0 \le i \lt n$;但它可以跳到石头$n$上任意次。这段跳跃旅程可以在任意一块石头上结束。
若$n=3$,$k=2$,则石头$0$必须被跳到过两次,石头$1$被跳到过三次,石头$2$被跳到过四次。
其中一种可行的跳跃方案为:
$0 \to 1 \to 0 \to 1 \to 2 \to 3 \to 2 \to 1 \to 2 \to 3 \to 2$。
记$J(n,k)$为青蛙完成这段旅程的可行方案数目。例如,$J(3,2) = 17$,$J(6,1) = 1320$,$J(6,5) = 16793280$。
求$\displaystyle \sum_{s=0}^4 J(500,10^s)$,并对$987898789$取余作为你的答案。