rm(list=ls()) p <- .15 # fraction of cells that survive each reproduction #Define vector n(t): number of cells per generation generation_end=20; #predict up to this generation in the future n <- vector() n[1] <- 1000 # initial number of cells for (t in 2:generation_end) n[t] = 4*n[t-1]*p plot(1:generation_end, n, type = "b", xlab = "t", ylab = "n(t)", main = expression(4*n[t-1]*p))