login
A278417
a(n) = n*((2+sqrt(3))^n + (2-sqrt(3))^n)/2.
1
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,2
COMMENTS
This was originally based on a graph theory formula in the Wikipedia which turned out to be wrong.
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)
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 *)
PROG
(Python)
import math
def p(n):
m=math.sqrt(3)
n=float(n)
x=2+m
y=2-m
return round((n/2)*(x**n+y**n), 0)
for i in range(3, 531):
print str(i)+" "+str(int(p(i))) \\Indranil Ghosh, Nov 21 2016
(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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Indranil Ghosh, Nov 21 2016
EXTENSIONS
Entry revised by N. J. A. Sloane, May 13 2017
STATUS
approved