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 A255978 #48 Sep 08 2022 08:46:11 %S A255978 0,1,1,4,5,9,16,25,41,68,109,177,288,465,753,1220,1973,3193,5168,8361, %T A255978 13529,21892,35421,57313,92736,150049,242785,392836,635621,1028457, %U A255978 1664080,2692537,4356617,7049156,11405773,18454929,29860704,48315633,78176337,126491972,204668309,331160281,535828592 %N A255978 a(n) = a(n-1) + a(n-2) + (1 + (-1)^(a(n-1) + a(n-2))) with a(0)=0, a(1)=1. %C A255978 This is a minimally modified Fibonacci sequence (A000045) in that it preserves characteristic properties of the original sequence: a(n) is a function of the sum of the preceding two terms, the ratio of two consecutive terms tends to the Golden Mean, and the initial two terms are the same as in the Fibonacci sequence. See A253197 and A253198 for other members of this family. %H A255978 Colin Barker, <a href="/A255978/b255978.txt">Table of n, a(n) for n = 0..1000</a> %H A255978 W. Puszkarz, <a href="http://vixra.org/abs/1503.0113">A Note on Minimal Extensions of the Fibonacci Sequence</a>, viXra:1503.0113, 2015. %H A255978 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,1,-1,-1). %F A255978 a(n) = a(n-1) + a(n-2) + (1 + (-1)^(a(n-1) + a(n-2))), a(0)=0, a(1)=1. %F A255978 G.f.: x*(1+2*x^2-x^3)/((1-x)*(1+x+x^2)*(1-x-x^2)). - _Joerg Arndt_, Mar 16 2015 %F A255978 a(n) = a(n-1) + a(n-2) + a(n-3) - a(n-4) - a(n-5) for n>4. - _Colin Barker_, Mar 28 2015 %F A255978 a(n) = 2*Fibonacci(n) - (1 if n != 0 (mod 3)). - _Nicolas Bělohoubek_, Sep 29 2021 %e A255978 For n = 2, a(2) = 0 + 1 + (1 + (-1)^(0 + 1)) = 1. %e A255978 For n = 3, a(3) = 1 + 1 + (1 + (-1)^(1 + 1)) = 4. %e A255978 For n = 4, a(4) = 1 + 4 + (1 + (-1)^(1 + 4)) = 5. %e A255978 For n = 5, a(5) = 4 + 5 + (1 + (-1)^(4 + 5)) = 9. %t A255978 RecurrenceTable[{a[n]==a[n-1]+a[n-2] +(1+(-1)^(a[n-1]+a[n-2])), a[0]==0, a[1]==1}, a, {n, 0, 50}] %t A255978 CoefficientList[Series[x (1 + 2 x^2 - x^3) / ((1 - x) (1 + x + x^2) (1 - x - x^2)), {x, 0, 70}], x] (* _Vincenzo Librandi_, Mar 24 2015 *) %t A255978 LinearRecurrence[{1,1,1,-1,-1},{0,1,1,4,5},50] (* _Harvey P. Dale_, Mar 26 2019 *) %o A255978 (PARI) concat(0, Vec(x*(1+2*x^2-x^3)/((1-x)*(1+x+x^2)*(1-x-x^2)) + O(x^30))) \\ _Michel Marcus_, Mar 23 2015 %o A255978 (Magma) [n le 2 select (n-1) else Self(n-1)+Self(n-2)+(1+(-1)^(Self(n-1)+Self(n-2))): n in [1..45] ]; // _Vincenzo Librandi_, Mar 24 2015 %Y A255978 Cf. A000045, A253197, A253198. %K A255978 nonn,easy %O A255978 0,4 %A A255978 _Waldemar Puszkarz_, Mar 12 2015