OFFSET
0,4
COMMENTS
The Akiyama-Tanigawa is a sequence-to-sequence transformation AT := A -> B. If A(n) = 1/(n + 1) then B(n) are the Bernoulli numbers. Tracing the algorithm generates a triangle where the right edge is sequence A and the left edge is its transform B.
FORMULA
T(n, k) = n^2 if n=k, otherwise (k + 1)*(2^(n - k)*(k + 2) - 3). - Detlef Meya, Apr 19 2024
EXAMPLE
Triangle starts:
0: 0
1: 1, 1
2: 5, 6, 4
3: 13, 18, 15, 9
4: 29, 42, 39, 28, 16
5: 61, 90, 87, 68, 45, 25
6: 125, 186, 183, 148, 105, 66, 36
7: 253, 378, 375, 308, 225, 150, 91, 49
MAPLE
ATProw := proc(k, n) local m, j, A;
for m from 0 by 1 to n do
A[m] := m^k;
for j from m by -1 to 1 do
A[j - 1] := j * (A[j] - A[j - 1])
od od; convert(A, list) end:
ATPtriangle := (p, len) -> local k;
ListTools:-Flatten([seq(ATProw(p, k), k = 0..len)]):
ATPtriangle(2, 9);
MATHEMATICA
T[n, k] := If[n==k, n^2, (k+1)*(2^(n-k)*(k+2)-3)]; Flatten[Table[T[n, k], {n, 0, 9}, {k, 0, n}]] (* Detlef Meya, Apr 19 2024 *)
PROG
(Python)
# See function ATPowList in A371761.
(Julia)
function ATPtriangle(k::Int, len::Int)
A = Vector{BigInt}(undef, len)
B = Vector{Vector{BigInt}}(undef, len)
for n in 0:len-1
A[n+1] = n^k
for j = n:-1:1
A[j] = j * (A[j+1] - A[j])
end
B[n+1] = A[1:n+1]
end
return B
end
for (n, row) in enumerate(ATPtriangle(2, 9))
println("$(n-1): ", row)
end
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Peter Luschny, Apr 15 2024
STATUS
approved