A014736 Squares of odd triangular numbers.
1, 9, 225, 441, 2025, 3025, 8281, 11025, 23409, 29241, 53361, 64009, 105625, 123201, 189225, 216225, 314721, 354025, 494209, 549081, 741321, 815409, 1071225, 1168561, 1500625, 1625625, 2047761, 2205225, 2732409, 2927521
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (1,4,-4,-6,6,4,-4,-1,1).
Programs
-
GAP
List([1..30], n-> ((2*n-1)*(2*n-1-(-1)^n))^2/4); # G. C. Greubel, Jul 24 2019
-
Magma
[((2*n-1)*(2*n-1-(-1)^n))^2/4: n in [1..30]]; // Vincenzo Librandi, Mar 23 2012
-
Mathematica
Select[Accumulate[Range[70]],OddQ]^2 (* Harvey P. Dale, Mar 22 2012 *)
-
PARI
vector(30, n, ((2*n-1)*(2*n-1-(-1)^n))^2/4) \\ G. C. Greubel, Jul 24 2019
-
Sage
[((2*n-1)*(2*n-1-(-1)^n))^2/4 for n in (1..30)] # G. C. Greubel, Jul 24 2019
-
Scala
((1 to 78).scanLeft(0)( + )).filter( % 2 == 1).map(n => n * n) // _Alonso del Arte, Jul 24 2019
Formula
a(n) = A014493(n+1)^2. - Vincenzo Librandi, Mar 23 2012
From G. C. Greubel, Jul 24 2019: (Start)
G.f.: x*(1 + 8*x + 212*x^2 + 184*x^3 + 726*x^4 + 184*x^5 + 212*x^6 + 8*x^7 + x^8)/((1 - x)^5*(1 + x)^4).
E.g.f.: (1 + x + 5*x^2 + 20*x^3 + 4*x^4)*cosh(x) - x*(1 - 17*x - 12*x^2 - 4*x^3)* sinh(x) - 1. (End)
From Amiram Eldar, Mar 06 2022: (Start)
Sum_{n>=0} 1/a(n) = (3*Pi-8)*Pi/4.
Sum_{n>=0} (-1)^n/a(n) = 4*(G - log(2)), where G is Catalan's constant (A006752). (End)
Extensions
More terms from James Sellers