%I #50 Mar 17 2022 07:02:55
%S 0,2,3,9,11,21,24,38,42,60,65,87,93,119,126,156,164,198,207,245,255,
%T 297,308,354,366,416,429,483,497,555,570,632,648,714,731,801,819,893,
%U 912,990,1010,1092,1113,1199,1221,1311,1334,1428,1452,1550
%N Numbers of the form k*(5*k+1)/2 or k*(5*k-1)/2.
%C a(n) is the set of all m such that 40*m+1 is a perfect square. - _Gary Detlefs_, Feb 22 2010
%C Integers of the form (n^2 - n) / 10. Numbers of the form n * (5*n - 1) / 2 where n is an integer. - _Michael Somos_, Jan 13 2012
%C Also integers of the form sum_{k=1..n} k/5. - _Alonso del Arte_, Jan 20 2012
%C These numbers appear in a theta function identity. See the Hardy-Wright reference, Theorem 356 on p. 284. See the G.f. of A113428. - _Wolfdieter Lang_, Oct 28 2016
%D G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Fifth ed., Clarendon Press, Oxford, 2003, p. 284.
%H G. C. Greubel, <a href="/A057569/b057569.txt">Table of n, a(n) for n = 1..5000</a>
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-2,-1,1).
%F A005475 UNION A005476. G.f.: x^2*(2x^2+x+2)/((1-x)^3*(1+x)^2). a(n) = A132356(n+1)/4. - _R. J. Mathar_, Apr 07 2008
%F a(n) = (A090771(n)^2 -1)/40. - _Gary Detlefs_, Feb 22 2010
%F |A113428(n)| is the characteristic function of the numbers a(n).
%F a(n) = a(1 - n) for all n in Z. - _Michael Somos_, Jan 13 2012
%F From _Colin Barker_, Jun 13 2017: (Start)
%F a(n) = n*(5*n - 2)/8 for n even.
%F a(n) = (5*n - 3)*(n - 1)/8 for n odd.
%F a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n>5.
%F (End)
%F From _Amiram Eldar_, Mar 17 2022: (Start)
%F Sum_{n>=2} 1/a(n) = 10 - 2*sqrt(1+2/sqrt(5))*Pi.
%F Sum_{n>=2} (-1)^n/a(n) = 2*sqrt(5)*log(phi) - 5*(2-log(5)), where phi is the golden ratio (A001622). (End)
%t Select[Table[Plus@@Range[n]/5, {n, 0, 199}], IntegerQ] (* _Alonso del Arte_, Jan 20 2012 *)
%t LinearRecurrence[{1,2,-2,-1,1},{0,2,3,9,11},50] (* _Harvey P. Dale_, Jul 05 2021 *)
%o (PARI) {a(n) = (10 * (n^2 - n) + 12 * (-1)^n * (n\2)) / 16}; \\ _Michael Somos_, Jan 13 2012
%o (PARI) Vec(x^2*(2*x^2+x+2) / ((1-x)^3*(1+x)^2) + O(x^60)) \\ _Colin Barker_, Jun 13 2017
%o (Magma) [(10*(n^2-n)+12*(-1)^n*(n div 2))/16: n in [1..60]]; // _Vincenzo Librandi_, Oct 29 2016
%Y Cf. A074378, A001318, A057570, A154260. - _Vladimir Joseph Stephan Orlovsky_, Jan 06 2009
%Y Cf. A001622, A113428.
%K nonn,easy
%O 1,2
%A _N. J. A. Sloane_, Oct 04 2000