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