A274817 a(n) = 2*a(n-1) - a(n-3) + 2*a(n-4) for n>3, a(0)=1, a(1)=-1, a(2)=4, a(3)=8.
1, -1, 4, 8, 19, 32, 64, 125, 256, 512, 1027, 2048, 4096, 8189, 16384, 32768, 65539, 131072, 262144, 524285, 1048576, 2097152, 4194307, 8388608, 16777216, 33554429, 67108864, 134217728, 268435459, 536870912, 1073741824, 2147483645, 4294967296, 8589934592
Offset: 0
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (2,0,-1,2).
Programs
-
Maple
A274817:=n->2^n - sin(n*Pi/3)*(sqrt(3) + 2*sin(2*n*Pi/3)): seq(A274817(n), n=0..40); # Wesley Ivan Hurt, Jul 07 2016
-
Mathematica
Table[2^n - Sin[n*Pi/3] (Sqrt[3] + 2 Sin[2*n*Pi/3]), {n, 0, 40}] (* Wesley Ivan Hurt, Jul 07 2016 *) LinearRecurrence[{2, 0, -1, 2}, {1, -1, 4, 8}, 100] (* G. C. Greubel, Jul 07 2016 *)
-
PARI
Vec((x^3+6*x^2-3*x+1)/(-2*x^4+x^3-2*x+1) + O(x^40)) \\ Colin Barker, Jul 07 2016
Formula
G.f.: (x^3+6*x^2-3*x+1) / (-2*x^4+x^3-2*x+1). - Colin Barker, Jul 07 2016
a(n) = 2*a(n-1) - a(n-3) + 2*a(n-4) for n>3. - Wesley Ivan Hurt, Jul 07 2016
a(n) = 2^n - sin(n*Pi/3)*(sqrt(3) + 2*sin(2*n*Pi/3)). - Wesley Ivan Hurt, Jul 07 2016
a(n) = 2^n - period 6: repeat [0, 3, 0, 0, -3, 0].
a(n+1) = 2*a(n) + period 6: repeat [-3, 6, 0, 3, -6, 0].
a(n+3) = -a(n) + 9*2^n.
Extensions
One term corrected and more terms added by Colin Barker, Jul 07 2016
Comments