4. Encontre f(1), f(2), f(3) e f(4) sendo f a função recursiva dada por:
a) f(0) = 1 e, para n = 1, 2, ..., f(n + 1) = f(n) + 4
b) f(0) = 0 e, para n = 1, 2, ..., f(n + 1) = (n + 1)f(n) + 2
c) f(0) = 1 e, para n = 1, 2, ..., f(n + 1) = 2()
d) f(0) = 1, f(1) = −2 e, para n = 2, ..., f(n + 1) =
Soluções para a tarefa
Respondido por
1
A) f(0+1)=f(0)+4
f(1)=5
f(1+1)=f(1)+4
f(2)=9
f(2+1)=f(2)+4
f(3)=13
f(3+1)=f(3)+4
f(4)=17
B) f(0+1)=(0+1).f(0)+2
f(1)=2
f(1+1)=(1+1).f(1)+2
f(2)=6
f(2+1)=(2+1).f(2)+2
f(3)=20
f(3+1)=(3+1).f(3)+2
f(4)=82
C) f(0+1)=2.f(0)
f(1)=2
f(1+1)=2.f(1)
f(2)=4
f(2+1)=2.f(2)
f(3)=8
f(3+1)=2.f(3)
f(4)=16
f(1)=5
f(1+1)=f(1)+4
f(2)=9
f(2+1)=f(2)+4
f(3)=13
f(3+1)=f(3)+4
f(4)=17
B) f(0+1)=(0+1).f(0)+2
f(1)=2
f(1+1)=(1+1).f(1)+2
f(2)=6
f(2+1)=(2+1).f(2)+2
f(3)=20
f(3+1)=(3+1).f(3)+2
f(4)=82
C) f(0+1)=2.f(0)
f(1)=2
f(1+1)=2.f(1)
f(2)=4
f(2+1)=2.f(2)
f(3)=8
f(3+1)=2.f(3)
f(4)=16
Perguntas interessantes