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 A061982 #19 Dec 29 2024 14:28:32 %S A061982 0,0,3,17,66,222,701,2151,6516,19628,58983,177069,531350,1594218, %T A061982 4782849,14348771,43046568,129139992,387420299,1162261257,3486784170, %U A061982 10460352950,31381059333,94143178527,282429536156,847288609092,2541865827951,7625597484581,22876792454526 %N A061982 a(n) = 3^n - (n+1)*(n+2)/2. %H A061982 Harry J. Smith, <a href="/A061982/b061982.txt">Table of n, a(n) for n = 0..200</a> %H A061982 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (6,-12,10,-3). %F A061982 From _G. C. Greubel_, Jun 13 2022: (Start) %F A061982 a(n) = 3^n - binomial(n+2, 2). %F A061982 G.f.: x^2*(3-x)/((1-x)^3 * (1-3*x)). %F A061982 E.g.f.: exp(3*x) - (1/2)*(2 + 4*x + x^2)*exp(x). (End) %t A061982 LinearRecurrence[{6,-12,10,-3}, {0,0,3,17}, 40] (* _G. C. Greubel_, Jun 13 2022 *) %o A061982 (PARI) a(n) = { 3^n - (n + 1)*(n + 2)/2 } \\ _Harry J. Smith_, Jul 29 2009 %o A061982 (Magma) [3^n -Binomial(n+2,2): n in [0..40]]; // _G. C. Greubel_, Jun 13 2022 %o A061982 (SageMath) [3^n -binomial(n+2,2) for n in (0..40)] # _G. C. Greubel_, Jun 13 2022 %Y A061982 Column of A061980. %Y A061982 Cf. A000217, A000244. %K A061982 nonn,easy %O A061982 0,3 %A A061982 _Henry Bottomley_, May 24 2001