OFFSET
0,4
EXAMPLE
The triangle starts:
0: [ 1]
1: [ 1, 1]
2: [ 2, 3, 3]
3: [ 8, 14, 17, 17]
4: [ 56, 104, 138, 155, 155]
5: [ 608, 1160, 1608, 1918, 2073, 2073]
6: [ 9440, 18272, 25944, 32008, 36154, 38227, 38227]
7: [198272, 387104, 557664, 702280, 814888, 891342, 929569, 929569]
PROG
(Julia)
function A297703Triangle(len::Int)
A = fill(BigInt(0), len+2); A[2] = 1
for n in 2:len+1
for k in n:-1:2 A[k] += A[k+1] end
for k in 2: 1:n A[k] += A[k-1] end
println(A[2:n])
end
end
println(A297703Triangle(9))
(Python)
from functools import cache
@cache
def T(n): # returns row n
if n == 0: return [1]
row = [0] + T(n - 1) + [0]
for k in range(n, 0, -1): row[k] += row[k + 1]
for k in range(2, n + 2): row[k] += row[k - 1]
return row[1:]
for n in range(9): print(T(n)) # Peter Luschny, Jun 03 2022
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Peter Luschny, Jan 03 2018
STATUS
approved