A374439 Triangle read by rows: the coefficients of the Lucas-Fibonacci polynomials. T(n, k) = T(n - 1, k) + T(n - 2, k - 2) with initial values T(n, k) = k + 1 for k < 2.
1, 1, 2, 1, 2, 1, 1, 2, 2, 2, 1, 2, 3, 4, 1, 1, 2, 4, 6, 3, 2, 1, 2, 5, 8, 6, 6, 1, 1, 2, 6, 10, 10, 12, 4, 2, 1, 2, 7, 12, 15, 20, 10, 8, 1, 1, 2, 8, 14, 21, 30, 20, 20, 5, 2, 1, 2, 9, 16, 28, 42, 35, 40, 15, 10, 1, 1, 2, 10, 18, 36, 56, 56, 70, 35, 30, 6, 2
Offset: 0
Examples
Triangle starts: [ 0] [1] [ 1] [1, 2] [ 2] [1, 2, 1] [ 3] [1, 2, 2, 2] [ 4] [1, 2, 3, 4, 1] [ 5] [1, 2, 4, 6, 3, 2] [ 6] [1, 2, 5, 8, 6, 6, 1] [ 7] [1, 2, 6, 10, 10, 12, 4, 2] [ 8] [1, 2, 7, 12, 15, 20, 10, 8, 1] [ 9] [1, 2, 8, 14, 21, 30, 20, 20, 5, 2] [10] [1, 2, 9, 16, 28, 42, 35, 40, 15, 10, 1] . Table of interpolated sequences: | n | A039834 & A000045 | A000032 | A000129 | A048654 | | n | -P(n,-1) | P(n,1) |2^n*P(n,-1/2)|2^n*P(n,1/2)| | | Fibonacci | Lucas | Pell | Pell* | | 0 | -1 | 1 | 1 | 1 | | 1 | 1 | 3 | 0 | 4 | | 2 | 0 | 4 | 1 | 9 | | 3 | 1 | 7 | 2 | 22 | | 4 | 1 | 11 | 5 | 53 | | 5 | 2 | 18 | 12 | 128 | | 6 | 3 | 29 | 29 | 309 | | 7 | 5 | 47 | 70 | 746 | | 8 | 8 | 76 | 169 | 1801 | | 9 | 13 | 123 | 408 | 4348 |
Links
- Paolo Xausa, Rows n = 0..150 of the triangle, flattened
- Peter Luschny, Illustrating the polynomials.
Crossrefs
Sums include: A000204 (Lucas numbers, row), A000045 & A212804 (even sums, Fibonacci numbers), A006355 (odd sums), A039834 (alternating sign row).
Type m^n*P(n, 1/m): A000129 & A048654 (Pell, m=2), A108300 & A003688 (m=3), A001077 & A048875 (m=4).
Programs
-
Magma
function T(n,k) // T = A374439 if k lt 0 or k gt n then return 0; elif k le 1 then return k+1; else return T(n-1,k) + T(n-2,k-2); end if; end function; [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jan 23 2025
-
Maple
A374439 := (n, k) -> ifelse(k::odd, 2, 1)*binomial(n - irem(k, 2) - iquo(k, 2), iquo(k, 2)): # Alternative, using the function qStirling2 from A333143: T := (n, k) -> 2^irem(k, 2)*qStirling2(n, k, -1): seq(seq(T(n, k), k = 0..n), n = 0..10);
-
Mathematica
A374439[n_, k_] := (# + 1)*Binomial[n - (k + #)/2, (k - #)/2] & [Mod[k, 2]]; Table[A374439[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* Paolo Xausa, Jul 24 2024 *)
-
Python
from functools import cache @cache def T(n: int, k: int) -> int: if k > n: return 0 if k < 2: return k + 1 return T(n - 1, k) + T(n - 2, k - 2)
-
Python
from math import comb as binomial def T(n: int, k: int) -> int: o = k & 1 return binomial(n - o - (k - o) // 2, (k - o) // 2) << o
-
Python
def P(n, x): if n < 0: return P(n, x) return sum(T(n, k)*x**k for k in range(n + 1)) def sgn(x: int) -> int: return (x > 0) - (x < 0) # Table of interpolated sequences print("| n | A039834 & A000045 | A000032 | A000129 | A048654 |") print("| n | -P(n,-1) | P(n,1) |2^n*P(n,-1/2)|2^n*P(n,1/2)|") print("| | Fibonacci | Lucas | Pell | Pell* |") f = "| {0:2d} | {1:9d} | {2:4d} | {3:5d} | {4:4d} |" for n in range(10): print(f.format(n, -P(n, -1), P(n, 1), int(2**n*P(n, -1/2)), int(2**n*P(n, 1/2))))
-
SageMath
from sage.combinat.q_analogues import q_stirling_number2 def A374439(n,k): return (-1)^((k+1)//2)*2^(k%2)*q_stirling_number2(n+1, k+1, -1) print(flatten([[A374439(n, k) for k in range(n+1)] for n in range(13)])) # G. C. Greubel, Jan 23 2025
Formula
T(n, k) = 2^k' * binomial(n - k' - (k - k') / 2, (k - k') / 2) where k' = 1 if k is odd and otherwise 0.
T(n, k) = (1 + (k mod 2))*qStirling2(n, k, -1), see A333143.
2^n*P(n, -1/2) = A000129(n - 1), Pell numbers, P(-1) = 1.
2^n*P(n, 1/2) = A048654(n), dual Pell numbers.
T(2*n, n) = (1/2)*(-1)^n*( (1+(-1)^n)*A005809(n/2) - 2*(1-(-1)^n)*A045721((n-1)/2) ). - G. C. Greubel, Jan 23 2025
Comments