n=3^5;n

A=matrix(0,n,n)

for (i in 1:n){
A[i,1]=1; A[1,i]=-1;
}

for (i in 2:n){
for (j in 2:n){ A[i,j]=(A[i-1,j-1]+A[i-1,j])%%3
}
}

require(grDevices) # for colours
image(A, col  = gray(1:0),axes = FALSE, main = "Math can be beautiful ...")

n=2^7;n

A=matrix(0,n,n)

for (i in 1:n){
A[i,1]=1;
}

for (i in 2:n){
for (j in 2:i){ A[i,j]=(A[i-1,j-1]+A[i-1,j])%%2
}
}

require(grDevices) # for colours
image(A, col  = gray(1:0),axes = FALSE, main = "Math can be beautiful ...")

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: