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 A356998 #13 Oct 13 2022 05:55:34 %S A356998 0,1,2,2,3,4,3,4,5,6,5,5,6,7,8,9,10,9,8,8,9,10,11,12,13,14,15,16,15, %T A356998 14,13,13,13,14,15,16,17,18,19,20,21,22,23,24,25,26,25,24,23,22,21,21, %U A356998 21,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,41,40,39,38,37,36,35,34,34,34,34,34,34,35,36,37 %N A356998 a(n) = b(n) - b(n - b(n)) for n >= 2, where b(n) = A356988(n). %C A356998 The line graph of the sequence rises with slope 1 to a local peak value at heights 4, 6, 10, 16, 26, 42, ..., the sequence {2*Fibonacci(k): k >= 3}, before descending with slope -1 to a local trough at heights 3, 5, 8, 13, 21, ..., the sequence {Fibonacci(k): k >= 4}. %C A356998 The local peaks of the graph occur at abscissa values n = 7, 11, 18, 29, 47, 76, ..., the sequence {Lucas(k): k >= 4}. %C A356998 The trough of height F(k) starts at abscissa n = 4*F(k-1) and ends at abscissa n = F(k+2). %C A356998 The sequence of trough lengths starting at abscissa n = 8 begin 0, 1, 1, 2, 3, 5, 8, 13, ..., the Fibonacci sequence A000045. %F A356998 a(n+1) - a(n) = 1, 0 or -1. %F A356998 Let F(n) = Fibonacci(n) and L(n) + Lucas (n). %F A356998 For k >= 5, a(F(k) + j) = F(k-2) + j for 0 <= j <= F(k-2) (ascent to local peak value). %F A356998 For k >= 3, a(L(k)) = 2*F(k-1) (local peak values). %F A356998 For k >= 4, a(L(k) + j) = 2*F(k-1) - j, for 0 <= j <= F(k-3) (descent to trough). %F A356998 For k >= 2, a(4*F(k) + j) = F(k+1) for 0 <= j <= F(k-3) (local trough values). %e A356998 Sequence arranged to show local peak values P and troughs T: %e A356998 0, %e A356998 1, %e A356998 2, %e A356998 2, %e A356998 3, %e A356998 P 4, %e A356998 T 3, %e A356998 4, %e A356998 5, %e A356998 P 6, %e A356998 T 5, 5, %e A356998 6, %e A356998 7, %e A356998 8, %e A356998 9, %e A356998 P 10, %e A356998 9, %e A356998 T 8, 8, %e A356998 9, %e A356998 10, %e A356998 11, %e A356998 12, %e A356998 13, %e A356998 14, %e A356998 15, %e A356998 P 16, %e A356998 15, %e A356998 14, %e A356998 T 13, 13, 13, %e A356998 14, %e A356998 15, %e A356998 16, %e A356998 17, %e A356998 18, %e A356998 19, %e A356998 20, %e A356998 21, %e A356998 22, %e A356998 23, %e A356998 24, %e A356998 25, %e A356998 P 26, %e A356998 25, %e A356998 24, %e A356998 23, %e A356998 22, %e A356998 T 21, 21, 21, 21, %e A356998 22, %e A356998 23, %e A356998 24, %e A356998 ... %p A356998 # b(n) = A356988 %p A356998 b := proc(n) option remember; if n = 1 then 1 else n - b(b(n - b(b(b(n-1))))) end if; end proc: %p A356998 seq( b(n) - b(n - b(n)), n = 1..100); %Y A356998 Cf. A000032, A000045, A356988, A356991 - A356999. %K A356998 nonn,easy %O A356998 2,3 %A A356998 _Peter Bala_, Sep 11 2022