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.

A356999 a(n) = 2*A356988(n) - n.

Original entry on oeis.org

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

Views

Author

Peter Bala, Sep 13 2022

Keywords

Comments

For k >= 3, the line graph of the sequence consists of a series of local peaks of height Fibonacci(k) at abscissa n = Lucas(k) separated by local valleys of height Fibonacci(k-1) at abscissa n = Fibonacci(k+2).

Examples

			The sequence arranged as a series of alternating monotone increasing and decreasing sequences:
  1;
  0;
  1, 2;
  1;
  2, 3;
  2;
  3, 4, 5;
  4, 3;
  4, 5, 6, 7, 8;
  7, 6, 5;
  6, 7, 8, 9, 10, 11, 12, 13;
  12, 11, 10, 9, 8;
  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21;
  20, 19, 18, 17, 16, 15, 14, 13;
  14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, ..., 32, 33, 34;
  33, 32, 31, ..., 23, 22, 21;
		

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(2*b(n) - n, n = 1..100);

Formula

a(n+1) - a(n) is either 1 or -1.
The sequence is completely determined by the pair of formulas
1) for k >= 2, a(F(k) + j) = F(k-3) + j for 0 <= j <= F(k-2) and
2) for k >= 1, a(L(k) + j) = F(k) - j for 0 <= j <= F(k-2),
where F(n) = A000045(n) denotes the n-th Fibonacci number (with F(-1) = 1) and L(n) = A000032(n) denotes the n-th Lucas number.