cp's OEIS Frontend

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.

A193653 Q-residue of the Delannoy triangle A008288, where Q is the triangular array (t(i,j)) given by t(i,j)=1.

This page as a plain text file.
%I A193653 #36 Sep 08 2022 08:45:58
%S A193653 1,2,6,20,70,248,882,3140,11182,39824,141834,505148,1799110,6407624,
%T A193653 22821090,81278516,289477726,1030990208,3671926074,13077758636,
%U A193653 46577128054,165886901432,590814960402,2104218684068,7494285973006,26691295287152,95062457807466
%N A193653 Q-residue of the Delannoy triangle A008288, where Q is the triangular array (t(i,j)) given by t(i,j)=1.
%C A193653 For the definition of Q-residue, see A193649.
%C A193653 This sequence gives the number of closed walks from the two vertices having loops in the digraph defined by its adjacency matrix A = (2,1,1; 1,2,1; 1,1,0). - _David Neil McGrath_, Aug 22 2014
%H A193653 Colin Barker, <a href="/A193653/b193653.txt">Table of n, a(n) for n = 0..1000</a>
%H A193653 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (4,-1,-2).
%F A193653 From _David Neil McGrath_, Aug 22 2014: (Start)
%F A193653 a(n) = 4*a(n-1) - a(n-2) - 2*a(n-3).
%F A193653 a(n-1) = (1,1) and (2,2) elements of A^(n-1) where A=(2,1,1; 1,2,1; 1,1,0) and n>1. (End)
%F A193653 G.f.: (1-2*t-t^2)/(1-4*t+t^2+2*t^3). - _Robert Israel_, Aug 22 2014
%F A193653 a(n) = (34 + (17-3*sqrt(17))*((3-sqrt(17))/2)^n + ((3+sqrt(17))/2)^n*(17+3*sqrt(17)))/68. - _Colin Barker_, Sep 02 2016
%F A193653 From _G. C. Greubel_, May 25 2021: (Start)
%F A193653 a(n) = (1/2)*(1 + (i*sqrt(2))^n * ChebyshevU(n, -3*i/(2*sqrt(2)))).
%F A193653 a(n) = (1/2)*( 1 + Sum_{j=0..floor(n/2)} binomial(n-k,k)*2^k*3^(n-2*k) ). (End)
%t A193653 (* First program *)
%t A193653 q[n_, k_] := 1;
%t A193653 r[0] = 1; r[k_]:= Sum[q[k-1, i]*r[k-1-i], {i, 0, k-1}]
%t A193653 p[n_, k_]:= p[n, k]= If[k==0 || k==n, 1, p[n-1, k-1] + p[n-2, k-1] + p[n-1, k]];  (* A008288, Delannoy *)
%t A193653 v[n_]:= Sum[p[n, k]*r[n-k], {k, 0, n}];
%t A193653 Table[v[n], {n, 0, 16}]    (* A193653 *)
%t A193653 TableForm[Table[q[i, k], {i, 0, 4}, {k, 0, i}]]
%t A193653 Table[r[k], {k, 0, 8}]  (* 2^k *)
%t A193653 TableForm[Table[p[n, k], {n, 0, 4}, {k, 0, n}]]
%t A193653 (* Second program *)
%t A193653 LinearRecurrence[{4,-1,-2}, {1,2,6}, 40] (* _G. C. Greubel_, May 25 2021 *)
%o A193653 (PARI) Vec((1-2*t-t^2)/(1-4*t+t^2+2*t^3) + O(t^40)) \\ _Michel Marcus_, Aug 23 2014
%o A193653 (PARI) a(n) = round((34+(17-3*sqrt(17))*((3-sqrt(17))/2)^n+((3+sqrt(17))/2)^n*(17+3*sqrt(17)))/68) \\ _Colin Barker_, Sep 02 2016
%o A193653 (Magma) [n le 3 select Factorial(n) else 4*Self(n-1) -Self(n-2) -2*Self(n-3): n in [1..41]]; // _G. C. Greubel_, May 25 2021
%o A193653 (Sage) [(1/2)*(1 + sum(binomial(n-k,k)*2^k*3^(n-2*k) for k in (0..n//2))) for n in (0..40)] # _G. C. Greubel_, May 25 2021
%Y A193653 Cf. A008288, A193649.
%K A193653 nonn,easy
%O A193653 0,2
%A A193653 _Clark Kimberling_, Aug 02 2011