OFFSET
2,2
LINKS
Bulgarian Winter Mathematical Competition "Atanas Radev", Problems and solutions brochure, Problem 9.4, p. 6 (in Bulgarian).
Art of Problem Solving, High School Olympiads - Colored segments, 2024.
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
a(n) = n*(n-1)/2 for n<=6, a(2*k+1) = 8*k-5 if k>=3, a(2*k) = 8*k-8 if k>=4.
G.f.: -x^2*(x^7-2*x^4-2*x^3-2*x^2-2*x-1)/((x+1)*(x-1)^2).
MATHEMATICA
Drop[CoefficientList[Series[ -x^2*(x^7-2*x^4-2*x^3-2*x^2-2*x-1)/((x+1)*(x-1)^2), {x, 0, 59}], x], 2] (* James C. McMahon, Mar 08 2024 *)
PROG
(Python)
def A369801(n): return (n-2<<2)-(n&1) if n>=7 else (1, 3, 6, 10, 15)[n-2] # Chai Wah Wu, Mar 30 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mladen Valkov, Feb 01 2024
STATUS
approved