OFFSET
0,2
COMMENTS
Difference between n-th centered hexagonal number and (2*n)^2. - Alonso del Arte, Jul 06 2004
Given the roots to n^2 + 3*n - 1, a = -3.302775..., b = 0.302775...; then a(n) = (n + 3 + a)*(n + 3 + b). Example: a(3) = 17 = (6 - 3.302...)*(6 + 0.302775). - Gary W. Adamson, Jul 29 2009
a(n-1) = n*(n+1) - 3, with a(-1) = -3, gives the values for a*c of indefinite binary quadratic forms [a, b, c] of discriminant D = 13 for b = 2*n + 1. In general D = b^2 - 4*a*c > 0 and the form [a, b, c] is a*x^2 + b*x*y + c*y^2. - Wolfdieter Lang, Aug 15 2013
Numbers m >= -1 such that 4*m + 13 is a square. - Bruce J. Nicholson, Jul 17 2017
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Wikipedia, Centered Hexagonal Numbers.
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
For n > 0: a(n) = A176271(n+1,n). - Reinhard Zumkeller, Apr 13 2010
a(n) = a(n-1) + 2*n + 2, with n > 0, a(0)=-1. - Vincenzo Librandi, Nov 20 2010
From Colin Barker, Feb 12 2012: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f.: (-1+6*x-3*x^2)/(1-x)^3. (End)
Sum_{n>=0} 1/a(n) = 1/3 + tan(sqrt(13)*Pi/2)*Pi/sqrt(13). - Amiram Eldar, Jan 08 2023
E.g.f.: exp(x)*(-1 + 4*x + x^2). - Elmo R. Oliveira, Oct 31 2024
MATHEMATICA
Table[n^2+3*n-1, {n, 0, 100}] (* Vladimir Joseph Stephan Orlovsky, Oct 08 2009 *)
CoefficientList[Series[(- 1 + 6 x - 3 x^2)/(1 - x)^3, {x, 0, 60}], x] (* Vincenzo Librandi, Oct 15 2013 *)
PROG
(PARI) a(n)=n^2+3*n-1 \\ Charles R Greathouse IV, Sep 24 2015
CROSSREFS
KEYWORD
sign,easy
AUTHOR
STATUS
approved