cp's OEIS Frontend

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.

A356997 a(n) = b(n) - b(n - b(n - b(n))) for n >= 2, where b(n) = A356988(n).

This page as a plain text file.
%I A356997 #16 Jan 01 2025 09:54:17
%S A356997 0,1,1,0,1,1,1,1,2,2,2,1,1,2,3,3,3,3,3,2,2,2,3,4,5,5,5,5,5,5,5,4,3,3,
%T A356997 3,3,4,5,6,7,8,8,8,8,8,8,8,8,8,8,8,7,6,5,5,5,5,5,5,6,7,8,9,10,11,12,
%U A356997 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,12,11,10,9,8,8,8,8,8,8,8,8,8,9,10,11
%N A356997 a(n) = b(n) - b(n - b(n - b(n))) for n >= 2, where b(n) = A356988(n).
%C A356997 The line graph of the sequence consists of a series of local plateaus and local troughs joined at each end by lines of slope 1 and slope -1. More precisely, for k >= 3 the graph of the sequence consists of
%C A356997 a) local plateaus: on the integer interval [2*F(k), 2*F(k) + 2*F(k-3)] the sequence has the constant value F(k-2), where F(n) denotes the n-th Fibonacci number
%C A356997 b) descent to a trough: on the integer interval [2*F(k) + 2*F(k-3), F(k+2)] the line graph of the sequence has slope -1
%C A356997 c) local troughs: on the integer interval [F(k+2), F(k+2) + F(k-3)] the sequence has the constant value F(k-3)
%C A356997 d) ascent to a plateau: on the integer interval [F(k+2) + F(k-3), 2*F(k+1)] the line graph of the sequence has slope 1.
%F A356997 a(n+1) - a(n) = 1, 0 or -1.
%F A356997 Let F(n) = A000045(n) with F(-1) = 1 and let L(n) = A000032(n).
%F A356997 For k >= 5, a(F(k) + j) = F(k-5) for 0 <= j <= F(k-5) (troughs).
%F A356997 For k >= 4, a(2*F(k) + j) = F(k-2) for 0 <= j <= 2*F(k-3) (plateaus).
%e A356997 The sequence is arranged to show the local plateaus (P) and the local troughs (T):
%e A356997     0,
%e A356997     1,
%e A356997     1,
%e A356997 T   0,
%e A356997 P   1, 1, 1
%e A356997     1,
%e A356997 P   2, 2, 2,
%e A356997 T   1,1,
%e A356997     2,
%e A356997 P   3, 3, 3, 3, 3,
%e A356997 T   2, 2, 2,
%e A356997     3,
%e A356997     4,
%e A356997 P   5, 5, 5, 5, 5, 5, 5,
%e A356997     4,
%e A356997 T   3, 3, 3, 3,
%e A356997     4,
%e A356997     5,
%e A356997     6,
%e A356997     7,
%e A356997 P   8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
%e A356997     7,
%e A356997     6,
%e A356997 T   5, 5, 5, 5, 5, 5,
%e A356997     6,
%e A356997     7,
%e A356997     8,
%e A356997     9,
%e A356997     10,
%e A356997     11,
%e A356997     12,
%e A356997 P   13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
%e A356997     12,
%e A356997     11,
%e A356997     10,
%e A356997     9,
%e A356997 T   8, 8, 8, 8, 8, 8, 8, 8, 8,
%e A356997     9,
%e A356997     10,
%e A356997     11,
%e A356997     ...
%p A356997 # b(n) = A356988
%p A356997 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 A356997 seq( b(n) - b(n - b(n - b(n))), n = 2..100);
%Y A356997 Cf. A000045, A356988, A356991 - A356999.
%K A356997 nonn,easy
%O A356997 2,9
%A A356997 _Peter Bala_, Sep 11 2022