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.

Showing 1-8 of 8 results.

A356988 a(n) = n - a^[2](n - a^[3](n-1)) with a(1) = 1, where a^[2](n) = a(a(n)) and a^[3](n) = a(a(a(n))).

Original entry on oeis.org

1, 1, 2, 3, 3, 4, 5, 5, 6, 7, 8, 8, 8, 9, 10, 11, 12, 13, 13, 13, 13, 14, 15, 16, 17, 18, 19, 20, 21, 21, 21, 21, 21, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 34, 34, 34, 34, 34, 34, 34, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 55, 55, 55, 55, 55
Offset: 1

Views

Author

Peter Bala, Sep 08 2022

Keywords

Comments

This is the second sequence in a family of nested-recurrent sequences with apparently similar structure defined as follows. Given a sequence s = {s(n) : n >= 1} we define the k-th iterated sequence s^[k] by putting s^[1](n) = s(n) and setting s^[k](n) = s^[k-1](s(n)) for k >= 2. For k >= 1, we define a nested-recurrent sequence, dependent on k, by putting u(1) = 1 and setting u(n) = n - u^[k](n - u^[k+1](n-1)) for n >= 2. This is the case k = 2. For other cases see A006165 (k = 1), A356989 (k = 3) and A356990 (k = 4).
The sequence is slow, that is, for n >= 1, a(n+1) - a(n) is either 0 or 1. The sequence is unbounded.
The line graph of the sequence {a(n)} thus consists of a series of plateaus (where the value of the ordinate a(n) remains constant as n increases) joined by lines of slope 1.
The sequence of plateau heights begins 3, 5, 8, 13, 21, 34, 55, ..., the Fibonacci numbers A000045.
The plateaus start at abscissa values n = 4, 7, 11, 18, 29, 47, 76, ..., the Lucas numbers A000032, and finish at abscissa values n = 5, 8, 13, 21, 34, 55, 89, ..., the Fibonacci numbers. The sequence of plateau lengths 1, 1, 2, 3, 5, 8, 13, ... is thus the Fibonacci sequence.
The iterated sequences{a^[k](n) : n >= 1}, k = 2, 3,..., share similar properties to the present sequence. See the Example section below.

Examples

			Related sequences:
1) The square of the sequence: {a^[2](n) : n >= 1} = {a(a(n)) : n >= 1}. The first few terms are
  1, 1, 1, 2, 2, 3, 3, 3, 4, 5, 5, 5, 5, 6, 7, 8, 8, 8, 8, 8, 8, 9, 10, 11, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 15, 16, 17, 18, 19, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 35, 36, 37, 38, 39, ...
The sequence is slow. The line graph of the sequence has plateaus of height Fibonacci(k), k >= 2, starting at abscissa value 2*Fibonacci(k) and ending at abscissa Fibonacci(k+2).
2) The cube of the sequence: {a^[3](n) : n >= 1} = {a(a(a(n))) : n >= 1}. The first few terms are
  1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 5, 5, 5, 5, 5, 5, 5, 6, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 10, 11, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 15, 16, 17, 18, 19, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 23, 24, 25, 26, 27, ...
The line graph of the sequence has plateaus of height Fibonacci(k), k >= 2, starting at abscissa value 3*Fibonacci(k) and ending at abscissa Fibonacci(k+3).
		

Crossrefs

Programs

  • Maple
    a := proc(n) option remember; if n = 1 then 1 else n - a(a(n - a(a(a(n-1))))) end if; end proc:
    seq(a(n), n = 1..100);

Formula

