login
a(n) = 3*n^2 + 6*n.
22

%I #50 Feb 26 2022 04:25:40

%S 0,9,24,45,72,105,144,189,240,297,360,429,504,585,672,765,864,969,

%T 1080,1197,1320,1449,1584,1725,1872,2025,2184,2349,2520,2697,2880,

%U 3069,3264,3465,3672,3885,4104,4329,4560,4797,5040,5289,5544,5805,6072,6345,6624

%N a(n) = 3*n^2 + 6*n.

%C Numbers h such that 3*(3 + h) is a perfect square. - _Alexander D. Healy_, Tj Tullo, Avery Pickford, Sep 20 2004

%C Equivalently, numbers k such that k/3+1 is a square. - _Bruno Berselli_, Apr 10 2018

%H G. C. Greubel, <a href="/A067725/b067725.txt">Table of n, a(n) for n = 0..5000</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1).

%F a(n) = 3*A005563(n). - _Zerinvary Lajos_, Mar 06 2007

%F a(n) = a(n-1) + 6*n + 3, with n>0, a(0)=0. - _Vincenzo Librandi_, Aug 08 2010

%F From _Colin Barker_, Apr 11 2012: (Start)

%F a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).

%F G.f.: 3*x*(3-x)/(1-x)^3. (End)

%F E.g.f.: 3*x*(x + 3)*exp(x). - _G. C. Greubel_, Jul 20 2017

%F From _Amiram Eldar_, Feb 26 2022: (Start)

%F Sum_{n>=1} 1/a(n) = 1/4.

%F Sum_{n>=1} (-1)^(n+1)/a(n) = 1/12. (End)

%p seq(3*n*(n+2), n=0..50); # _G. C. Greubel_, Sep 01 2019

%t Select[ Range[10000], IntegerQ[ Sqrt[ 3(3 + # )]] & ]

%t 3*(Range[50]^2 -1) (* _G. C. Greubel_, Sep 01 2019 *)

%o (PARI) a(n)=3*n*(n+2) \\ _Charles R Greathouse IV_, Dec 07 2011

%o (Magma) [3*n*(n+2): n in [0..50]]; // _G. C. Greubel_, Sep 01 2019

%o (Sage) [3*n*(n+2) for n in (0..50)] # _G. C. Greubel_, Sep 01 2019

%o (GAP) List([0..50], n-> 3*n*(n+2)); # _G. C. Greubel_, Sep 01 2019

%Y Cf. A005563.

%Y Cf. numbers k such that k*(k + m) is a perfect square: A028560 (k=9), A067728 (k=8), A067727 (k=7), A067726 (k=6), A067724 (k=5), A028347 (k=4), A054000 (k=2), A005563 (k=1).

%K nonn,easy

%O 0,2

%A _Robert G. Wilson v_, Feb 05 2002

%E Edited by _N. J. A. Sloane_, Sep 14 2008 at the suggestion of _R. J. Mathar_