Not tested! Modified from jcbriar's https://stitch-maps.com/patterns/display/edging/
Shown with a cast-on count of 12 stitches.
1 2 3 4 5 Horizontal repeats
1 2 3 4 5 Vertical repeats