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 A062114 #45 Dec 16 2023 16:55:29 %S A062114 0,1,2,3,6,9,16,25,42,67,110,177,288,465,754,1219,1974,3193,5168,8361, %T A062114 13530,21891,35422,57313,92736,150049,242786,392835,635622,1028457, %U A062114 1664080,2692537,4356618,7049155,11405774,18454929,29860704,48315633,78176338,126491971 %N A062114 a(n) = 2*Fibonacci(n) - (1 - (-1)^n)/2. %H A062114 Alois P. Heinz, <a href="/A062114/b062114.txt">Table of n, a(n) for n = 0..4785</a> (first 401 terms from Harry J. Smith) %H A062114 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-1,-1). %F A062114 A bistable recurrence; Fibonacci with a grain of salt: a(0)=0; a(1)=1; a(n) = a(n-1) + a(n-2) + (1 + (-1)^n)/2. %F A062114 a(n+1) = Sum_{k=0..n} binomial(n-floor(k/2), floor(k/2)). - _Benoit Cloitre_, May 05 2005 %F A062114 Starting with 1, equals row sums of triangle A134513. - _Gary W. Adamson_, Oct 28 2007 %F A062114 a(n) = a(n-1) + 2*a(n-2) - a(n-3) - a(n-4), n > 3. - _Harvey P. Dale_, Nov 02 2011 %F A062114 G.f.: x*(1+x-x^2)/( (1-x)*(1+x)*(1-x-x^2) ). - _R. J. Mathar_, Aug 12 2012 %F A062114 a(n) = -(-1)^n * a(-n) for all n in Z. - _Michael Somos_, Oct 17 2018 %e A062114 a(4) = a(3) + a(2) + (1+1)/2 = 3 + 2 + 1 = 6. %e A062114 G.f. = x + 2*x^2 + 3*x^3 + 6*x^4 + 9*x^5 + 16*x^6 + 25*x^7 + ... - _Michael Somos_, Oct 17 2018 %p A062114 A062114 := proc(n) %p A062114 2*combinat[fibonacci](n)-(1-(-1)^n)/2 ; %p A062114 end proc: # _R. J. Mathar_, Aug 12 2012 %p A062114 # second Maple program: %p A062114 a:= n-> (<<0|1|0|0>, <0|0|1|0>, <0|0|0|1>, <-1|-1|2|1>>^n.<<[$0..3][]>>)[1$2]: %p A062114 seq(a(n), n=0..50); # _Alois P. Heinz_, Jul 01 2018 %t A062114 Join[{a=0,b=1},Table[If[EvenQ[a],c=a+b+1,c=a+b];a=b;b=c,{n,0,5!}]](* _Vladimir Joseph Stephan Orlovsky_, Jan 10 2011 *) %t A062114 Table[2Fibonacci[n]-(1-(-1)^n)/2,{n,0,40}] (* or *) LinearRecurrence[ {1,2,-1,-1},{0,1,2,3},41] (* _Harvey P. Dale_, Nov 02 2011 *) %o A062114 (PARI) { h=-1; g=1; for (n=0, 400, f=g + h; h=g; g=f; write("b062114.txt", n, " ", 2*f - (1 - (-1)^n)/2) ) } \\ _Harry J. Smith_, Aug 01 2009 %o A062114 (PARI) x='x+O('x^30); concat([0], Vec(x*(1+x-x^2)/((1-x)*(1+x)*(1-x-x^2) ))) \\ _G. C. Greubel_, Oct 16 2018 %o A062114 (Magma) m:=30; R<x>:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!(x*(1+x-x^2)/((1-x)*(1+x)*(1-x-x^2)))); // _G. C. Greubel_, Oct 16 2018 %Y A062114 Cf. A000045, A052952, A134513. %K A062114 easy,nonn %O A062114 0,3 %A A062114 _Olivier Gérard_, Jun 05 2001 %E A062114 Definition corrected by _Harry J. Smith_, Aug 01 2009