A278417 a(n) = n*((2+sqrt(3))^n + (2-sqrt(3))^n)/2.
0, 2, 14, 78, 388, 1810, 8106, 35294, 150536, 632034, 2620870, 10759342, 43804812, 177105266, 711809378, 2846259390, 11330543632, 44929049794, 177540878718, 699402223118, 2747583822740, 10766828545746, 42095796462874, 164244726238366, 639620518118424, 2486558615814050, 9651161613824822, 37403957244654702
Offset: 0
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (8,-18,8,-1).
Programs
-
Maple
f:=n->expand(n*((2+sqrt(3))^n + (2-sqrt(3))^n)/2); # N. J. A. Sloane, May 13 2017
-
Mathematica
Table[Simplify[(n/2) (((2 + #)^n + (2 - #)^n)) &@ Sqrt@ 3], {n, 3, 27}] (* or *) Drop[#, 3] &@ CoefficientList[Series[2 x^3*(39 - 118 x + 55 x^2 - 7 x^3)/(1 - 4 x + x^2)^2, {x, 0, 27}], x] (* Michael De Vlieger, Nov 24 2016 *) LinearRecurrence[{8,-18,8,-1},{0,2,14,78},30] (* Harvey P. Dale, Jan 01 2021 *)
-
PARI
vector(25, n, n+=2; n*((2+sqrt(3))^n + ((2-sqrt(3))^n))/2) \\ Colin Barker, Nov 21 2016
-
PARI
Vec(2*x^3*(39 - 118*x + 55*x^2 - 7*x^3) / (1 - 4*x + x^2)^2 + O(x^30)) \\ Colin Barker, Nov 21 2016
-
Python
def a278417(n): a = [0, 2, 14, 78, 388, 1810] if n < 6: return a[n] for k in range(n - 5): a = a[1:] + [7*a[-1] - 10*a[-2] - 10*a[-3] + 7*a[-4] - a[-5]] return a[-1] # David Radcliffe, May 09 2025
Formula
From Colin Barker, Nov 21 2016: (Start)
a(n) = 7*a(n-1) - 10*a(n-2) - 10*a(n-3) + 7*a(n-4) - a(n-5) for n>6.
G.f.: 2*x^3*(39 - 118*x + 55*x^2 - 7*x^3) / (1 - 4*x + x^2)^2.
(End)
Extensions
Entry revised by N. J. A. Sloane, May 13 2017
Comments