a(n+1) - a(n) = 0 or 1.
The terms of the sequence are completely determined by the following two results:
a) for n >= 2, a(L(n-1) + j) = F(n) for 0 <= j <= F(n-3), where F(n) = A000045(n), the n-th Fibonacci number with F(-1) = 1 and L(n) = A000032(n), the n-th Lucas number;
b) for n >= 2, a(F(n+1) + j) = F(n) + j for 0 <= j <= F(n-1).
Hence a(F(n+2)) = a(F(n+1)) + a(F(n)) for n >= 2 and a(L(n+2)) = a(L(n+1)) + a(L(n)) for n >= 0.
a(2*F(n)) = Lucas(n-1) for n >= 2;
a(3*F(n)) = 2*F(n) for n >= 1;
a(4*F(n)) = F(n+2) for n >= 2;
a(5*F(n)) = 4*F(n) - F(n-1) = A022120(n-2) for n >= 2.
a(2*L(n)) = F(n) + 3*F(n-1) = A104449(n) for n >= 0;
a(3*L(n)) = F(n+3) for n >= 3;
a(4*L(n)) = F(n+4) - L(n-3) = A022114(n-1) for n >= 3;
a(5*L(n)) = 11*F(n-1) + F(n-4) = A022367(n-1) for n >= 4.
For n >= 1, m >= 2, a(F(m*n)) = F(m*n-1) and a(L(m*n)) = F(m*n+1). Hence
a(L(m*n)) + a(F(m*n)) = L(m*n) and a(L(m*n)) - a(F(m*n)) = F(m*n).
Conjectures:
1) a(n) + a^[2](n - a^[2](n - a^[2](n))) = n for n >= 2.
2) If k >= 2 and m = 2*k - 1 then a(m*n - a(k*n)) = a(m*n - a(m*n - a(m*n - a(k*n)))).

A356991 a(n) = b(n) + b(n - b(n)) for n >= 2, where b(n) = A356998(n).

Original entry on oeis.org

2, 3, 4, 4, 5, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 15, 16, 17, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 29, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 47, 47, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 76, 76, 76, 76, 76, 77, 78, 79, 80
Offset: 2

Views

Author

Peter Bala, Sep 08 2022

Keywords

Comments

The sequence is slow, that is, for n >= 2, a(n+1) - a(n) is either 0 or 1. The sequence is unbounded.
The line graph of the sequence {a(n)} thus consists of a series of plateaus (where the value of the ordinate a(n) is unchanged with increasing values of the abscissa n) joined by lines of slope 1.
The sequence of plateau heights begins 4, 7, 11, 18, 29, 47, 76, 123, 199, ..., the Lucas sequence {A000032(k): k >= 3}. The plateaus start at absiccsa values n = 4, 8, 12, 20, 32, 52, 84, 136, ..., the sequence {A022087(k): k >= 2}, and end at abscissa values n = 5, 8, 13, 21, 34, 55, 89, ..., the Fibonacci sequence {A000045(k): k >= 5}.
Compare with A356992 and A356993.
Other sequences defined in terms of b(n) = A356998(n) that are similarly related to the Lucas numbers include {n - b(b(b(2*n - b(n)))): n >= 1} beginning 0, 1, 2, 3, 3, 4, 4, 5, 6, 7, 7, 7, 8, 9, 10, 11, 11, 11, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 17, 18, 19, ... and {2*n - b(2*n - b(2*n - b(n))) : n >= 1} beginning 1, 3, 4, 5, 7, 7, 9, 11, 11, 12, 14, 16, 18, 18, 18, 19, 21, 23, 25, 27, 29, 29, 29, 29, 29, 31, .... Neither sequence is slow.

Crossrefs

Programs

  • Maple
    b := proc(n) option remember; if n = 1 then 1 else n - b(b(n - b(b(b(n-1))))) end if; end proc:
    seq( b(n) + b(n - b(n) ), n = 2..100);

Formula

The sequence is completely determined by the initial values a(2) = 2, a(3) = 3 and the pair of formulas:
1) for k >= 3, a(4*F(k-1) + j) = L(k) for 0 <= j <= F(k-4), where F(-1) = 1 and
2) for k >= 3, a(F(k+2) + j) = L(k) + j for 0 <= j <= L(k-1).

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

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 10, 11, 11, 11, 11, 11, 11, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 23, 24, 25, 26, 27, 28, 29, 29, 29, 29
Offset: 2

