OFFSET
0,2
COMMENTS
Numbers h such that 3*(3 + h) is a perfect square. - Alexander D. Healy, Tj Tullo, Avery Pickford, Sep 20 2004
Equivalently, numbers k such that k/3+1 is a square. - Bruno Berselli, Apr 10 2018
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..5000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = 3*A005563(n). - Zerinvary Lajos, Mar 06 2007
a(n) = a(n-1) + 6*n + 3, with n>0, a(0)=0. - Vincenzo Librandi, Aug 08 2010
From Colin Barker, Apr 11 2012: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f.: 3*x*(3-x)/(1-x)^3. (End)
E.g.f.: 3*x*(x + 3)*exp(x). - G. C. Greubel, Jul 20 2017
From Amiram Eldar, Feb 26 2022: (Start)
Sum_{n>=1} 1/a(n) = 1/4.
Sum_{n>=1} (-1)^(n+1)/a(n) = 1/12. (End)
MAPLE
seq(3*n*(n+2), n=0..50); # G. C. Greubel, Sep 01 2019
MATHEMATICA
Select[ Range[10000], IntegerQ[ Sqrt[ 3(3 + # )]] & ]
3*(Range[50]^2 -1) (* G. C. Greubel, Sep 01 2019 *)
PROG
(PARI) a(n)=3*n*(n+2) \\ Charles R Greathouse IV, Dec 07 2011
(Magma) [3*n*(n+2): n in [0..50]]; // G. C. Greubel, Sep 01 2019
(Sage) [3*n*(n+2) for n in (0..50)] # G. C. Greubel, Sep 01 2019
(GAP) List([0..50], n-> 3*n*(n+2)); # G. C. Greubel, Sep 01 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Robert G. Wilson v, Feb 05 2002
EXTENSIONS
Edited by N. J. A. Sloane, Sep 14 2008 at the suggestion of R. J. Mathar
STATUS
approved