This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A374439 #63 Mar 30 2025 04:25:33 %S A374439 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, %T A374439 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, %U A374439 35,40,15,10,1,1,2,10,18,36,56,56,70,35,30,6,2 %N 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. %C A374439 There are several versions of Lucas and Fibonacci polynomials in this database. Our naming follows the convention of calling polynomials after the values of the polynomials at x = 1. This assumes a regular sequence of polynomials, that is, a sequence of polynomials where degree(p(n)) = n. This view makes the coefficients of the polynomials (the terms of a row) a refinement of the values at the unity. %C A374439 A remarkable property of the polynomials under consideration is that they are dual in this respect. This means they give the Lucas numbers at x = 1 and the Fibonacci numbers at x = -1 (except for the sign). See the example section. %C A374439 The Pell numbers and the dual Pell numbers are also values of the polynomials, at the points x = -1/2 and x = 1/2 (up to the normalization factor 2^n). This suggests a harmonized terminology: To call 2^n*P(n, -1/2) = 1, 0, 1, 2, 5, ... the Pell numbers (A000129) and 2^n*P(n, 1/2) = 1, 4, 9, 22, ... the dual Pell numbers (A048654). %C A374439 Based on our naming convention one could call A162515 (without the prepended 0) the Fibonacci polynomials. In the definition above only the initial values would change to: T(n, k) = k + 1 for k < 1. To extend this line of thought we introduce A374438 as the third triangle of this family. %C A374439 The triangle is closely related to the qStirling2 numbers at q = -1. For the definition of these numbers see A333143. This relates the triangle to A065941 and A103631. %H A374439 Paolo Xausa, <a href="/A374439/b374439.txt">Rows n = 0..150 of the triangle, flattened</a> %H A374439 Peter Luschny, <a href="/A374439/a374439.pdf">Illustrating the polynomials</a>. %F A374439 T(n, k) = 2^k' * binomial(n - k' - (k - k') / 2, (k - k') / 2) where k' = 1 if k is odd and otherwise 0. %F A374439 T(n, k) = (1 + (k mod 2))*qStirling2(n, k, -1), see A333143. %F A374439 2^n*P(n, -1/2) = A000129(n - 1), Pell numbers, P(-1) = 1. %F A374439 2^n*P(n, 1/2) = A048654(n), dual Pell numbers. %F A374439 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 %e A374439 Triangle starts: %e A374439 [ 0] [1] %e A374439 [ 1] [1, 2] %e A374439 [ 2] [1, 2, 1] %e A374439 [ 3] [1, 2, 2, 2] %e A374439 [ 4] [1, 2, 3, 4, 1] %e A374439 [ 5] [1, 2, 4, 6, 3, 2] %e A374439 [ 6] [1, 2, 5, 8, 6, 6, 1] %e A374439 [ 7] [1, 2, 6, 10, 10, 12, 4, 2] %e A374439 [ 8] [1, 2, 7, 12, 15, 20, 10, 8, 1] %e A374439 [ 9] [1, 2, 8, 14, 21, 30, 20, 20, 5, 2] %e A374439 [10] [1, 2, 9, 16, 28, 42, 35, 40, 15, 10, 1] %e A374439 . %e A374439 Table of interpolated sequences: %e A374439 | n | A039834 & A000045 | A000032 | A000129 | A048654 | %e A374439 | n | -P(n,-1) | P(n,1) |2^n*P(n,-1/2)|2^n*P(n,1/2)| %e A374439 | | Fibonacci | Lucas | Pell | Pell* | %e A374439 | 0 | -1 | 1 | 1 | 1 | %e A374439 | 1 | 1 | 3 | 0 | 4 | %e A374439 | 2 | 0 | 4 | 1 | 9 | %e A374439 | 3 | 1 | 7 | 2 | 22 | %e A374439 | 4 | 1 | 11 | 5 | 53 | %e A374439 | 5 | 2 | 18 | 12 | 128 | %e A374439 | 6 | 3 | 29 | 29 | 309 | %e A374439 | 7 | 5 | 47 | 70 | 746 | %e A374439 | 8 | 8 | 76 | 169 | 1801 | %e A374439 | 9 | 13 | 123 | 408 | 4348 | %p A374439 A374439 := (n, k) -> ifelse(k::odd, 2, 1)*binomial(n - irem(k, 2) - iquo(k, 2), iquo(k, 2)): %p A374439 # Alternative, using the function qStirling2 from A333143: %p A374439 T := (n, k) -> 2^irem(k, 2)*qStirling2(n, k, -1): %p A374439 seq(seq(T(n, k), k = 0..n), n = 0..10); %t A374439 A374439[n_, k_] := (# + 1)*Binomial[n - (k + #)/2, (k - #)/2] & [Mod[k, 2]]; %t A374439 Table[A374439[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* _Paolo Xausa_, Jul 24 2024 *) %o A374439 (Python) %o A374439 from functools import cache %o A374439 @cache %o A374439 def T(n: int, k: int) -> int: %o A374439 if k > n: return 0 %o A374439 if k < 2: return k + 1 %o A374439 return T(n - 1, k) + T(n - 2, k - 2) %o A374439 (Python) %o A374439 from math import comb as binomial %o A374439 def T(n: int, k: int) -> int: %o A374439 o = k & 1 %o A374439 return binomial(n - o - (k - o) // 2, (k - o) // 2) << o %o A374439 (Python) %o A374439 def P(n, x): %o A374439 if n < 0: return P(n, x) %o A374439 return sum(T(n, k)*x**k for k in range(n + 1)) %o A374439 def sgn(x: int) -> int: return (x > 0) - (x < 0) %o A374439 # Table of interpolated sequences %o A374439 print("| n | A039834 & A000045 | A000032 | A000129 | A048654 |") %o A374439 print("| n | -P(n,-1) | P(n,1) |2^n*P(n,-1/2)|2^n*P(n,1/2)|") %o A374439 print("| | Fibonacci | Lucas | Pell | Pell* |") %o A374439 f = "| {0:2d} | {1:9d} | {2:4d} | {3:5d} | {4:4d} |" %o A374439 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)))) %o A374439 (Magma) %o A374439 function T(n,k) // T = A374439 %o A374439 if k lt 0 or k gt n then return 0; %o A374439 elif k le 1 then return k+1; %o A374439 else return T(n-1,k) + T(n-2,k-2); %o A374439 end if; %o A374439 end function; %o A374439 [T(n,k): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Jan 23 2025 %o A374439 (SageMath) %o A374439 from sage.combinat.q_analogues import q_stirling_number2 %o A374439 def A374439(n,k): return (-1)^((k+1)//2)*2^(k%2)*q_stirling_number2(n+1, k+1, -1) %o A374439 print(flatten([[A374439(n, k) for k in range(n+1)] for n in range(13)])) # _G. C. Greubel_, Jan 23 2025 %Y A374439 Triangles related to Lucas polynomials: A034807, A114525, A122075, A061896, A352362. %Y A374439 Triangles related to Fibonacci polynomials: A162515, A053119, A168561, A049310, A374441. %Y A374439 Sums include: A000204 (Lucas numbers, row), A000045 & A212804 (even sums, Fibonacci numbers), A006355 (odd sums), A039834 (alternating sign row). %Y A374439 Type m^n*P(n, 1/m): A000129 & A048654 (Pell, m=2), A108300 & A003688 (m=3), A001077 & A048875 (m=4). %Y A374439 Adding and subtracting the values in a row of the table (plus halving the values obtained in this way): A022087, A055389, A118658, A052542, A163271, A371596, A324969, A212804, A077985, A069306, A215928. %Y A374439 Columns include: A040000 (k=1), A000027 (k=2), A005843 (k=3), A000217 (k=4), A002378 (k=5). %Y A374439 Diagonals include: A000034 (k=n), A029578 (k=n-1), abs(A131259) (k=n-2). %Y A374439 Cf. A029578 (subdiagonal), A124038 (row reversed triangle, signed). %Y A374439 Cf. A039961, A065941 (qStirling2), A103631, A108299, A131259. A133607, A194005, A333143, A374438 (m=3). %K A374439 nonn,tabl %O A374439 0,3 %A A374439 _Peter Luschny_, Jul 22 2024