OFFSET
0,3
COMMENTS
All terms of this sequence are triangular numbers. Graphically, for each term of the sequence, one corner of the square of squares (4th power) will be part of the corresponding triangle's hypotenuse if the term is an odd number. Otherwise, it will not be part of it.
a(A000129(n)) is a square triangular number.
LINKS
Colin Barker and Daniel Poveda Parrilla, Table of n, a(n) for n = 0..46340 [n = 1 through 1000 by Colin Barker, Aug 02 2016; and n=1001 to 46340 by Daniel Poveda Parrilla, Aug 04 2016]
Index entries for linear recurrences with constant coefficients, signature (2,2,-6,0,6,-2,-2,1).
FORMULA
a(n) = n^4 + Sum_{k=0..(n^2 - (n mod 2))} 2k.
a(n) = A275543(n)*(n^2).
From Colin Barker, Aug 01 2016 and Aug 04 2016: (Start)
a(n) = n^2*(2*n^2 + (-1)^n).
a(n) = 2*n^4 + n^2 for n even.
a(n) = 2*n^4 - n^2 for n odd.
G.f.: x*(1 +34*x +79*x^2 +156*x^3 +79*x^4 +34*x^5 +x^6) / ((1-x)^5*(1+x)^3).
(End)
E.g.f.: x*(2*(1 + 7*x + 6*x^2 + x^3)*exp(x) - exp(-x)). - G. C. Greubel, Aug 05 2016
Sum_{n>=1} 1/a(n) = 1 - Pi^2/12 + (tan(c) - coth(c))*c, where c = Pi/(2*sqrt(2)) is A093954. - Amiram Eldar, Aug 21 2022
EXAMPLE
a(5) = 5^4 + Sum_{k=0..(5^2 - (5 mod 2))} 2k = 625 + Sum_{k=0..(25 - 1)} 2k = 625 + 600 = 1225.
a(12) = 12^4 + Sum_{k=0..(12^2 - (12 mod 2))} 2k = 20736 + Sum_{k=0..(144 - 0)} 2k = 20736 + 20880 = 41616.
MATHEMATICA
Table[n^2 ((-1)^n + 2 n^2), {n, 0, 34}] (* or *)
CoefficientList[Series[x (1 + 34 x + 79 x^2 + 156 x^3 + 79 x^4 + 34 x^5 +
x^6)/((1 - x)^5 (1 + x)^3), {x, 0, 34}], x] (* Michael De Vlieger, Aug 01 2016 *)
LinearRecurrence[{2, 2, -6, 0, 6, -2, -2, 1}, {0, 1, 36, 153, 528, 1225, 2628, 4753}, 40] (* Harvey P. Dale, Sep 10 2016 *)
PROG
(PARI) a(n)=n=n^2; if(n%2, 2*n-1, 2*n+1)*n \\ Charles R Greathouse IV, Jul 30 2016
(PARI) concat(0, Vec(x*(1+34*x+79*x^2+156*x^3+79*x^4+34*x^5+x^6)/((1-x)^5*(1+x)^3) + O(x^100))) \\ Colin Barker, Aug 01 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Daniel Poveda Parrilla, Jul 30 2016
EXTENSIONS
New name from Colin Barker, Aug 04 2016
STATUS
approved