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).

This page as a plain text file.
%I A083417 #22 Aug 11 2025 23:08:50
%S A083417 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,
%T A083417 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,
%U A083417 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
%N A083417 Primitive recursive function r(z, r(s, r(s, r(s, p_2)))) at (n, 0).
%D A083417 S. Wolfram, A New Kind of Science, 2001, p. 908.
%H A083417 Charles R Greathouse IV, <a href="/A083417/b083417.txt">Table of n, a(n) for n = 0..10000</a>
%H A083417 S. Wolfram, <a href="http://www.wolframscience.com/nksonline/page-907b-text">A New Kind of Science</a>, pages 907-908.
%p A083417 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);
%t A083417 (* Mathematica code from New Kind of Science, p. 908, added by _N. J. A. Sloane_, Feb 17 2015 *)
%t A083417 F = Fold[Fold[
%t A083417      2^Ceiling[Log[2, Ceiling[(#1 + 2)/(#2 + 2)]]] (#2 + 2) -
%t A083417        2 - #1 &, #2, Range[#1]] &, 0, Range[#]] &
%t A083417 Table[F[n], {n, 0, 98}]
%o A083417 (PARI) f(x,y)=(y+2)<<ceil(log(ceil((x+2)/(y+2)))/log(2))-2-x
%o A083417 a(n)=my(t,y);for(k=1,n,y=k;for(i=1,t,y=f(y,i));t=y);t
%o A083417 A(n)=my(v=vector(n),t,y);v[1]=1;for(k=2,n,y=k;for(i=1,t,y=f(y,i));v[k]=t=y);v \\ _Charles R Greathouse IV_, Jan 25 2012
%Y A083417 A253099 gives locations of zeros.
%K A083417 nonn
%O A083417 0,3
%A A083417 _Alex Fink_, Jun 08 2003