OFFSET
0,4
COMMENTS
Sequence starts with the first 7 Fibonacci numbers. For n >= 12, a(n) takes the values of (8*n+30)/7, (n+22)/7, (9*n+35)/7, (2*n+26)/7, (11*n+41)/7, (4*n+30)/7, and (15*n+45)/7 sequentially for n = 5, 6, 0, 1, 2, 3, 4 mod 7 (see plot in Links), which correspond to A017089 (n>=2), A000027 (n>=5), A017221 (n>=2), A005843 (n>=4), A017497 (n>=2), A016825 (n>=3), and A008597 (n>=3), respectively.
Terms for n >= 16 are the same as A322558(n) for n >= 17.
LINKS
Ya-Ping Lu, Plot of A380820
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,2,0,0,0,0,0,0,-1).
FORMULA
a(n) = A322558(n+1) for n >= 16.
MATHEMATICA
s={0, 1}; Do[AppendTo[s, If[s[[-1]]<n, s[[-1]]+s[[-2]], s[[-1]]-n]], {n, 2, 67}]; s (* James C. McMahon, Feb 14 2025 *)
PROG
(Python) def A380820(n): R = [0, 1, 1, 2, 3, 5, 8, 1, 9, 0, 9, 9]; X = [9, 2, 11, 4, 15, 8, 1]; Y = [35, 26, 41, 30, 45, 30, 22]; return R[n] if n < 12 else (X[n%7]*n + Y[n%7])//7
CROSSREFS
KEYWORD
nonn,easy,new
AUTHOR
Ya-Ping Lu, Feb 04 2025
STATUS
approved