Views

Author

Peter Bala, Sep 09 2022

Keywords

Comments

The sequence is slow, that is, for n >= 2, a(n+1) - a(n) is either 0 or 1. The sequence is unbounded.
The line graph of the sequence {a(n)} thus consists of a series of plateaus (where the value of the ordinate a(n) remains constant as n increases) joined by lines of slope 1.
The sequence of plateau heights beginning 3, 4, 5, 7, 8, 11, 13, 18, 21, 29, 34, 47, 55, ..., consists of alternating Fibonacci numbers A000045 and Lucas numbers A000032.

Crossrefs

Programs

  • Maple
    # b(n) = A356988
    b := proc(n) option remember; if n = 1 then 1 else n - b(b(n - b(b(b(n-1))))) end if; end proc:
    seq( b(n - b(n - b(n - b(n)))), n = 2..100 );

Formula

a(2) = a(3) = a(4) = a(5) = 1 and then for k >= 3 there holds
a(3*F(k) + j) = F(k) for 0 <= j <= F(k-1) (local plateau)
a(L(k+1) + j) = F(k) + j for 0 <= j <= F(k-2) (ascent to plateau of height L(k-1))
a(4*F(k) + j) = L(k-1) for 0 <= j <= F(k-1) (local plateau)
a(4*F(k) + F(k-1) + j) = L(k-1) + j for 0 <= j <= F(k-3) (ascent to next plateau of height F(k+1)).

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

Original entry on oeis.org

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, 14, 13, 13, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 25, 24, 23, 22, 21, 21, 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
Offset: 2

Views

Author

Peter Bala, Sep 11 2022

Keywords

Comments

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}.
The local peaks of the graph occur at abscissa values n = 7, 11, 18, 29, 47, 76, ..., the sequence {Lucas(k): k >= 4}.
The trough of height F(k) starts at abscissa n = 4*F(k-1) and ends at abscissa n = F(k+2).
The sequence of trough lengths starting at abscissa n = 8 begin 0, 1, 1, 2, 3, 5, 8, 13, ..., the Fibonacci sequence A000045.

Examples

			Sequence arranged to show local peak values P and troughs T:
     0,
     1,
     2,
     2,
     3,
  P  4,
  T  3,
     4,
     5,
  P  6,
  T  5, 5,
     6,
     7,
     8,
     9,
  P  10,
     9,
  T  8, 8,
     9,
     10,
     11,
     12,
     13,
     14,
     15,
  P  16,
     15,
     14,
  T  13, 13, 13,
     14,
     15,
     16,
     17,
     18,
     19,
     20,
     21,
     22,
     23,
     24,
     25,
  P  26,
     25,
     24,
     23,
     22,
  T  21, 21, 21, 21,
     22,
     23,
     24,
     ...
		

Crossrefs

Programs

  • Maple
    # b(n) = A356988
    b := proc(n) option remember; if n = 1 then 1 else n - b(b(n - b(b(b(n-1))))) end if; end proc:
    seq( b(n) - b(n - b(n)), n = 1..100);

Formula

a(n+1) - a(n) = 1, 0 or -1.
Let F(n) = Fibonacci(n) and L(n) + Lucas (n).
For k >= 5, a(F(k) + j) = F(k-2) + j for 0 <= j <= F(k-2) (ascent to local peak value).
For k >= 3, a(L(k)) = 2*F(k-1) (local peak values).
For k >= 4, a(L(k) + j) = 2*F(k-1) - j, for 0 <= j <= F(k-3) (descent to trough).
For k >= 2, a(4*F(k) + j) = F(k+1) for 0 <= j <= F(k-3) (local trough values).

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

Original entry on oeis.org

1, 2, 3, 4, 4, 4, 5, 6, 7, 7, 7, 8, 9, 10, 11, 11, 11, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 48
Offset: 2

Views

Author

Peter Bala, Sep 08 2022

Keywords

Comments

