cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A278417 #64 May 10 2025 09:15:31
%S A278417 0,2,14,78,388,1810,8106,35294,150536,632034,2620870,10759342,
%T A278417 43804812,177105266,711809378,2846259390,11330543632,44929049794,
%U A278417 177540878718,699402223118,2747583822740,10766828545746,42095796462874,164244726238366,639620518118424,2486558615814050,9651161613824822,37403957244654702
%N A278417 a(n) = n*((2+sqrt(3))^n + (2-sqrt(3))^n)/2.
%C A278417 This was originally based on a graph theory formula in the Wikipedia which turned out to be wrong.
%H A278417 Colin Barker, <a href="/A278417/b278417.txt">Table of n, a(n) for n = 0..1000</a>
%H A278417 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (8,-18,8,-1).
%F A278417 From _Colin Barker_, Nov 21 2016: (Start)
%F A278417 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 A278417 G.f.: 2*x^3*(39 - 118*x + 55*x^2 - 7*x^3) / (1 - 4*x + x^2)^2.
%F A278417 (End)
%p A278417 f:=n->expand(n*((2+sqrt(3))^n + (2-sqrt(3))^n)/2); # _N. J. A. Sloane_, May 13 2017
%t A278417 Table[Simplify[(n/2) (((2 + #)^n + (2 - #)^n)) &@ Sqrt@ 3], {n, 3, 27}] (* or *)
%t A278417 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 A278417 LinearRecurrence[{8,-18,8,-1},{0,2,14,78},30] (* _Harvey P. Dale_, Jan 01 2021 *)
%o A278417 (Python)
%o A278417 def a278417(n):
%o A278417     a = [0, 2, 14, 78, 388, 1810]
%o A278417     if n < 6:
%o A278417         return a[n]
%o A278417     for k in range(n - 5):
%o A278417         a = a[1:] + [7*a[-1] - 10*a[-2] - 10*a[-3] + 7*a[-4] - a[-5]]
%o A278417     return a[-1]
%o A278417 # _David Radcliffe_, May 09 2025
%o A278417 (PARI) vector(25, n, n+=2; n*((2+sqrt(3))^n + ((2-sqrt(3))^n))/2) \\ _Colin Barker_, Nov 21 2016
%o A278417 (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 A278417 Cf. A030019, A069996, A139400, A193153.
%K A278417 nonn,easy
%O A278417 0,2
%A A278417 _Indranil Ghosh_, Nov 21 2016
%E A278417 Entry revised by _N. J. A. Sloane_, May 13 2017