OFFSET
1,3
LINKS
Colin Barker, Table of n, a(n) for n = 1..350
FORMULA
a(n) = (2*floor((n-1)/2) + 1)*(n mod 2) + Sum_{i=1..floor(n/2)} (2*i - 1)^(2*i).
EXAMPLE
a(1) = 1;
a(2) = 1^2 = 1;
a(3) = 1^2 + 3 = 4;
a(4) = 1^2 + 3^4 = 82;
a(5) = 1^2 + 3^4 + 5 = 87;
a(6) = 1^2 + 3^4 + 5^6 = 15707;
a(7) = 1^2 + 3^4 + 5^6 + 7 = 15714;
a(8) = 1^2 + 3^4 + 5^6 + 7^8 = 5780508;
a(9) = 1^2 + 3^4 + 5^6 + 7^8 + 9 = 5780517;
a(10) = 1^2 + 3^4 + 5^6 + 7^8 + 9^10 = 3492564909;
a(11) = 1^2 + 3^4 + 5^6 + 7^8 + 9^10 + 11 = 3492564920;
a(12) = 1^2 + 3^4 + 5^6 + 7^8 + 9^10 + 11^12 = 3141920941630, etc.
MATHEMATICA
Table[(2*Floor[(n - 1)/2] + 1)*Mod[n, 2] + Sum[(2*i - 1)^(2*i), {i, Floor[n/2]}], {n, 25}]
PROG
(PARI) a(n) = (2*((n-1)\2) + 1)*(n % 2) + sum(i=1, n\2, (2*i - 1)^(2*i)); \\ Michel Marcus, Sep 18 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Sep 16 2018
STATUS
approved