The sequence is slow, that is, for n >= 2, a(n+1) - a(n) is either 0 or 1. The sequence is unbounded.
The line graph of the sequence {a(n)} thus consists of a series of plateaus (where the value of the ordinate a(n) remains constant as n increases) joined by lines of slope 1.
The sequence of plateau heights begins 4, 7, 11, 18, 29, 47, ..., conjecturally the Lucas sequence {A000032(k): k >= 3}.
The plateaus start at abscissa values n = 5, 10, 16, 26, 42, 68, .... Apart from the first term 5, this appears to be the sequence {2*Fibonacci(k): k >= 5}.
The plateaus end at abscissa values n = 7, 12, 19, 31, 50, 81, ..., conjecturally the sequence {A013655(k): k >= 3}.
The sequence of plateau lengths begins 2, 2, 3, 5, 8, 13, .... Apart from the first term 2, this appears to be the sequence {Fibonacci(k): k >= 3}.
The slow sequences {a(a(n)): n >= 3} and {a(a(a(n))): n >= 4} appear to have similar properties to the present sequence. The slow sequence {n - a(n): n >= 2} appears to have plateaus at heights given by the Fibonacci sequence. See the Example section.

Examples

			Related sequences:
1) {n - a(n): n >= 2}
  1, 1, 1, 1, 2, 3, 3, 3, 3, 4, 5, 5, 5, 5, 5, 6, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 10, 11, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 15, 16, 17, 18, 19, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 35, 36, 37, ...
The line graph of the sequence has plateaus at heights 3, 5, 8, 13, 21, 34, ..., conjecturally the Fibonacci numbers A000045.
2) {a(a(n)): n >= 3}
  1, 2, 3, 3, 3, 4, 4, 4, 4, 4, 5, 6, 7, 7, 7, 7, 7, 7, 8, 9, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 47, 47, 47, 47, ...
The line graph of the sequence has plateaus at heights 3, 4, 7, 11, 28, 29, ..., conjecturally the Lucas numbers A000045.
3) {a(a(a(n))): n >= 4}
  1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 9, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 29, 29, 29, ...
The line graph of the sequence has plateaus at heights (2), 3, 4, 7, 11, 28, 29, ..., conjecturally the Lucas numbers A000045.
		

Crossrefs

Programs

  • Maple
    b := proc(n) option remember; if n = 1 then 1 else n - b(b(n - b(b(b(n-1))))) end if; end proc:
    seq(n - b(n - b(n - b(n - b(n - b(n - b(n)))))), n = 2..100);

A356995 a(n) = b(n) - b(b(n)) - b(n - b(n)) for n >= 3, where b(n) = A356988(n).

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0
Offset: 3

Views

Author

Peter Bala, Sep 09 2022

Keywords

Comments

Starting at n = 7, the sequence consists of successive blocks of integers of the form 1, 2, 3, ..., F(k) - 1, F(k), F(k) - 1, ..., 3, 2, 1, where F(k), k >= 1, denotes the k-th Fibonacci number, followed by a string of zeros conjecturally of length 1 + 2*F(k+1).
The sequence has local peak values at abscissa values n = 7, 11, 18, ..., L(k), ..., where L(k) = A000032(k), the k-th Lucas number. The zero strings begin at abscissa values n = 8, 12, 20, 32, 52, ..., equal to the sequence {L(k) + F(k-3) : k >= 4} = {4*F(k-1): k >= 4}.

Examples

			Sequence {a(n)} arranged as a sequence of strings of length 2*Fibonacci(k), k >= 1
  0, 0;
  0, 0;
  1, 0, 0, 0;
  1, 0, 0, 0, 0, 0;
  1, 2, 1, 0, 0, 0, 0, 0, 0, 0;
  1, 2, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
  1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
  1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
  ...
		

Crossrefs

Programs

  • Maple
    # b(n) = A356988(n)
    b := proc(n) option remember; if n = 1 then 1 else n - b(b(n - b(b(b(n-1))))) end if; end proc:
    seq(b(n) - b(b(n)) - b(n - b(n)), n = 3..250);

