This site is supported by donations to The OEIS Foundation.

 Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing. Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A142879 a(n) = 5a(n-3) - a(n-6) with terms 1..6 as 0, 1, 2, 5, 7, 9. 1
 0, 1, 2, 5, 7, 9, 25, 34, 43, 120, 163, 206, 575, 781, 987, 2755, 3742, 4729, 13200, 17929, 22658, 63245, 85903, 108561, 303025, 411586, 520147, 1451880, 1972027, 2492174, 6956375, 9448549, 11940723, 33329995, 45270718, 57211441, 159693600 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 LINKS Colin Barker, Table of n, a(n) for n = 1..1000 Index entries for linear recurrences with constant coefficients, signature (0,0,5,0,0,-1). FORMULA a(n) = 2*a(n - 1) + a(n - 2) if 3 | n, a(n) = a(n - 1) + a(n - 2) if n = 1 mod 3, and a(n) = 2*a(n - 1) - a(n - 2) if n = 2 mod 3. G.f.: x^2*(1+2*x+5*x^2+2*x^3-x^4) / (1-5*x^3+x^6). - Colin Barker, Jan 08 2013 MATHEMATICA Clear[a, n]; a[0] = 0; a[1] = 1; a[n_] := a[n] = If[Mod[n, 3] == 0, 2*a[n - 1] + a[n - 2], If[Mod[n, 3] == 1, a[n - 1] + a[n - 2], 2*a[n - 1] - a[n - 2]]]; b = Table[a[n], {n, 0, 50}] LinearRecurrence[{0, 0, 5, 0, 0, -1}, {0, 1, 2, 5, 7, 9}, 40] (* Harvey P. Dale, Apr 06 2016 *) PROG (PARI) a=vector(20); a[1]=1; a[2]=2; for(n=3, #a, if(n%3==0, a[n]=2*a[n-1]+a[n-2], if(n%3==1, a[n]=a[n-1]+a[n-2], a[n]=2*a[n-1]-a[n-2]))); concat(0, a) \\ Colin Barker, Jan 30 2016 (PARI) concat(0, Vec(x^2*(1+2*x+5*x^2+2*x^3-x^4)/(1-5*x^3+x^6) + O(x^50))) \\ Colin Barker, Jan 30 2016 CROSSREFS Cf. A119016, A002965, A002530, A048788. Sequence in context: A286356 A086422 A046880 * A284167 A108118 A099477 Adjacent sequences:  A142876 A142877 A142878 * A142880 A142881 A142882 KEYWORD nonn,easy AUTHOR Roger L. Bagula and Gary W. Adamson, Sep 28 2008 EXTENSIONS New name from Colin Barker and Charles R Greathouse IV, Jan 08 2013 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 14 14:59 EST 2019. Contains 329979 sequences. (Running on oeis4.)