Self-Running Sequence Screen

Build a self-running pixel matrix in Minecraft Java Edition that computes and illuminates the Collatz mathematical number sequence in real time.

Java EditionHolograms & Display EntitiesExpert24 commandsTested on a real 26.2 & 26.3 server
A giant dark display screen in Minecraft fills row by row with glowing sea lanterns and froglights. Download the GIF Video & GIF © www.9minecraft.net

Signs & BillboardsTechnologyBlackCyanPinkLearningDecorationText displaysBlock building (fill/setblock/clone)21+ commands

Watch a giant obsidian display screen come to life as a glowing scanner calculates and plots the famous Collatz 3n+1 sequence block by block. A floating readout above the frame tracks the live mathematical values while the matrix fills with colorful glowing pixels.

Each pixel represents a step in the trajectory: cyan sea lanterns mark numbers multiplying up (3n+1), while purple froglights mark numbers dividing down (n/2). When the screen fills up, it automatically wipes clean and continues the endless pattern.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_math dummy
  2. /scoreboard players set #n c9_math 27
  3. /scoreboard players set #x c9_math -8
  4. /scoreboard players set #y c9_math 2
  5. /scoreboard players set #two c9_math 2
  6. /scoreboard players set #three c9_math 3
  7. /fill ~-9 ~1 ~ ~9 ~16 ~ polished_blackstone_bricks
  8. /fill ~-8 ~2 ~ ~8 ~15 ~ black_concrete
  9. /summon marker ~-8 ~2 ~ {Tags:["c9_cursor","c9_ent"]}
  10. /summon text_display ~ ~17 ~-0.5 {Tags:["c9_ent","c9_hud"],billboard:"center",background:1073741824,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[2.2f,2.2f,2.2f],translation:[0f,0f,0f]},text:{"text":"Collatz Sequence Matrix","color":"aqua"}}

2. Loop - one repeating command block each (Always Active) 14 commands

  1. /scoreboard players add #tick c9_math 1
  2. /execute if score #tick c9_math matches 2.. run scoreboard players set #tick c9_math 0
  3. /execute if score #tick c9_math matches 1 run scoreboard players operation #mod c9_math = #n c9_math
  4. /execute if score #tick c9_math matches 1 run scoreboard players operation #mod c9_math %= #two c9_math
  5. /execute if score #tick c9_math matches 1 if score #mod c9_math matches 0 run scoreboard players operation #n c9_math /= #two c9_math
  6. /execute if score #tick c9_math matches 1 if score #mod c9_math matches 1 run scoreboard players operation #n c9_math *= #three c9_math
  7. /execute if score #tick c9_math matches 1 if score #mod c9_math matches 1 run scoreboard players add #n c9_math 1
  8. /execute if score #tick c9_math matches 1 if score #n c9_math matches ..1 run scoreboard players add #seed c9_math 7
  9. /execute if score #tick c9_math matches 1 if score #n c9_math matches ..1 run scoreboard players operation #n c9_math += #seed c9_math
  10. /execute if score #tick c9_math matches 1 at @e[tag=c9_cursor] if score #mod c9_math matches 1 run setblock ~ ~ ~ sea_lantern
  11. /execute if score #tick c9_math matches 1 at @e[tag=c9_cursor] if score #mod c9_math matches 0 run setblock ~ ~ ~ pearlescent_froglight
  12. /execute if score #tick c9_math matches 1 at @e[tag=c9_cursor] run particle firework ~ ~0.5 ~-0.6 0.1 0.1 0.1 0.05 5 force
  13. /execute if score #tick c9_math matches 1 as @e[tag=c9_cursor] at @s run tp @s ~1 ~ ~
  14. /execute if score #tick c9_math matches 1 at @e[tag=c9_cursor] if block ~ ~ ~ polished_blackstone_bricks run tp @e[tag=c9_cursor] ~-17 ~1 ~

How it works

Frames from the test run

Self-Running Sequence Screen - frame 1Self-Running Sequence Screen - frame 2Self-Running Sequence Screen - frame 3

Recorded on our own test server: 60 frames at about 9.9 fps. Our image check saw: A large black screen framed in dark stone bricks progressively fills row by row from the bottom up with alternating sea lanterns and pearlescent froglights at night, though the mentioned floating readout above the frame is barely visible or cut off.

Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.

Build it in your world

  1. Stand on a flat open area facing North or South with at least 20 blocks of clear space around and above you.
  2. Run all 10 setup commands in chat one by one to construct the blackstone frame, scoreboard values, and the screen cursor.
  3. Place a line of 14 repeating command blocks (or 1 repeating block leading into 13 chain command blocks) near the stage center.
  4. Paste each loop command into the command blocks in the exact order listed and set them all to Always Active.
  5. Watch the pixel matrix automatically compute and illuminate the sequence from the bottom-left corner upward.

Use it with real players

To let players input their own starting seed number, place an impulse command block with a button that runs /scoreboard players set #n c9_math 73 (or any positive integer) and /fill ~-8 ~2 ~ ~8 ~15 ~ black_concrete to reset the canvas.

Remove it again 3 commands

  1. /kill @e[tag=c9_ent]
  2. /fill ~-9 ~1 ~ ~9 ~17 ~ air
  3. /scoreboard objectives remove c9_math

FAQ

What do the two different glowing block colors mean?

Cyan sea lanterns indicate an odd number that multiplied up (3n+1), while purple pearlescent froglights indicate an even number that divided in half (n/2).

How can I make the screen draw faster?

In the second loop command, change matches 2.. to matches 1.. so the screen calculates and plots a new pixel every single game tick (20 pixels per second).

Commands used

/execute/fill/particle/scoreboard/setblock/summon/tp

Similar creations

Join 9Minecraft News & Guides