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 A215005 #38 Feb 20 2025 16:56:05 %S A215005 0,1,3,6,12,21,37,62,104,171,281,458,746,1211,1965,3184,5158,8351, %T A215005 13519,21880,35410,57301,92723,150036,242772,392821,635607,1028442, %U A215005 1664064,2692521,4356601,7049138,11405756,18454911,29860685,48315614,78176318,126491951,204668289 %N A215005 a(n) = a(n-2) + a(n-1) + floor(n/2) + 1 for n > 1 and a(0)=0, a(1)=1. %C A215005 If the seed is {1,1}: 1, 1, 4, 7, 14, 24, 42, 70, 117, 192, 315, 513, 835, 1355, 2198, 3561, 5768, 9338, 15116, 24464, 39591, 64066, 103669, 167747, ... %C A215005 If the seed is {1,2}: A129696. %C A215005 Same seed, but -1 in the formula instead of +1: b(n)=a(n-2)+1 for n>=2, i.e. 0, 1, 1, 2, 4, 7, 13, 22, 38, 63, 105, 172, 282, 459, 747, 1212, 1966, 3185, 5159, 8352, 13520, 21881, 35411, 57302, 92724, 150037, 242773, 392822, ... %H A215005 Colin Barker, <a href="/A215005/b215005.txt">Table of n, a(n) for n = 0..1000</a> %H A215005 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (2,1,-3,0,1). %F A215005 a(n) = 2*Fibonacci(n+2) - (2*n + 9 - (-1)^n)/4. - _Vaclav Kotesovec_, Aug 11 2012 %F A215005 From _Colin Barker_, Sep 16 2015: (Start) %F A215005 a(n) = 2*a(n-1) + a(n-2) - 3*a(n-3) + a(n-5) for n>4. %F A215005 G.f.: x*(1+x-x^2) / ((1-x)^2*(1+x)*(1-x-x^2)). (End) %F A215005 E.g.f.: 2*exp(x/2)*(cosh(sqrt(5)*x/2) + (3/sqrt(5))*sinh(sqrt(5)*x/2)) - (1/2)*((x+4)*cosh(x) + (x+5)*sinh(x)). - _G. C. Greubel_, Apr 05 2024 %t A215005 LinearRecurrence[{2,1,-3,0,1}, {0,1,3,6,12}, 39] (* _Jean-François Alcover_, Oct 05 2017 *) %t A215005 nxt[{n_,a_,b_}]:={n+1,b,a+b+Floor[(n+1)/2]+1}; NestList[nxt,{1,0,1},40][[;;,2]] (* _Harvey P. Dale_, Feb 20 2025 *) %o A215005 (Python) %o A215005 prpr = 0 %o A215005 prev = 1 %o A215005 for n in range(2,100): %o A215005 print(prpr, end=', ') %o A215005 curr = prpr+prev + 1 + n//2 %o A215005 prpr = prev %o A215005 prev = curr %o A215005 (PARI) concat(0, Vec(x*(1+x-x^2)/((1-x)^2*(1+x)*(1-x-x^2)) + O(x^100))) \\ _Colin Barker_, Sep 16 2015 %o A215005 (Magma) [2*Fibonacci(n+2) -(2*n+9-(-1)^n)/4: n in [0..50]]; // _G. C. Greubel_, Apr 05 2024 %o A215005 (SageMath) [2*fibonacci(n+2) -(n+4+(n%2))//2 for n in range(51)] # _G. C. Greubel_, Apr 05 2024 %Y A215005 Cf. A129696 (same formula, seed {1,2}). %Y A215005 Cf. A000071 (a(n+1) = a(n-1) + a(n) + 1). %Y A215005 Cf. A000045. %K A215005 nonn,easy %O A215005 0,3 %A A215005 _Alex Ratushnyak_, Jul 31 2012