login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A215502 a(n) = (1+sqrt(3))^n + (-2)^n + (1-sqrt(3))^n + 1. 3
4, 1, 13, 13, 73, 121, 481, 1009, 3361, 7969, 24193, 61249, 177025, 464257, 1307137, 3493633, 9699841, 26190337, 72173569, 195941377, 537802753, 1464342529, 4010582017, 10937266177, 29920862209, 81665925121, 223274237953, 609678999553, 1666309128193 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

LINKS

G. C. Greubel, Table of n, a(n) for n = 0..1000

Index entries for linear recurrences with constant coefficients, signature (1,6,-2,-4).

FORMULA

From Colin Barker, Aug 20 2012: (Start)

a(n) = a(n-1) +6*a(n-2) -2*a(n-3) -4*a(n-4).

G.f.: (4-3*x-12*x^2+2*x^3)/((1-x)*(1+2*x)*(1-2*x-2*x^2)). (End)

MAPLE

A215502 := n -> 1+(1+sqrt(3))^n+(-2)^n+(1-sqrt(3))^n;

seq(simplify(A215502(i)), i=0..28);

MATHEMATICA

Simplify/@Table[(1+Sqrt[3])^n+(1-Sqrt[3])^n+1+(-2)^n, {n, 0, 30}] (* or *) LinearRecurrence[{1, 6, -2, -4}, {4, 1, 13, 13}, 30] (* Harvey P. Dale, Mar 12 2013 *)

PROG

def A215502(n) : return 1+(1+sqrt(3))^n+(-2)^n+(1-sqrt(3))^n

[A215502(i).round() for i in (0..28)]

(PARI) x='x+O('x^30); Vec((4-3*x-12*x^2+2*x^3)/((1-x)*(1+2*x)*(1-2*x-2*x^2))) \\ G. C. Greubel, Apr 23 2018

(MAGMA) [Round((1+Sqrt(3))^n + (-2)^n + (1-Sqrt(3))^n + 1): n in [0..30]]; // G. C. Greubel, Apr 23 2018

CROSSREFS

Cf. A051927, A215500, A215503.

Sequence in context: A193956 A193843 A116414 * A144698 A115154 A292270

Adjacent sequences:  A215499 A215500 A215501 * A215503 A215504 A215505

KEYWORD

nonn,easy

AUTHOR

Peter Luschny, Aug 13 2012

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 5 13:26 EDT 2020. Contains 333241 sequences. (Running on oeis4.)