Skip to main content
added 5 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830

The pattern becomes a lot more obvious once we transpose rows with columns (padded to the right with spaces). 

For input 3, for example, this gives:

"O5àäªÞáKZò,_÷%SJ«Ò" 248b e# Convert the string (array of code points in base 248) to an integer. 5b e# Convert the integer to the array of its digits in base 5. e# This pushes the following array: e# [ 1 2 1 1 0 2 1 1 0 1 1 4 4 1 1 4 4 1 1 1 4 4 1 1 e# 4 4 1 1 0 1 1 2 0 1 1 2 1 0 1 0 2 0 1 0 2 3 1 0 e# 2 1 2 0 2 3 3 1 2 0 2 1 2 0 3 1 2 0 1 0 2 0 1 0 ] "/ \_"   f= e# Retrieve the chars that correspond to the indexes in the array. e# This pushes the following string: e# " \ /\ / || || || || / \/ \ / /\/ /\_ /\ \/\__ \/\ \/_ \/ /\/ /" 9/4/~ e# Divide into groups of 4 strings of length 9. e# This pushes the following arrays: e# [ " \ /\ /" " || || " " || || " " / \/ \" ] e# [ " / /\/ /\" "_ /\ \/\_" "_ \/\ \/_" " \/ /\/ /" ] ri e# Read an integer from STDIN. * e# Repeat the last array that many times. 1>W< e# Remove the first and last string from the array. + e# Concatenate both arrays. 2m< e# Rotate the concatenated arrays two elements to the left. z e# Zip the array of strings (transpose rows with columns). N* e# Join the strings of the array, separating by linefeeds. 

The pattern becomes a lot more obvious once we transpose rows with columns (padded to the right with spaces). For input 3, for example, this gives:

"O5àäªÞáKZò,_÷%SJ«Ò" 248b e# Convert the string (array of code points in base 248) to an integer. 5b e# Convert the integer to the array of its digits in base 5. e# This pushes the following array: e# [ 1 2 1 1 0 2 1 1 0 1 1 4 4 1 1 4 4 1 1 1 4 4 1 1 e# 4 4 1 1 0 1 1 2 0 1 1 2 1 0 1 0 2 0 1 0 2 3 1 0 e# 2 1 2 0 2 3 3 1 2 0 2 1 2 0 3 1 2 0 1 0 2 0 1 0 ] "/ \_" f= e# Retrieve the chars that correspond to the indexes in the array. e# This pushes the following string: e# " \ /\ / || || || || / \/ \ / /\/ /\_ /\ \/\__ \/\ \/_ \/ /\/ /" 9/4/~ e# Divide into groups of 4 strings of length 9. e# This pushes the following arrays: e# [ " \ /\ /" " || || " " || || " " / \/ \" ] e# [ " / /\/ /\" "_ /\ \/\_" "_ \/\ \/_" " \/ /\/ /" ] ri e# Read an integer from STDIN. * e# Repeat the last array that many times. 1>W< e# Remove the first and last string from the array. + e# Concatenate both arrays. 2m< e# Rotate the concatenated arrays two elements to the left. z e# Zip the array of strings (transpose rows with columns). N* e# Join the strings of the array, separating by linefeeds. 

The pattern becomes a lot more obvious once we transpose rows with columns (padded to the right with spaces). 

For input 3, for example, this gives:

