OFFSET
0,7
COMMENTS
Binomial transform of A099531.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,-1).
FORMULA
a(n) = a(n-1) - a(n-4).
a(n) = Sum_{k=0..floor(n/4)} binomial(n-3*k, k)*(-1)^k.
MATHEMATICA
LinearRecurrence[{1, 0, 0, -1}, {1, 1, 1, 1}, 80] (* G. C. Greubel, Apr 13 2023 *)
PROG
(Magma) [n le 4 select 1 else Self(n-1) -Self(n-4): n in [1..81]]; // G. C. Greubel, Apr 13 2023
(SageMath)
@CachedFunction
def a(n): # a = A099530
if (n<4): return 1
else: return a(n-1) - a(n-4)
[a(n) for n in range(81)] # G. C. Greubel, Apr 13 2023
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Paul Barry, Oct 20 2004
STATUS
approved