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.

A099581 a(n) = Sum_{k=0..floor(n/2)} binomial(n-k,k-1)*3^(n-k-1).

This page as a plain text file.
%I A099581 #13 Jul 24 2022 03:59:11
%S A099581 0,0,1,3,15,54,216,810,3105,11745,44631,169128,641520,2431944,9221121,
%T A099581 34959195,132543135,502506990,1905156936,7222991778,27384465825,
%U A099581 103822372809,393620574951,1492328843280,5657848431840,21450531825360
%N A099581 a(n) = Sum_{k=0..floor(n/2)} binomial(n-k,k-1)*3^(n-k-1).
%C A099581 In general a(n) = Sum_{k=0..floor(n/2)} binomial(n-k,k-1)*r^(n-k-1) has g.f. x^2/((1-r*x^2)*(1-r*x-r*x^2)) and satisfies a(n) = r*a(n-1) + 2*r*a(n-2) - r^2*a(n-3) - r^2*a(n-4).
%H A099581 G. C. Greubel, <a href="/A099581/b099581.txt">Table of n, a(n) for n = 0..1000</a>
%H A099581 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (3,6,-9,-9).
%F A099581 G.f.: x^2/((1-3*x^2)*(1-3*x-3*x^2)).
%F A099581 a(n) = 3*a(n-1) + 6*a(n-2) - 9*a(n-3) - 9*a(n-4).
%F A099581 From _G. C. Greubel_, Jul 23 2022: (Start)
%F A099581 a(n) = (2*(-i*sqrt(3))^(n-1)*ChebyshevU(n-1, i*sqrt(3)/2)  - (1-(-1)^n)*3^((n - 1)/2))/6.
%F A099581 E.g.f.: (4*exp(3*x/2)*sinh(sqrt(21)*x/2) - 2*sqrt(7)*sinh(sqrt(3)*x))/(6*sqrt(21)). (End)
%t A099581 LinearRecurrence[{3,6,-9,-9},{0,0,1,3},40] (* _Harvey P. Dale_, Jun 07 2021 *)
%o A099581 (Magma) [n le 4 select Floor((n-1)^2/3) else 3*Self(n-1) +6*Self(n-2) -9*Self(n-3) -9*Self(n-4): n in [1..41]]; // _G. C. Greubel_, Jul 23 2022
%o A099581 (SageMath)
%o A099581 @CachedFunction
%o A099581 def a(n):
%o A099581     if (n<4): return floor(n^2/3)
%o A099581     else: return 3*a(n-1) + 6*a(n-2) - 9*a(n-3) - 9*a(n-4)
%o A099581 [a(n) for n in (0..40)] # _G. C. Greubel_, Jul 23 2022
%Y A099581 Cf. A030195, A099177, A099582.
%K A099581 easy,nonn
%O A099581 0,4
%A A099581 _Paul Barry_, Oct 23 2004