"O5àäªÞáKZò,_÷%SJ«Ò" 248b e# Convert the string (array of code points in base 248) to an integer. 5b e# Convert the integer to the array of its digits in base 5. e# This pushes the following array: e# [ 1 2 1 1 0 2 1 1 0 1 1 4 4 1 1 4 4 1 1 1 4 4 1 1 e# 4 4 1 1 0 1 1 2 0 1 1 2 1 0 1 0 2 0 1 0 2 3 1 0 e# 2 1 2 0 2 3 3 1 2 0 2 1 2 0 3 1 2 0 1 0 2 0 1 0 ] "/ \_"   f= e# Retrieve the chars that correspond to the indexes in the array. e# This pushes the following string: e# " \ /\ / || || || || / \/ \ / /\/ /\_ /\ \/\__ \/\ \/_ \/ /\/ /" 9/4/~ e# Divide into groups of 4 strings of length 9. e# This pushes the following arrays: e# [ " \ /\ /" " || || " " || || " " / \/ \" ] e# [ " / /\/ /\" "_ /\ \/\_" "_ \/\ \/_" " \/ /\/ /" ] ri e# Read an integer from STDIN. * e# Repeat the last array that many times. 1>W< e# Remove the first and last string from the array. + e# Concatenate both arrays. 2m< e# Rotate the concatenated arrays two elements to the left. z e# Zip the array of strings (transpose rows with columns). N* e# Join the strings of the array, separating by linefeeds. 
added 101 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
"O5àäªÞáKZò,_÷%SJ«Ò" 248b5b 248b e# Convert the string from(array of code points in base 248) to an integer. 5b  e# Convert the integer to the array of its digits in base 5.  e# This pushes the following array:   e# [ 1 2 1 1 0 2 1 1 0 1 1 4 4 1 1 4 4 1 1 1 4 4 1 1  e# 4 4 1 1 0 1 1 2 0 1 1 2  e# 1 0 1 0 2 0 1 0 2 3 1 0  e# 2 1 2 0 2 3 3 1 2 0 2 1 2 0 3 1 2 0 1 0 2 0 1 0 ] "/ \_"f=\_" f=  e# Retrieve the corresponding chars that correspond to the indexes in the array. e# This pushes the following string:   e# " \ /\ / || || || || / \/ \ / /\/ /\_ /\ \/\__ \/\ \/_ \/ /\/ /" 9/4/~  e# Divide into groups of 4 strings of length 9.  e# This pushes the following arrays:   e# [ " \ /\ /" " || || " " || || " " / \/ \" ]   e# [ " / /\/ /\" "_ /\ \/\_" "_ \/\ \/_" " \/ /\/ /" ] ri  e# Read an integer from STDIN. *  e# Repeat the last array that many times. 1>W<  e# Remove the first and last string from the array. +  e# Concatenate both arrays. 2m<  e# Rotate the concatenated arrays two elements to the left. z  e# Zip the array of strings (transpose rows with columns). N*  e# Join the strings of the array, separating by linefeeds. 
"O5àäªÞáKZò,_÷%SJ«Ò" 248b5b  e# Convert the string from base 248 to base 5. This pushes the following array:   e# [ 1 2 1 1 0 2 1 1 0 1 1 4 4 1 1 4 4 1 1 1 4 4 1 1 4 4 1 1 0 1 1 2 0 1 1 2  e# 1 0 1 0 2 0 1 0 2 3 1 0 2 1 2 0 2 3 3 1 2 0 2 1 2 0 3 1 2 0 1 0 2 0 1 0 ] "/ \_"f= e# Retrieve the corresponding chars. This pushes the following string:   e# " \ /\ / || || || || / \/ \ / /\/ /\_ /\ \/\__ \/\ \/_ \/ /\/ /" 9/4/~  e# Divide into groups of 4 strings of length 9. This pushes the following arrays:   e# [ " \ /\ /" " || || " " || || " " / \/ \" ]   e# [ " / /\/ /\" "_ /\ \/\_" "_ \/\ \/_" " \/ /\/ /" ] ri  e# Read an integer from STDIN. *  e# Repeat the last array that many times. 1>W<  e# Remove the first and last string from the array. +  e# Concatenate both arrays. 2m<  e# Rotate the concatenated arrays two elements to the left. z  e# Zip the array of strings (transpose rows with columns). N*  e# Join the strings of the array, separating by linefeeds. 
"O5àäªÞáKZò,_÷%SJ«Ò" 248b e# Convert the string (array of code points in base 248) to an integer. 5b  e# Convert the integer to the array of its digits in base 5.  e# This pushes the following array: e# [ 1 2 1 1 0 2 1 1 0 1 1 4 4 1 1 4 4 1 1 1 4 4 1 1  e# 4 4 1 1 0 1 1 2 0 1 1 2 1 0 1 0 2 0 1 0 2 3 1 0  e# 2 1 2 0 2 3 3 1 2 0 2 1 2 0 3 1 2 0 1 0 2 0 1 0 ] "/ \_" f=  e# Retrieve the chars that correspond to the indexes in the array. e# This pushes the following string: e# " \ /\ / || || || || / \/ \ / /\/ /\_ /\ \/\__ \/\ \/_ \/ /\/ /" 9/4/~ e# Divide into groups of 4 strings of length 9.  e# This pushes the following arrays: e# [ " \ /\ /" " || || " " || || " " / \/ \" ] e# [ " / /\/ /\" "_ /\ \/\_" "_ \/\ \/_" " \/ /\/ /" ] ri e# Read an integer from STDIN. * e# Repeat the last array that many times. 1>W< e# Remove the first and last string from the array. + e# Concatenate both arrays. 2m< e# Rotate the concatenated arrays two elements to the left. z e# Zip the array of strings (transpose rows with columns). N* e# Join the strings of the array, separating by linefeeds. 
deleted 12 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830

