A267541 Expansion of (2 + 4*x + x^2 + x^3 + 2*x^4 + x^5)/(1 - x - x^5 + x^6).
2, 6, 7, 8, 10, 13, 17, 18, 19, 21, 24, 28, 29, 30, 32, 35, 39, 40, 41, 43, 46, 50, 51, 52, 54, 57, 61, 62, 63, 65, 68, 72, 73, 74, 76, 79, 83, 84, 85, 87, 90, 94, 95, 96, 98, 101, 105, 106, 107, 109, 112, 116, 117, 118, 120, 123, 127, 128, 129, 131, 134, 138, 139, 140
Offset: 0
Examples
From the linear recurrence: (-A267755) ..., -12, -9, -5, -4, -3, -1, 2, 6, 7, 8, 10, 13, ... (A267541)
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!((2+4*x+x^2+x^3+2*x^4+x^5)/(1-x-x^5+x^6))); -
Maple
gf := (2+4*x+x^2+x^3+2*x^4+x^5)/((1-x)^2*(1+x+x^2+x^3+ x^4)): deg := 64: series(gf,x,deg): seq(coeff(%,x,n), n=0..deg-1); # Peter Luschny, Jan 19 2016
-
Mathematica
CoefficientList[Series[(2 + 4 x + x^2 + x^3 + 2 x^4 + x^5)/(1 - x - x^5 + x^6), {x, 0, 70}], x] LinearRecurrence[{1, 0, 0, 0, 1, -1}, {2, 6, 7, 8, 10, 13}, 70] Select[Range[150], MemberQ[{2, 6, 7, 8, 10}, Mod[#, 11]]&]
-
PARI
Vec((2+4*x+x^2+x^3+2*x^4+x^5)/(1-x-x^5+x^6)+O(x^70))
-
Sage
gf = (2+4*x+x^2+x^3+2*x^4+x^5)/((1-x)^2*(1+x+x^2+x^3+ x^4)) print(taylor(gf, x, 0, 63).list()) # Peter Luschny, Jan 19 2016
Formula
G.f.: (2 + 4*x + x^2 + x^3 + 2*x^4 + 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) = -A267755(n-1).
Comments