login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A278417 a(n) = n*((2+sqrt(3))^n + (2-sqrt(3))^n)/2. 1

%I #52 Jan 01 2021 12:47:19

%S 0,2,14,78,388,1810,8106,35294,150536,632034,2620870,10759342,

%T 43804812,177105266,711809378,2846259390,11330543632,44929049794,

%U 177540878718,699402223118,2747583822740,10766828545746,42095796462874,164244726238366,639620518118424,2486558615814050,9651161613824822,37403957244654702

%N a(n) = n*((2+sqrt(3))^n + (2-sqrt(3))^n)/2.

%C This was originally based on a graph theory formula in the Wikipedia which turned out to be wrong.

%H Colin Barker, <a href="/A278417/b278417.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (8,-18,8,-1).

%F From _Colin Barker_, Nov 21 2016: (Start)

%F a(n) = 7*a(n-1) - 10*a(n-2) - 10*a(n-3) + 7*a(n-4) - a(n-5) for n>6.

%F G.f.: 2*x^3*(39 - 118*x + 55*x^2 - 7*x^3) / (1 - 4*x + x^2)^2.

%F (End)

%p f:=n->expand(n*((2+sqrt(3))^n + (2-sqrt(3))^n)/2); # _N. J. A. Sloane_, May 13 2017

%t Table[Simplify[(n/2) (((2 + #)^n + (2 - #)^n)) &@ Sqrt@ 3], {n, 3, 27}] (* or *)

%t 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 *)

%t LinearRecurrence[{8,-18,8,-1},{0,2,14,78},30] (* _Harvey P. Dale_, Jan 01 2021 *)

%o (Python)

%o import math

%o def p(n):

%o m=math.sqrt(3)

%o n=float(n)

%o x=2+m

%o y=2-m

%o return round((n/2)*(x**n+y**n),0)

%o for i in range(3,531):

%o print str(i)+" "+str(int(p(i))) \\_Indranil Ghosh_, Nov 21 2016

%o (PARI) vector(25, n, n+=2; n*((2+sqrt(3))^n + ((2-sqrt(3))^n))/2) \\ _Colin Barker_, Nov 21 2016

%o (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

%Y Cf. A030019, A069996, A139400, A193153.

%K nonn,easy

%O 0,2

%A _Indranil Ghosh_, Nov 21 2016

%E Entry revised by _N. J. A. Sloane_, May 13 2017

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 18:05 EDT 2024. Contains 371798 sequences. (Running on oeis4.)