CJam, 57 bytes

")û/7_©îrе¸à1¨Nâ¾"256b5b"/ \_|"f=9/4/~ri*1>W<+2m<zN* 

[Try it online.][2]

Rest to be updated.


CJam, 103 92 83 69 6666 57 bytes

S" || "_S""O5àäªÞáKZò,_÷%SJ«Ò"248b5b"/  \\"_]"Ö5yË(γÀH"222b4b"\_|"f=9/ \_"f=ri*9>-9<W$Wf%3m<]s94/zN*~ri*1>W<+2m<zN* 

[TryTry it online in the W<+2mCJam interpreter.][1]

The pattern becomes a lot more obvious once we transpose rows with columns (padded to the right with spaces). For input 3, for example, this gives:

The first two and last two rows are special, but the others containrepeat the same pattern repeated over and over again.

S""O5àäªÞáKZò,_÷%SJ«Ò" 248b5b || "_S"/ e# \\"_]Convert e#the Pushstring from base 248 to base 5. This pushes the following array:  A := [" " " || " " ||e# "[ "1 "2 "/1 1 \\"0 "/2 1 \\"]. "Ö5yË(γÀH"222b4b1 0 e#1 Convert1 the4 string4 from1 base1 2224 to4 base1 1 1 4. 4 1 1 4 4 1 1 0 1 1 2 0 1 1 2 "/ \_"f= e# 1 0 1 0 2 0 1 0 2 3 1 0 2 1 2 0 2 3 3 1 2 0 2 1 2 0 3 1 2 0 1 0 2 0 1 0 ] "/ \_"f= e# Retrieve the corresponding chars. This pushes the patten.following string: ri   e# " \ /\ / e#|| Read an|| integer from STDIN. *|| || / \/ \ / /\/ /\_ /\ \/\__ \/\ \/_ \/ /\/ /" 9/4/~ e# RepeatDivide theinto patterngroups thatof many4 timesstrings of length 9. 9>-9< This pushes the following arrays:  e# Remove[ the" first\ and last/\ 9 chars/" (first and last" row). W$Wf% || || " " || || " e# Push" a/ copy of\/ A and\" reverse]  each string. 3m< e# [ " / /\/ /\" "_ e#/\ Rotate\/\_" the modified A"_ three\/\ string\/_" to the left." \/ /\/ /" ] ]s ri  e# Read an integer from STDIN. * e# FlattenRepeat the stacklast array that many times. 9/1>W< e# Remove the first and last string from the array. + e# Chop the result into stringse# ofConcatenate lengthboth 9arrays. z2m< e# Rotate the concatenated arrays two elements to the left. z  e# Zip: the array of strings (transpose rows with columns). N*  e# Join the e#strings Joinof the stringarray, separating by linefeeds. 

[1]: http://cjam.aditsu.net/#code=S%22%20%7C%7C%20%22_S%22%2F%20%20%5C%5C%22_%5D%22%C3%965y%C3%8B(%C3%8E%C2%B3%C3%80H%22222b4b%22%2F%20%5C_%22f%3Dri9%3E-9%3CW%24Wf%253m%3C%5Ds9%2FzN&input=6 [2]: http://cjam.aditsu.net/#code=%22)%C3%BB%2F%0F7_%C2%A9%C3%AEr%C3%90%C2%B5%C2%B8%15%C3%A01%1F%C2%9B%C2%A8N%C3%A2%C2%BE%22256b5b%22%2F%20%5C_%7C%22f%3D9%2F4%2F~ri1%3EW%3C%2B2m%3CzN&input=6

