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.

A360259 a(0) = 0, and for any n > 0, let k > 0 be as small as possible and such that F(2) + ... + F(1+k) >= n (where F(m) denotes A000045(m), the m-th Fibonacci number); a(n) = k + a(F(2) + ... + F(1+k) - n).

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Jan 31 2023

Keywords

Comments

See A095791 for the corresponding k's.
This sequence has similarities with A227192; here we use Fibonacci numbers, there powers of 2.

Examples

			The first terms, alongside the corresponding k's, are:
  n      a(n)  k
  -----  ----  ---
      0     0  N/A
      1     1    1
      2     3    2
      3     2    2
      4     6    3
      5     4    3
      6     3    3
      7    10    4
      8     6    4
      9     7    4
     10     5    4
     11     4    4
     12    15    5
		

Crossrefs

See A095791, A360260 and A360265 for similar sequences.

Programs

  • PARI
    { t = k = 0; print1 (0); for (n = 1, #a = vector(70), if (n > t, t += fibonacci(1+k++);); print1 (", "a[n] = k+if (t==n, 0, a[t-n]));); }

Formula

a(A001911(n)) = n.