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.

A227145 Numbers satisfying an infinite nested recurrence relation.

Original entry on oeis.org

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

Views

Author

Frank Ruskey, Jul 04 2013

Keywords

Comments

Conjecture: a(F_n) = F_{n-2} for n>1, where F_n is the n-th Fibonacci number.
Conjecture: a(n) ~ n*(3-sqrt(5))/2. -Jeffrey Shallit, Oct 12 2022

Crossrefs

Cf. A060144.

Programs

  • Maple
    a:= proc(n) option remember; local i, r, s;
          if n<2 then 0 else r, s:= n, 1;
             for i while s>0 do r, s:= r-s, (a@@i)(n-i) od: r
          fi
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Jul 04 2013
  • Mathematica
    a[n_] := a[n]= Which[n <= 1, 0,True, n - 1 -Sum[Nest[a, n - i, i], {i,1,n}]]; Table[a[i], {i, 0, 30}] (* José María Grau Ribas, Jul 10 2013 *)

Formula

a(n) = n - 1 - a(n-1) - a(a(n-2)) - a(a(a(n-3))) - a(a(a(a(n-4)))) - ... with a(n) = 0 if n <= 1.