# [R], 53 bytes <!-- language-all: lang-r --> function(n)rbind(cbind(outer(1:n,1:n,`+`)-1,2*n),2*n) [Try it online!][TIO-j6wp3zaa] [R]: https://www.r-project.org/ [TIO-j6wp3zaa]: https://tio.run/##K/qfZvs/rTQvuSQzP08jT7MoKTMvRSMZTOaXlqQWaRha5emAcIJ2gqauoY6RVp4mmPifpmGk@R8A "R – Try It Online" # [R], 78 bytes More naive implementation. function(n){m=matrix(2*n,n+1,n+1) for(i in seq(n))m[1:n,i]=(0:(2*n))[1:n+i] m} [Try it online!][TIO-j6wola10] [TIO-j6wola10]: https://tio.run/##K/qfZvs/rTQvuSQzP08jT7M61zY3saQos0LDSCtPJ0/bEIQ1udLyizQyFTLzFIpTC4GqNHOjDa3ydDJjbTUMrEAqNTVBAtqZsVy5tf/TNEA6NEw1/wMA "R – Try It Online"