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 A322942 #30 Sep 21 2023 01:46:30 %S A322942 1,1,1,1,2,1,3,5,3,1,5,12,10,4,1,11,27,28,16,5,1,21,62,75,52,23,6,1, %T A322942 43,137,193,159,85,31,7,1,85,304,480,456,290,128,40,8,1,171,663,1170, %U A322942 1254,916,480,182,50,9,1,341,1442,2793,3336,2750,1652,742,248,61,10,1 %N A322942 Jacobsthal triangle, coefficients of orthogonal polynomials J(n, x) where J(n, 0) are the Jacobsthal numbers (A001045 with a(0) = 1). Triangle read by rows, T(n, k) for 0 <= k <= n. %C A322942 The name 'Jacobsthal triangle' used here is not standard. %H A322942 G. C. Greubel, <a href="/A322942/b322942.txt">Rows n = 0..50 of the triangle, flattened</a> %F A322942 J(n, x) = (x+1)*J(n-1, x) + 2*J(n-2, x) for n >= 3. %F A322942 T(n, k) = [x^k] J(n, x). %F A322942 Equals the Riordan square (cf. A321620) generated by (2*x^2-1)/((x + 1)*(2*x - 1)). %F A322942 Sum_{k=0..n} T(n, k) = A152035(n). %F A322942 Sum_{k=0..n} (-1)^k*T(n, k) = A000007(n). %F A322942 From _G. C. Greubel_, Sep 20 2023: (Start) %F A322942 T(n, k) = [x^k]( [n=0] + (i*sqrt(2))^n*(ChebyshevU(n, (x+1)/(2*sqrt(2)*i)) + ChebyshevU(n-2, (x+1)/(2*sqrt(2)*i))) ). %F A322942 G.f.: (1 - 2*t^2)/(1 - (x+1)*t - 2*t^2). %F A322942 Sum_{k=0..floor(n/2)} T(n-k, k) = (2/3)*[n=0] + A006138(n-1). %F A322942 Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = 2*[n=0] + Fibonacci(n-2). (End) %e A322942 The first few polynomials are: %e A322942 J(0, x) = 1; %e A322942 J(1, x) = x + 1; %e A322942 J(2, x) = x^2 + 2*x + 1; %e A322942 J(3, x) = x^3 + 3*x^2 + 5*x + 3; %e A322942 J(4, x) = x^4 + 4*x^3 + 10*x^2 + 12*x + 5; %e A322942 J(5, x) = x^5 + 5*x^4 + 16*x^3 + 28*x^2 + 27*x + 11; %e A322942 J(6, x) = x^6 + 6*x^5 + 23*x^4 + 52*x^3 + 75*x^2 + 62*x + 21; %e A322942 The triangle starts: %e A322942 [0] 1; %e A322942 [1] 1, 1; %e A322942 [2] 1, 2, 1; %e A322942 [3] 3, 5, 3, 1; %e A322942 [4] 5, 12, 10, 4, 1; %e A322942 [5] 11, 27, 28, 16, 5, 1; %e A322942 [6] 21, 62, 75, 52, 23, 6, 1; %e A322942 [7] 43, 137, 193, 159, 85, 31, 7, 1; %e A322942 [8] 85, 304, 480, 456, 290, 128, 40, 8, 1; %e A322942 [9] 171, 663, 1170, 1254, 916, 480, 182, 50, 9, 1; %p A322942 J := proc(n) option remember; %p A322942 `if`(n < 3, [1, x+1, x^2 + 2*x + 1][n+1], (x+1)*J(n-1) + 2*J(n-2)); %p A322942 sort(expand(%)) end: seq(print(J(n)), n=0..11); # Computes the polynomials. %p A322942 seq(seq(coeff(J(n), x, k), k=0..n), n=0..11); %t A322942 J[n_, x_]:= J[n, x]= If[n<3, (x+1)^n, (x+1)*J[n-1, x] + 2*J[n-2, x]]; %t A322942 T[n_, k_]:= Coefficient[J[n, x], x, k]; %t A322942 Table[T[n, k], {n,0,10}, {k,0,n}]//Flatten (* _Jean-François Alcover_, Jun 17 2019 *) %t A322942 (* Second program *) %t A322942 A322942[n_, k_]:= Coefficient[Series[Boole[n==0] + (I*Sqrt[2])^n*(ChebyshevU[n, (x+1)/(2*Sqrt[2]*I)] + ChebyshevU[n-2, (x+ 1)/(2*Sqrt[2]*I)]), {x,0,50}], x, k]; %t A322942 Table[A322942[n, k], {n,0,12}, {k,0,n}]//Flatten (* _G. C. Greubel_, Sep 20 2023 *) %o A322942 (Sage) # use[riordan_square from A321620] %o A322942 riordan_square((2*x^2 - 1)/((x + 1)*(2*x - 1)), 9) %o A322942 (Magma) %o A322942 R<x>:=PowerSeriesRing(Rationals(), 30); %o A322942 g:= func< n,x | (&+[Binomial(n-k,k)*2^k*(x+1)^(n-2*k): k in [0..Floor(n/2)]]) >; %o A322942 f:= func< n,x | n le 1 select (x+1)^n else g(n,x) - 2*g(n-2,x) >; %o A322942 A322942:= func< n,k | Coefficient(R!( f(n,x) ), k) >; %o A322942 [A322942(n,k): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Sep 20 2023 %Y A322942 Row sums are A152035, alternating row sums are A000007, values at x=1/2 are A323232, values at x=0 (first column) are A152046. %Y A322942 Cf. A000045, A001045, A006138, A321620. %K A322942 nonn,tabl %O A322942 0,5 %A A322942 _Peter Luschny_, Jan 03 2019