A106632 Expansion of g.f. -(1+27*x^2)/((1+3*x)*(1-2*x+9*x^2)).
-1, 1, -25, 49, -1, 529, -1849, 289, -9025, 58081, -38809, 108241, -1560001, 2283121, -525625, 35796289, -95863681, 2666689, -681575449, 3261894769, -1289169025, 9906021841, -94109673529, 99199171681, -84332740801, 2327696411041, -4753075824025, 46970592529, -48635546218561
Offset: 0
References
- S. Severini, A note on two integer sequences arising from the 3-dimensional hypercube, Technical Report, Department of Computer Science, University of Bristol, Bristol, UK (October 2003).
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Robert Munafo, Sequences Related to Floretions
- Index entries for linear recurrences with constant coefficients, signature (-1,-3,-27).
Programs
-
GAP
a:=[-1,1,-25];; for n in [4..40] do a[n]:=-a[n-1]-3*a[n-2] - 27*a[n-3]; od; a; # G. C. Greubel, Feb 19 2019
-
Magma
m:=40; R
:=PowerSeriesRing(Integers(), m); Coefficients(R!( -(1+27*x^2)/((1+3*x)*(1-2*x+9*x^2)) )); // G. C. Greubel, Feb 19 2019 -
Mathematica
CoefficientList[Series[-(1+27x^2)/((1+3x)(1-2x+9x^2)),{x,0,40}],x] (* or *) LinearRecurrence[{-1,-3,-27},{-1,1,-25},40] (* Harvey P. Dale, Oct 03 2014 *)
-
PARI
my(x='x+O('x^40)); Vec(-(1+27*x^2)/((1+3*x)*(1-2*x+9*x^2))) \\ G. C. Greubel, Feb 19 2019
-
SageMath
(-(1+27*x^2)/((1+3*x)*(1-2*x+9*x^2))).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Feb 19 2019
Formula
a(n) = (3^(n+1)/2)*(cos((n+1)*arccos(1/3)) + (-1)^(n+1) ).
a(n) = - a(n-1) - 3*a(n-2) - 27*a(n-3), a(0) = -1, a(1) = 1, a(2) = -25.
a(n) = 1/4( p^(n+1) + q^(n+1) ) + (-3)^(n+1)/2 with p = 1 + 2*sqrt(2)i and q = 1 - 2*sqrt(2)i ( i^2 = -1 ).
Extensions
Edited by Ralf Stephan, Apr 09 2009
Definition corrected by Harvey P. Dale, Oct 03 2014
Comments