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 A117585 #17 Sep 08 2022 08:45:24 %S A117585 1,3,9,24,61,151,369,896,2169,5243,12665,30584,73845,178287,430433, %T A117585 1039168,2508785,6056755,14622313,35301400,85225133,205751687, %U A117585 496728529,1199208768,2895146089,6989500971,16874148057,40737797112,98349742309 %N A117585 a(n) = 2*a(n-1) + a(n-2) + n. %C A117585 A modified Pellian sequence. %H A117585 Harvey P. Dale, <a href="/A117585/b117585.txt">Table of n, a(n) for n = 0..1000</a> %H A117585 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-4,0,1). %F A117585 a(n)/a(n-1) tends to 1 + sqrt(2) = 2.414213562...(a(14)/a(13) = 430433/178287 = 2.4142702...). %F A117585 a(n) = (1/2)*(Pell(n+2) + 2*Pell(n+1) - n - 2), with Pell(n) = A000129(n). - _Ralf Stephan_, May 15 2007 %F A117585 From _R. J. Mathar_, Aug 05 2009: (Start) %F A117585 a(n) = 4*a(n-1) - 4*a(n-2) + a(n-4). %F A117585 G.f.: (1-x+x^2)/((1-2*x-x^2)*(1-x)^2). (End) %e A117585 a(4) = 61 = 2*(a(3)) + a(2) + 4 = 2*24 + 9 + 4. %e A117585 a(4) = 61 = sum of terms in row 5 of A117584: 1 + 5 + 9 + 17 + 29. %t A117585 RecurrenceTable[{a[0]==1,a[1]==3, a[n]==2a[n-1]+a[n-2]+n}, a, {n,30}] (* or *) LinearRecurrence[{4,-4,0,1}, {1,3,9,24}, 30] (* _Harvey P. Dale_, Mar 11 2015 *) %o A117585 (Magma) %o A117585 P:= func< n | Round( ((1+Sqrt(2))^n - (1-Sqrt(2))^n)/(2*Sqrt(2)) ) >; %o A117585 [(1/2)*(P(n+2) + 2*P(n+1) - (n+2)): n in [0..30]]; // _G. C. Greubel_, Jul 05 2021 %o A117585 (Sage) %o A117585 def a(n): return (1/2)*(lucas_number1(n+2,2,-1) + 2*lucas_number1(n+1,2,-1) -n-2) %o A117585 [a(n) for n in (0..30)] # _G. C. Greubel_, Jul 05 2021 %Y A117585 Row sums of triangle A117584. %K A117585 nonn %O A117585 0,2 %A A117585 _Gary W. Adamson_, Mar 29 2006 %E A117585 Terms from a(20) on corrected by _R. J. Mathar_, Aug 05 2009