OFFSET
1,5
COMMENTS
a(c^n) for some constant c can be expressed as a linear recurrence with constant coefficients.
FORMULA
PROG
(PARI) a(n) = (n^2-1)/6-sum(k=1, n, (k*(k+1)/2)%n)/n+((n+1)%2)/2
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Thomas Scheuerle, Jul 26 2024
STATUS
approved