Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Recamán sequence
#R version 3.3.2 library(plotrix) jump = 1 steps = 100 seq = 0 for (i in 1:steps) { current = seq[[length(seq)]] if(current - jump >= 0 && ! is.element(current-jump, seq)){ jump = jump * -1 } seq = c(seq, current + jump) jump = abs(jump) + 1 } plot(1, type="n", xlab="", ylab="", xlim=c(0, max(seq)), ylim=c(-10, 10), asp = 1, axes=FALSE) abline(h = 0) down = FALSE for (i in 1:steps) { center = (seq[[i]] + seq[[i+1]])/2 radius = abs(seq[[i]] - seq[[i+1]])/2 st = 0 + 180 * down end = 180 + 180 * down draw.arc(x = center, y = 0, radius = radius, deg1 = st, deg2 = end, col = "blue", n = .01) down = !down }
run
|
edit
|
history
|
help
0
Peso diário
Ch. 4 Boxplot and Histogram Examples - Font size increased
Dbinom
Gab1A
K
5 # SUMMARY PART A
Análise de Variâncias DIC e teste de Tukey 1
Sierpinski curve
1
First wall