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 A152733 #22 Jul 03 2023 10:36:59 %S A152733 0,0,3,6,18,57,168,504,1515,4542,13626,40881,122640,367920,1103763, %T A152733 3311286,9933858,29801577,89404728,268214184,804642555,2413927662, %U A152733 7241782986,21725348961,65176046880,195528140640,586584421923,1759753265766,5279259797298 %N A152733 a(n) + a(n+1) + a(n+2) = 3^n. %H A152733 Vincenzo Librandi, <a href="/A152733/b152733.txt">Table of n, a(n) for n = 1..1000</a> %H A152733 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (2, 2, 3). %F A152733 From _R. J. Mathar_, Dec 12 2008: (Start) %F A152733 a(n) = 3*A077834(n-3). %F A152733 G.f.: 3*x^3/((1-3*x)*(1+x+x^2)). (End) %F A152733 a(n) = (1/13)*(3^n + 12*cos((2*n*Pi)/3) + 2*sqrt(3)*sin((2*n*Pi)/3)), n=1,2,... - _Zak Seidov_, Dec 12 2008 %e A152733 0 + 0 + 3 = 3^1; 0 + 3 + 6 = 3^2; 3 + 6 + 18 = 3^3; ... %t A152733 k0=k1=0;lst={k0,k1};Do[kt=k1;k1=3^n-k1-k0;k0=kt;AppendTo[lst,k1],{n,1,5!}];lst %t A152733 Rest[CoefficientList[Series[3x^3/((1-3x)(1+x+x^2)),{x,0,30}],x]] (* _Harvey P. Dale_, Aug 31 2014 *) %o A152733 (Magma) [n le 2 select 0 else 3^(n-2) -Self(n-1)-Self(n-2): n in [1..30]]; // _Vincenzo Librandi_, Aug 31 2014 %o A152733 (PARI) x='x+O('x^30); concat([0,0], Vec(3*x^3/((1-3*x)*(1+x+x^2)))) \\ _G. C. Greubel_, Sep 01 2018 %Y A152733 Cf. A152728, A152729, A152730, A152731, A152732, A152725, A152726, A000212. %K A152733 nonn %O A152733 1,3 %A A152733 _Vladimir Joseph Stephan Orlovsky_, Dec 11 2008