OFFSET
3,3
LINKS
Paolo Xausa, Table of n, a(n) for n = 3..10000
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
FORMULA
If n is odd, a(n) = (n^2 - 3*n)/2; if n is even, a(n) = (n^2 - 4*n)/2.
G.f.: x^5*(5 + x - 2*x^2)/((1 - x)^3*(1 + x)^2). - Stefano Spezia, Jan 04 2023
MATHEMATICA
Table[(n*(n - 4 + BitGet[n, 0]))/2, {n, 3, 100}] (* Paolo Xausa, Oct 02 2024 *)
PROG
(Python)
def A359329(n): return (n*(n-4)+n*(n&1))>>1 # Chai Wah Wu, Jan 23 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Luk De Clercq, Dec 26 2022
STATUS
approved