OFFSET
1,2
COMMENTS
From Jon E. Schoenfield, Jan 18 2019: (Start)
Previously, the Name had included the comment, "This sequence is such that 20*(a(n)^2) + 20*a(n) + 1 = j^2 = a square."
However, Anthony Hernandez observed that this statement is not true for all terms; e.g., at a(4)=16, 20*16^2 + 20*16 + 1 = 5441, a nonsquare.
It is true that 20*a(n)^2 + 20*a(n) + 1 = A305315(n/3)^2 when n == 0 (mod 3) and A305316((n-2)/3)^2 when n == 2 (mod 3); however, for n == 1 (mod 3) with n > 1, sqrt(20*a(n)^2 + 20*a(n) + 1) is a noninteger number whose fractional part apparently approaches 3 - sqrt(5) as n increases, and Andrey Zabolotskiy observes that round(sqrt(20*a(n)^2 + 20*a(n) + 1) + sqrt(5)) appears to be equal to A002878(n). (End)
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (3,-1,1,-3,1).
FORMULA
a(n) = (1/6)*(Fibonacci(2n+4) - 2*Fibonacci(2n) - 2*cos((n+2)(2*Pi/3)) - 4). - Ralf Stephan, May 20 2007
From R. J. Mathar, Nov 13 2009: (Start)
a(n) = 3*a(n-1) - a(n-2) + a(n-3) - 3*a(n-4) + a(n-5).
G.f.: 2*x^2/((1-x) * (1+x+x^2) * (1-3*x+x^2)).
a(n) = floor(A027941(n)/2). - Anthony Hernandez, Jan 03 2019
MATHEMATICA
a[n_]:=(1/6)*(Fibonacci[2*n+4] - 2*Fibonacci[2*n] - 2*Cos[(n+2)*(2*Pi/3)] - 4 ); Array[a, 50] (* Stefano Spezia, Jan 11 2019 *)
RecurrenceTable[{a[1]==0, a[2]==2, a[3]==6, a[4]==16, a[5]==44, a[n]== 3 a[n-1] - a[n-2] + a[n-3] - 3 a[n-4] + a[n-5]}, a, {n, 35}] (* Vincenzo Librandi, Jan 13 2019 *)
PROG
(Magma) I:=[0, 2, 6, 16, 44]; [n le 5 select I[n] else 3*Self(n-1) - Self(n-2) + Self(n-3) - 3*Self(n-4) + Self(n-5): n in [1..35]]; // Vincenzo Librandi, Jan 13 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Pierre CAMI, Apr 06 2005
EXTENSIONS
Extended by R. J. Mathar, Nov 13 2009
STATUS
approved