<s>
In	O
computability	O
theory	O
,	O
course-of-values	B-Algorithm
recursion	I-Algorithm
is	O
a	O
technique	O
for	O
defining	O
number-theoretic	B-Algorithm
functions	I-Algorithm
by	O
recursion	O
.	O
</s>
<s>
In	O
a	O
definition	O
of	O
a	O
function	O
f	O
by	O
course-of-values	B-Algorithm
recursion	I-Algorithm
,	O
the	O
value	O
of	O
f(n )	O
is	O
computed	O
from	O
the	O
sequence	O
.	O
</s>
<s>
The	O
fact	O
that	O
such	O
definitions	O
can	O
be	O
converted	O
into	O
definitions	O
using	O
a	O
simpler	O
form	O
of	O
recursion	O
is	O
often	O
used	O
to	O
prove	O
that	O
functions	O
defined	O
by	O
course-of-values	B-Algorithm
recursion	I-Algorithm
are	O
primitive	B-Architecture
recursive	I-Architecture
.	O
</s>
<s>
Contrary	O
to	O
course-of-values	B-Algorithm
recursion	I-Algorithm
,	O
in	O
primitive	B-Architecture
recursion	I-Architecture
the	O
computation	O
of	O
a	O
value	O
of	O
a	O
function	O
requires	O
only	O
the	O
previous	O
value	O
;	O
for	O
example	O
,	O
for	O
a	O
1-ary	O
primitive	B-Architecture
recursive	I-Architecture
function	I-Architecture
g	O
the	O
value	O
of	O
g( n+1	O
)	O
is	O
computed	O
only	O
from	O
g(n )	O
and	O
n	O
.	O
</s>
<s>
This	O
recursion	O
is	O
a	O
primitive	B-Architecture
recursion	I-Architecture
because	O
it	O
computes	O
the	O
next	O
value	O
(	O
n+1	O
)	O
!	O
</s>
<s>
To	O
compute	O
g( n+1	O
)	O
using	O
these	O
equations	O
,	O
all	O
the	O
previous	O
values	O
of	O
g	O
must	O
be	O
computed	O
;	O
no	O
fixed	O
finite	O
number	O
of	O
previous	O
values	O
is	O
sufficient	O
in	O
general	O
for	O
the	O
computation	O
of	O
g	O
.	O
The	O
functions	O
Fib	O
and	O
g	O
are	O
examples	O
of	O
functions	O
defined	O
by	O
course-of-values	B-Algorithm
recursion	I-Algorithm
.	O
</s>
<s>
In	O
general	O
,	O
a	O
function	O
f	O
is	O
defined	O
by	O
course-of-values	B-Algorithm
recursion	I-Algorithm
if	O
there	O
is	O
a	O
fixed	O
primitive	B-Architecture
recursive	I-Architecture
function	I-Architecture
h	O
such	O
that	O
for	O
all	O
n	O
,	O
</s>
<s>
where	O
s[i]	O
denotes	O
extraction	O
of	O
the	O
element	O
i	O
from	O
an	O
encoded	O
sequence	O
s	O
;	O
this	O
is	O
easily	O
seen	O
to	O
be	O
a	O
primitive	B-Architecture
recursive	I-Architecture
function	I-Architecture
(	O
assuming	O
an	O
appropriate	O
Gödel	O
numbering	O
is	O
used	O
)	O
.	O
</s>
<s>
In	O
order	O
to	O
convert	O
a	O
definition	O
by	O
course-of-values	B-Algorithm
recursion	I-Algorithm
into	O
a	O
primitive	B-Architecture
recursion	I-Architecture
,	O
an	O
auxiliary	O
(	O
helper	O
)	O
function	O
is	O
used	O
.	O
</s>
<s>
The	O
function	O
can	O
be	O
defined	O
by	O
primitive	B-Architecture
recursion	I-Architecture
because	O
is	O
obtained	O
by	O
appending	O
to	O
the	O
new	O
element	O
:	O
</s>
<s>
This	O
is	O
a	O
primitive	B-Architecture
recursive	I-Architecture
function	I-Architecture
,	O
under	O
the	O
assumption	O
of	O
an	O
appropriate	O
Gödel	O
numbering	O
;	O
h	O
is	O
assumed	O
primitive	B-Architecture
recursive	I-Architecture
to	O
begin	O
with	O
.	O
</s>
<s>
Thus	O
the	O
recursion	O
relation	O
can	O
be	O
written	O
as	O
primitive	B-Architecture
recursion	I-Architecture
:	O
</s>
<s>
where	O
g	O
is	O
itself	O
primitive	B-Architecture
recursive	I-Architecture
,	O
being	O
the	O
composition	O
of	O
two	O
such	O
functions	O
:	O
</s>
<s>
Given	O
,	O
the	O
original	O
function	O
can	O
be	O
defined	O
by	O
,	O
which	O
shows	O
that	O
it	O
is	O
also	O
a	O
primitive	B-Architecture
recursive	I-Architecture
function	I-Architecture
.	O
</s>
<s>
In	O
the	O
context	O
of	O
primitive	B-Architecture
recursive	I-Architecture
functions	I-Architecture
,	O
it	O
is	O
convenient	O
to	O
have	O
a	O
means	O
to	O
represent	O
finite	O
sequences	O
of	O
natural	O
numbers	O
as	O
single	O
natural	O
numbers	O
.	O
</s>
<s>
It	O
can	O
be	O
shown	O
that	O
,	O
with	O
this	O
representation	O
,	O
the	O
ordinary	O
operations	O
on	O
sequences	O
are	O
all	O
primitive	B-Architecture
recursive	I-Architecture
.	O
</s>
<s>
is	O
also	O
primitive	B-Architecture
recursive	I-Architecture
.	O
</s>
<s>
Not	O
every	O
recursive	O
definition	O
can	O
be	O
transformed	O
into	O
a	O
primitive	B-Architecture
recursive	I-Architecture
definition	O
.	O
</s>
<s>
One	O
known	O
example	O
is	O
Ackermann	O
's	O
function	O
,	O
which	O
is	O
of	O
the	O
form	O
A(m,n )	O
and	O
is	O
provably	O
not	O
primitive	B-Architecture
recursive	I-Architecture
.	O
</s>
<s>
Thus	O
one	O
cannot	O
encode	O
the	O
previously	O
computed	O
sequence	O
of	O
values	O
in	O
a	O
primitive	B-Architecture
recursive	I-Architecture
way	O
in	O
the	O
manner	O
suggested	O
above	O
(	O
or	O
at	O
all	O
,	O
as	O
it	O
turns	O
out	O
this	O
function	O
is	O
not	O
primitive	B-Architecture
recursive	I-Architecture
)	O
.	O
</s>
