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.

A083417 Primitive recursive function r(z, r(s, r(s, r(s, p_2)))) at (n, 0).

Original entry on oeis.org

0, 1, 2, 1, 0, 5, 2, 3, 3, 2, 2, 3, 4, 1, 8, 5, 4, 2, 2, 3, 3, 2, 2, 7, 2, 9, 5, 2, 12, 9, 7, 5, 4, 2, 2, 3, 4, 1, 8, 5, 4, 2, 2, 3, 3, 2, 2, 15, 8, 5, 1, 43, 20, 13, 10, 3, 14, 7, 3, 11, 8, 3, 8, 5, 4, 2, 2, 3, 4, 1, 24, 13, 5, 4, 2, 11, 4, 5, 5, 4, 1, 13, 6, 5, 5, 4, 2, 7, 5, 3, 1, 3, 3, 2, 2, 31, 14, 10, 3
Offset: 0

Views

Author

Alex Fink, Jun 08 2003

Keywords

References

  • S. Wolfram, A New Kind of Science, 2001, p. 908.

Crossrefs

A253099 gives locations of zeros.

Programs

  • Maple
    z := x -> 0: s := x -> (1 + op(1, x)): p := x -> subs(q = x, y -> op(q, y)): c := x -> subs(q = x, y -> eval((op(1, q))([(seq(op(i, q), i = 2..nops(q)))(y)]))): r := x -> subs(q = x, y -> eval(`if`(op(1, y) = 0, (op(1, q))([op(2, y)]), (op(2, q))([r(q)([op(1, y) - 1, op(2, y)]), op(1, y) - 1, op(2, y)])))): seq(r([z, r([s, r([s, r([s, p(2)])])])])([i, 0]), i = 0..109);
  • Mathematica
    (* Mathematica code from New Kind of Science, p. 908, added by N. J. A. Sloane, Feb 17 2015 *)
    F = Fold[Fold[
         2^Ceiling[Log[2, Ceiling[(#1 + 2)/(#2 + 2)]]] (#2 + 2) -
           2 - #1 &, #2, Range[#1]] &, 0, Range[#]] &
    Table[F[n], {n, 0, 98}]
  • PARI
    f(x,y)=(y+2)<Charles R Greathouse IV, Jan 25 2012