A340660 A000079 is the first row. For the second row, subtract A001045. For the third row, subtract A001045 from the second one, etc. The resulting array is read by ascending antidiagonals.
1, 1, 2, 1, 1, 4, 1, 0, 3, 8, 1, -1, 2, 5, 16, 1, -2, 1, 2, 11, 32, 1, -3, 0, -1, 6, 21, 64, 1, -4, -1, -4, 1, 10, 43, 128, 1, -5, -2, -7, -4, -1, 22, 85, 256, 1, -6, -3, -10, -9, -12, 1, 42, 171, 512, 1, -7, -4, -13, -14, -23, -20, -1, 86, 341, 1024
Offset: 0
Examples
Square array: 1, 2, 4, 8, 16, 32, 64, 128, ... = A000079(n) 1, 1, 3, 5, 11, 21, 43, 85, ... = A001045(n+1) 1, 0, 2, 2, 6, 10, 22, 42, ... = A078008(n) 1, -1, 1, -1, 1, -1, 1, -1, ... = A033999(n) 1, -2, 0, -4, -4, -12, -20, -44, ... = -A084247(n) 1, -3, -1, -7, -9, -23, -41, -87, ... = (-1)^n*A140966(n+1) 1, -4, -2, -10, -14, -34, -62, -130, ... = -A135440(n) 1, -5, -3, -13, -19, -45, -83, -173, ... = -A155980(n+3) or -A171382(n+1) ...
Crossrefs
Programs
-
Maple
A:= (n, k)-> (<<0|1>, <2|1>>^k. <<1, 2-n>>)[1$2]: seq(seq(A(d-k, k), k=0..d), d=0..12); # Alois P. Heinz, Jan 21 2021
-
Mathematica
A340660[m_, n_] := LinearRecurrence[{1, 2}, {1, m}, {n}]; Table[Reverse[Table[A340660[m, n + m - 2] // First, {m, 2, -n + 3, -1}]], {n, 1, 11}] // Flatten (* Robert P. P. McKone, Jan 28 2021 *)
-
PARI
T(n, k) = 2^k - n*(2^k - (-1)^k)/3; matrix(10,10,n,k,T(n-1,k-1)) \\ Michel Marcus, Jan 19 2021
Formula
A(n,k) = 2^k - n*round(2^k/3).
Comments