A267755 Expansion of (1 + 2*x + x^2 + x^3 + 4*x^4 + 2*x^5)/(1 - x - x^5 + x^6).
1, 3, 4, 5, 9, 12, 14, 15, 16, 20, 23, 25, 26, 27, 31, 34, 36, 37, 38, 42, 45, 47, 48, 49, 53, 56, 58, 59, 60, 64, 67, 69, 70, 71, 75, 78, 80, 81, 82, 86, 89, 91, 92, 93, 97, 100, 102, 103, 104, 108, 111, 113, 114, 115, 119, 122, 124, 125, 126, 130, 133, 135, 136, 137
Offset: 0
Examples
From the linear recurrence: (-A267541) ..., -13, -10, -8, -7, -6, -2, 1, 3, 4, 5, 9, 12, ... (A267755)
Links
- Bruno Berselli, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,1,-1).
Crossrefs
Programs
-
Magma
m:=70; R
:=PowerSeriesRing(Integers(), m); Coefficients(R!((1+2*x+x^2+x^3+4*x^4+2*x^5)/(1-x-x^5+x^6))); -
Magma
I:=[1,3,4,5,9,12]; [n le 6 select I[n] else Self(n-1)+Self(n-5)-Self(n-6): n in [1..70]]; // Vincenzo Librandi, Jan 21 2016
-
Maple
gf := (1 + 2*x + x^2 + x^3 + 4*x^4 + 2*x^5)/(1 - x - x^5 + x^6): deg := 64: series(gf, x, deg): seq(coeff(%, x, n), n=0..deg-1); # Peter Luschny, Jan 21 2016
-
Mathematica
CoefficientList[Series[(1 + 2 x + x^2 + x^3 + 4 x^4 + 2 x^5)/(1 - x - x^5 + x^6), {x, 0, 70}], x] LinearRecurrence[{1, 0, 0, 0, 1, -1}, {1, 3, 4, 5, 9, 12}, 70] Select[Range[140], MemberQ[{1, 3, 4, 5, 9}, Mod[#, 11]]&]
-
PARI
Vec((1+2*x+x^2+x^3+4*x^4+2*x^5)/(1-x-x^5+x^6)+O(x^70))
-
Sage
gf = (1 + 2*x + x^2 + x^3 + 4*x^4 + 2*x^5)/(1 - x - x^5 + x^6) print(taylor(gf, x, 0, 63).list()) # Peter Luschny, Jan 21 2016
Formula
G.f.: (1 + 2*x + x^2 + x^3 + 4*x^4 + 2*x^5)/((1 - x)^2*(1 + x + x^2 + x^3 + x^4)).
a(n) = a(n-1) + a(n-5) - a(n-6).
a(-n) = -A267541(n-1).
a(n) = n + 1 + 2*floor(n/5) + 3*floor((n+1)/5) + floor((n+4)/5). - Ridouane Oudra, Sep 06 2023
Comments