OFFSET
0,3
COMMENTS
a(A271470(n)) is a perfect square. In fact, a(A271470(n)) = A271105(n) if the first term of a(n) is 1. - Muniru A Asiru, Apr 10 2016
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
M. A. Asiru, All square chiliagonal numbers, Int J Math Educ Sci Technol, 47:7(2016), 1123-1134.
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = 998*n*(n-1)/2 + n, according to the common formula for s-gonal numbers, a(n) = (s-2)*n*(n-1)/2 + n. - Sergey Pavlov, Aug 14 2015
G.f.: x*(1+997*x)/(1-x)^3. - R. J. Mathar, Sep 12 2011
E.g.f.: exp(x)*x*(1 + 499*x). - Ilya Gutkovskiy, Apr 10 2016
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n >= 4. - Muniru A Asiru, Sep 12 2017
MAPLE
MATHEMATICA
LinearRecurrence[{3, -3, 1}, {0, 1, 1000}, 50] (* Vincenzo Librandi, Nov 25 2011 *)
PolygonalNumber[1000, Range[0, 40]] (* Harvey P. Dale, Sep 15 2022 *)
PROG
(PARI) a(n)=n*(499*n-498) \\ Charles R Greathouse IV, Sep 11 2011
(PARI) x='x+O('x^99); concat(0, Vec(x*(1+997*x)/(1-x)^3)) \\ Altug Alkan, Apr 10 2016
(Magma) [n*(499*n-498): n in [0..45]]; // Vincenzo Librandi, Nov 25 2011
(JavaScript) function a(n){return 998*n*(n-1)/2+n} // Sergey Pavlov, Aug 14 2015
(GAP)
a:=[0, 1, 1000];; for n in [4..10^2] do a[n]:=3*a[n-1]-3*a[n-2]+*a[n-3]; od; a; # Muniru A Asiru, Sep 12 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Kausthub Gudipati, Sep 10 2011
STATUS
approved