login
A318868
a(n) = 1^2 + 3^4 + 5^6 + 7^8 + 9^10 + 11^12 + 13^14 + ... + (up to n).
3
1, 1, 4, 82, 87, 15707, 15714, 5780508, 5780517, 3492564909, 3492564920, 3141920941630, 3141920941643, 3940518306640919, 3940518306640934, 6572348874019531544, 6572348874019531561, 14069656800941744522553, 14069656800941744522572, 37604043114346899937878154
OFFSET
1,3
LINKS
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