cp's OEIS Frontend

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.

A281362 a(0) = 1, a(1) = 2; for n>1, a(n) = a(n-1) + a(n-2) + floor(n/2).

This page as a plain text file.
%I A281362 #27 Jul 09 2025 04:42:28
%S A281362 1,2,4,7,13,22,38,63,105,172,282,459,747,1212,1966,3185,5159,8352,
%T A281362 13520,21881,35411,57302,92724,150037,242773,392822,635608,1028443,
%U A281362 1664065,2692522,4356602,7049139,11405757,18454912,29860686,48315615,78176319,126491952
%N A281362 a(0) = 1, a(1) = 2; for n>1, a(n) = a(n-1) + a(n-2) + floor(n/2).
%H A281362 Colin Barker, <a href="/A281362/b281362.txt">Table of n, a(n) for n = 0..1000</a>
%H A281362 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (2,1,-3,0,1).
%F A281362 From _Colin Barker_, Jan 27 2017: (Start)
%F A281362 a(n) = 2*a(n-1) + a(n-2) - 3*a(n-3) + a(n-5) for n>4.
%F A281362 G.f.: (1 - x^2 + x^4) / ((1 - x)^2*(1 + x)*(1 - x - x^2)). (End)
%F A281362 0 = 3 + a(n)*(-4 - 2*a(n) - a(n+1) + 6*a(n+2) - a(n+3)) + a(n+1)*(-1 + a(n+1) + a(n+2) - 2*a(n+3)) + a(n+2)*(+11 - 5*a(n+2) + 3*a(n+3)) + a(n+3)*(-6) for all n in Z. - _Michael Somos_, Jan 27 2017
%F A281362 From _G. C. Greubel_, Apr 05 2024: (Start)
%F A281362 a(n) = 2*Fibonacci(n+2) - (1/4)*(2*n + 5 - (-1)^n).
%F A281362 E.g.f.: (1/2)*(4*exp(x/2)*(cosh(sqrt(5)*x/2) + (3/sqrt(5))*sinh( sqrt(5)*x/2)) - (x+2)*cosh(x) - (x+3)*sinh(x)). (End)
%e A281362 G.f. = 1 + 2*x + 4*x^2 + 7*x^3 + 13*x^4 + 22*x^5 + 38*x^6 + 63*x^7 + ...
%t A281362 CoefficientList[Series[(1-x^2+x^4)/((1-x)^2*(1+x)*(1-x-x^2)), {x,0,50}], x] (* _G. C. Greubel_, Jul 29 2018 *)
%o A281362 (PARI) Vec((1-x^2+x^4)/((1-x)^2*(1+x)*(1-x-x^2)) + O(x^50))
%o A281362 (PARI) {a(n) = my(m=n); if( n<0, m=-1-n); polcoeff( (1 - x^2 + x^4) / ((1 - x - x^2 + x^3) * (1 - (-1)^(n<0)*x - x^2)) + x * O(x^m), m)}; /* _Michael Somos_, Jan 27 2017 */
%o A281362 (Magma) R<x>:=PowerSeriesRing(Integers(), 50); Coefficients(R!((1 - x^2+x^4)/((1-x)^2*(1+x)*(1-x-x^2)))); // _G. C. Greubel_, Jul 29 2018
%o A281362 (SageMath) [2*fibonacci(n+2) -(n+2+(n%2))//2 for n in range(51)] # _G. C. Greubel_, Apr 05 2024
%Y A281362 Cf. A000045, A215004, A215005.
%K A281362 nonn,easy
%O A281362 0,2
%A A281362 _N. J. A. Sloane_, Jan 27 2017, based on a comment in A215004 from _Alex Ratushnyak_, Jul 31 2012