Formula

a(n+1) - a(n) is in {1, 0, -1}.
For k >= 3, a(L(k) + j) = F(k-3) - j and a(L(k) - j) = F(k-3) - j for 0 <= j <= F(k-3), where F(k) = A000045(k), the k-th Fibonacci number and L(k) = A000032(k), the k-th Lucas number.

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

Original entry on oeis.org

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, 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, 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
Offset: 2

Views

Author

Peter Bala, Sep 11 2022

Keywords

Comments

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
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
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) local troughs: on the integer interval [F(k+2), F(k+2) + F(k-3)] the sequence has the constant value F(k-3)
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.

Examples

			The sequence is arranged to show the local plateaus (P) and the local troughs (T):
    0,
    1,
    1,
T   0,
P   1, 1, 1
    1,
P   2, 2, 2,
T   1,1,
    2,
P   3, 3, 3, 3, 3,
T   2, 2, 2,
    3,
    4,
P   5, 5, 5, 5, 5, 5, 5,
    4,
T   3, 3, 3, 3,
    4,
    5,
    6,
    7,
P   8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
    7,
    6,
T   5, 5, 5, 5, 5, 5,
    6,
    7,
    8,
    9,
    10,
    11,
    12,
P   13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
    12,
    11,
    10,
    9,
T   8, 8, 8, 8, 8, 8, 8, 8, 8,
    9,
    10,
    11,
    ...
		

Crossrefs

Programs

  • Maple
    # b(n) = A356988
    b := proc(n) option remember; if n = 1 then 1 else n - b(b(n - b(b(b(n-1))))) end if; end proc:
    seq( b(n) - b(n - b(n - b(n))), n = 2..100);

Formula

a(n+1) - a(n) = 1, 0 or -1.
Let F(n) = A000045(n) with F(-1) = 1 and let L(n) = A000032(n).
For k >= 5, a(F(k) + j) = F(k-5) for 0 <= j <= F(k-5) (troughs).
For k >= 4, a(2*F(k) + j) = F(k-2) for 0 <= j <= 2*F(k-3) (plateaus).

A356994 a(n) = n - b(b(b(n))), where b(n) = A356988(n).

Original entry on oeis.org

0, 1, 2, 3, 4, 4, 5, 6, 6, 7, 8, 9, 10, 10, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 26, 26, 26, 26, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 42, 42, 42, 42, 42, 42, 42, 42, 43, 44, 45
Offset: 1

Views

Author

Peter Bala, Sep 09 2022

Keywords

Comments

The sequence is slow, that is, for n >= 2, a(n+1) - a(n) is either 0 or 1. The sequence is unbounded.
The line graph of the sequence {a(n)} thus consists of a series of plateaus (where the value of the ordinate a(n) remains constant as n increases) joined by lines of slope 1.
The sequence of plateau heights begins 2, 4, 6, 10, 16, 26, 42, 68, 110, ..., the sequence {2*Fibonacci(k): k >= 2}
The plateau of height 2*F(k), k >= 2, has length equal to Fibonacci(k-2), starting at abscissa value n = Fibonacci(k+2) and ending at abscissa n = 3*Fibonacci(k).

Crossrefs

Programs

  • Maple
    #  b(n) = A356988
    b := proc(n) option remember; if n = 1 then 1 else n - b(b(n - b(b(b(n-1))))) end if; end proc:
    seq( n - b(b(b(n))), n = 1..100);

Formula

The sequence is determined by the initial values a(1) = 0, a(2) = 1 and the pair of formulas
1) a(n) = 2*Fibonacci(k) for n in the integer interval [Fibonacci(k+2), 3*Fibonacci(k)], k >= 2, and
2) for k >= 2, a(3*Fibonacci(k) + j) = 2*Fibonacci(k) + j for 0 <= j <= 2*Fibonacci(k-1).
Showing 1-8 of 8 results.