login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A297703
The Genocchi triangle read by rows, T(n,k) for n>=0 and 0<=k<=n.
3
1, 1, 1, 2, 3, 3, 8, 14, 17, 17, 56, 104, 138, 155, 155, 608, 1160, 1608, 1918, 2073, 2073, 9440, 18272, 25944, 32008, 36154, 38227, 38227, 198272, 387104, 557664, 702280, 814888, 891342, 929569, 929569, 5410688, 10623104, 15448416, 19716064, 23281432, 26031912
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
Row sums are A005439 with offset 0.
T(n,0) = A005439 with A005439(0) = 1.
T(n,n) = A110501 with offset 0.
Sequence in context: A108692 A157126 A357655 * A263464 A267563 A166994
KEYWORD
nonn,tabl
AUTHOR
Peter Luschny, Jan 03 2018
STATUS
approved