OFFSET
0,2
COMMENTS
Consider the quadratic cyclotomic polynomial f(x) = x^2+x+1 and the quotients f(x + n*f(x))/f(x), as in A168235 and A168240. a(n) is the real part of the quotient at x = 1+sqrt(-5).
The imaginary part of the quotient is sqrt(5)*A045944(n).
As stated in short description of A168244 the quotient is in two parts: rational integers (cf. A168244) and rational integer multiples of sqrt(-5). It so happens that the sequence of rational integer coefficients of sqrt(-5) is A045944. - A.K. Devaraj, Nov 22 2009
This sequence contains half of all integers m such that -8*m +17 is an odd square. The other half are found in A091823 multiplied by -1. The squares resulting from A168244 are (4*n - 3)^2, those from A091823 are (4*n + 3)^2. - Klaus Purath, Jul 11 2021
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f.: 1 + x*(2-7*x+x^2)/(1-x)^3.
a(-n) = -A091823(n), a(0) = 1. - Michael Somos, May 11 2014
E.g.f.: (1 + x - 2*x^2)*exp(x). - G. C. Greubel, Apr 09 2016
a(n) = a(n-2) + (-2)*sqrt((-8)*a(n-1) + 17), n > 1. - Klaus Purath, Jul 08 2021
MATHEMATICA
Table[-(n + (n + 1)^2 - 3)/2, {n, -1, 200, 2}] (* Vladimir Joseph Stephan Orlovsky, Jun 26 2011 *)
LinearRecurrence[{3, -3, 1}, {2, -1, -8}, 60] (* Harvey P. Dale, Jun 06 2015 *)
PROG
(Magma) [1+3*n-2*n^2: n in [1..50]]; // Vincenzo Librandi, Jul 10 2012
(PARI) a(n) = 1 + 3*n - 2*n^2; \\ Altug Alkan, Apr 09 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
A.K. Devaraj, Nov 21 2009
EXTENSIONS
Edited, definition simplified, sequence extended beyond a(5) by R. J. Mathar, Nov 23 2009
a(0)=1 added by N. J. A. Sloane, Apr 09 2016
STATUS
approved