login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A367965
a(n) = (1/8)*(4*n^2 + 6*n + (-1)^n*(2*n*(n + 1) - 1) + 1).
1
0, 1, 5, 4, 16, 9, 33, 16, 56, 25, 85, 36, 120, 49, 161, 64, 208, 81, 261, 100, 320, 121, 385, 144, 456, 169, 533, 196, 616, 225, 705, 256, 800, 289, 901, 324, 1008, 361, 1121, 400, 1240, 441, 1365, 484, 1496, 529, 1633, 576, 1776, 625, 1925, 676, 2080, 729, 2241, 784
OFFSET
0,3
FORMULA
a(n) = Sum_{k=0..n} (-1)^(n - k) * A367964(n, k).
a(2*n) = n*(3*n+2) = A045944(n).
a(2*n-1) = n^2 = A000290(n).
G.f.: x*(1 + 5*x + x^2 + x^3)/(1 - x)^3*(1 + x)^3). - Stefano Spezia, Dec 07 2023
Sum_{n>=1} 1/a(n) = Pi^2/6 + Pi/(4*sqrt(3)) - 3*(log(3)-1)/4. - Amiram Eldar, Dec 06 2024
MAPLE
a := n -> (1/8)*(4*n^2 + 6*n + (-1)^n*(2*n*(n + 1) - 1) + 1):
seq(a(n), n = 0..55);
MATHEMATICA
LinearRecurrence[{0, 3, 0, -3, 0, 1}, {0, 1, 5, 4, 16, 9}, 100] (* Paolo Xausa, Dec 07 2023 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Peter Luschny, Dec 07 2023
STATUS
approved