login
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.
3
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,3
COMMENTS
a(n) mod 9 = 1, 8, 4, 8, 1, 5, 1, 8, 4, 8, 1, 5, ... (repeat).
Difference table for a(n):
1, -1, 4, 8, 19, 32, ...
-2, 5, 4, 11, 13, 32, ...
7, -1, 7, 2, 19, 29, ...
-8, 8, -5, 17, 10, 41, ...
16, -13, 22, -7, 31, 14, ...
-29, 35, -29, 38, -17, 65, ...
... .
The recurrence of the name is valid for every line and the main diagonal which is in A014551.
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.
a(n) = A014551(n) - A057079(n).
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 *)
PROG
(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
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Jul 07 2016
EXTENSIONS
One term corrected and more terms added by Colin Barker, Jul 07 2016
STATUS
approved