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 A271388 #22 Feb 07 2025 15:37:55 %S A271388 0,1,2,6,22,89,372,1570,6644,28137,119182,504854,2138586,9059185, %T A271388 38375312,162560418,688616968,2917028273,12356730042,52343948422, %U A271388 221732523710,939274043241,3978828696652,16854588829826,71397184015932,302443324893529,1281170483590022 %N A271388 a(n) = 4*a(n-1) + a(n-2) - n for n > 1, with a(0) = 0, a(1) = 1. %H A271388 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (6,-8,2,1). %F A271388 G.f.: x*(1 - 4*x + 2*x^2)/((1 - x)^2*(1 - 4*x - x^2)). %F A271388 E.g.f.: (1/80)*(10*exp(x)*(2*x + 3) - 3*(5 + 3*sqrt(5))*exp((2 - sqrt(5))*x) + 3*(3*sqrt(5) - 5)*exp((2 + sqrt(5))*x)). %F A271388 a(n) = 6*a(n-1) - 8*a(n-2) + 2*a(n-3) + a(n-4). %F A271388 a(n) = (1/80)*(20*n - 3*(5 + 3*sqrt(5))*(2 - sqrt(5))^n + 3*(3*sqrt(5) - 5)*(2 + sqrt(5))^n + 30). %F A271388 Lim_{n->infinity} a(n + 1)/a(n) = 2 + sqrt(5) = phi^3 = A098317, where phi is the golden ratio (A001622). %F A271388 a(n) = (2*n + 3 + 3*A033887(n-1))/8. - _R. J. Mathar_, Mar 12 2017 %t A271388 RecurrenceTable[{a[0] == 0, a[1] == 1, a[n] == 4 a[n - 1] + a[n - 2] - n}, a, {n, 28}] %t A271388 LinearRecurrence[{6, -8, 2, 1}, {0, 1, 2, 6}, 29] %t A271388 nxt[{n_,a_,b_}]:={n+1,b,4b+a-n-1}; NestList[nxt,{1,0,1},30][[;;,2]] (* _Harvey P. Dale_, Feb 07 2025 *) %o A271388 (PARI) x='x+O('x^99); concat(0, Vec(x*(1-4*x+2*x^2)/((1-x)^2*(1-4*x-x^2)))) \\ _Altug Alkan_, Apr 06 2016 %o A271388 (PARI) a(n) = (3*fibonacci(3*n-2) + 2*n+3) >> 3; \\ _Kevin Ryde_, May 16 2021 %Y A271388 Cf. A030119, A033887, A048776, A098317. %K A271388 nonn,easy %O A271388 0,3 %A A271388 _Ilya Gutkovskiy_, Apr 06 2016