CJam, 57 bytes

")û/7_©îrе¸à1¨Nâ¾"256b5b"/ \_|"f=9/4/~ri*1>W<+2m<zN* 

[Try it online.][2]

Rest to be updated.


CJam, 103 92 83 69 66 bytes

S" || "_S"/  \\"_]"Ö5yË(γÀH"222b4b"/ \_"f=ri*9>-9<W$Wf%3m<]s9/zN* 

[Try it online.][1]

The pattern becomes a lot more obvious once we transpose rows with columns (padded to the right with spaces). For input 3, this gives:

The first two and last two rows are special, but the others contain the same pattern repeated over and over again.

S" || "_S"/ \\"_] e# Push the array A := [" " " || " " || " " " "/ \\" "/ \\"]. "Ö5yË(γÀH"222b4b e# Convert the string from base 222 to base 4. "/ \_"f= e# Retrieve the corresponding chars. This pushes the patten. ri e# Read an integer from STDIN. * e# Repeat the pattern that many times. 9>-9< e# Remove the first and last 9 chars (first and last row). W$Wf% e# Push a copy of A and reverse each string. 3m< e# Rotate the modified A three string to the left. ]s e# Flatten the stack. 9/ e# Chop the result into strings of length 9. z e# Zip: transpose rows with columns. N*  e# Join the string, separating by linefeeds. 

[1]: http://cjam.aditsu.net/#code=S%22%20%7C%7C%20%22_S%22%2F%20%20%5C%5C%22_%5D%22%C3%965y%C3%8B(%C3%8E%C2%B3%C3%80H%22222b4b%22%2F%20%5C_%22f%3Dri9%3E-9%3CW%24Wf%253m%3C%5Ds9%2FzN&input=6 [2]: http://cjam.aditsu.net/#code=%22)%C3%BB%2F%0F7_%C2%A9%C3%AEr%C3%90%C2%B5%C2%B8%15%C3%A01%1F%C2%9B%C2%A8N%C3%A2%C2%BE%22256b5b%22%2F%20%5C_%7C%22f%3D9%2F4%2F~ri1%3EW%3C%2B2m%3CzN&input=6

CJam, 103 92 83 69 66 57 bytes

"O5àäªÞáKZò,_÷%SJ«Ò"248b5b"/ \_|"f=9/4/~ri*1>W<+2m<zN* 

Try it online in the W<+2mCJam interpreter.

The pattern becomes a lot more obvious once we transpose rows with columns (padded to the right with spaces). For input 3, for example, this gives:

The first two and last two rows are special, but the others repeat the same pattern over and over again.

"O5àäªÞáKZò,_÷%SJ«Ò" 248b5b e# Convert the string from base 248 to base 5. This pushes the following array:  e# [ 1 2 1 1 0 2 1 1 0 1 1 4 4 1 1 4 4 1 1 1 4 4 1 1 4 4 1 1 0 1 1 2 0 1 1 2  e# 1 0 1 0 2 0 1 0 2 3 1 0 2 1 2 0 2 3 3 1 2 0 2 1 2 0 3 1 2 0 1 0 2 0 1 0 ] "/ \_"f= e# Retrieve the corresponding chars. This pushes the following string:    e# " \ /\ / || || || || / \/ \ / /\/ /\_ /\ \/\__ \/\ \/_ \/ /\/ /" 9/4/~ e# Divide into groups of 4 strings of length 9. This pushes the following arrays:  e# [ " \ /\ /" " || || " " || || " " / \/ \" ]  e# [ " / /\/ /\" "_ /\ \/\_" "_ \/\ \/_" " \/ /\/ /" ]  ri  e# Read an integer from STDIN. * e# Repeat the last array that many times. 1>W< e# Remove the first and last string from the array. + e# Concatenate both arrays. 2m< e# Rotate the concatenated arrays two elements to the left. z  e# Zip the array of strings (transpose rows with columns). N* e# Join the strings of the array, separating by linefeeds. 
added 328 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
added 6 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
added 6 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
deleted 69 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
deleted 77 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
deleted 77 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading