This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A380820 #19 Feb 14 2025 23:11:09 %S A380820 0,1,1,2,3,5,8,1,9,0,9,9,18,5,23,8,31,14,45,26,6,32,10,42,18,60,34,7, %T A380820 41,12,53,22,75,42,8,50,14,64,26,90,50,9,59,16,75,30,105,58,10,68,18, %U A380820 86,34,120,66,11,77,20,97,38,135,74,12,86,22,108,42,150 %N A380820 a(0) = 0, a(1) = 1, and for n >= 2, a(n) = a(n-1) + a(n-2) if a(n-1) < n, otherwise a(n-1) - n. %C A380820 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. %C A380820 Terms for n >= 16 are the same as A322558(n) for n >= 17. %H A380820 Ya-Ping Lu, <a href="/A380820/a380820.pdf">Plot of A380820</a> %H A380820 <a href="/index/Rec#order_14">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,0,2,0,0,0,0,0,0,-1). %F A380820 a(n) = A322558(n+1) for n >= 16. %t A380820 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 *) %o A380820 (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 %Y A380820 Cf. A000027, A000045, A005843, A008597, A016825, A017089, A017221, A017497, A322558. %K A380820 nonn,easy %O A380820 0,4 %A A380820 _Ya-Ping Lu_, Feb 04 2025