[Question]
  [
An [Octothorpe, (also called number sign, hash or hashtag, or pound sign)](https://en.wikipedia.org/wiki/Number_sign) is the following ASCII character:
```
#
```
Isn't that a fun shape? Lets make bigger versions of it! So here is your challenge:
> 
> Given a positive integer **N**, output an ASCII hashtag of size **N**.
> 
> 
> 
For example, an ASCII hashtag of size **1** looks like this:
```
 # # 
#####
 # # 
#####
 # # 
```
Trailing whitespace on each line is allowed, but not required.
The input will *always* be a valid positive integer, so you don't have to handle non-numbers, negative, or 0. Your output can be in any reasonable format, so outputting to STDOUT, returning a list of strings, or string with newlines, a 2D matrix of characters, writing to a file, etc. are all fine.
## Test cases
```
2:
  ##  ##
  ##  ##
##########
##########
  ##  ##
  ##  ##
##########
##########
  ##  ##
  ##  ##
3:
   ###   ###   
   ###   ###   
   ###   ###   
###############
###############
###############
   ###   ###   
   ###   ###   
   ###   ###   
###############
###############
###############
   ###   ###   
   ###   ###   
   ###   ###   
4:
    ####    ####    
    ####    ####    
    ####    ####    
    ####    ####    
####################
####################
####################
####################
    ####    ####    
    ####    ####    
    ####    ####    
    ####    ####    
####################
####################
####################
####################
    ####    ####    
    ####    ####    
    ####    ####    
    ####    ####    
5:
     #####     #####     
     #####     #####     
     #####     #####     
     #####     #####     
     #####     #####     
#########################
#########################
#########################
#########################
#########################
     #####     #####     
     #####     #####     
     #####     #####     
     #####     #####     
     #####     #####     
#########################
#########################
#########################
#########################
#########################
     #####     #####     
     #####     #####     
     #####     #####     
     #####     #####     
     #####     #####     
```
Since this is a code-golf, try to write the shortest possible solution you can, and above all else, have fun!
  
[Answer]
# [MATL](https://matl.suever.net/), ~~20~~ ~~16~~ ~~12~~ 11 bytes
3 bytes thanks to DJMcMayhem.
1 byte thanks to Luis Mendo.
```
21BwY"&*~Zc
```
[Try it online!](https://matl.suever.net/?code=21BwY%22%26%2a~Zc&inputs=3&version=20.4.0)
## Explanation
```
    % stack starts with input e.g. 2
21  % push 21 to stack             2 21
B   % convert to binary            2 [1 0 1 0 1]
w   % swap                         [1 0 1 0 1] 2
Y"  % repeat                       [1 1 0 0 1 1 0 0 1 1]
&*  % one-input multiplication    [[1 1 0 0 1 1 0 0 1 1]
                                   [1 1 0 0 1 1 0 0 1 1]
                                   [0 0 0 0 0 0 0 0 0 0]
                                   [0 0 0 0 0 0 0 0 0 0]
                                   [1 1 0 0 1 1 0 0 1 1]
                                   [1 1 0 0 1 1 0 0 1 1]
                                   [0 0 0 0 0 0 0 0 0 0]
                                   [0 0 0 0 0 0 0 0 0 0]
                                   [1 1 0 0 1 1 0 0 1 1]
                                   [1 1 0 0 1 1 0 0 1 1]]
~   % complement                  [[0 0 1 1 0 0 1 1 0 0]
                                   [0 0 1 1 0 0 1 1 0 0]
                                   [1 1 1 1 1 1 1 1 1 1]
                                   [1 1 1 1 1 1 1 1 1 1]
                                   [0 0 1 1 0 0 1 1 0 0]
                                   [0 0 1 1 0 0 1 1 0 0]
                                   [1 1 1 1 1 1 1 1 1 1]
                                   [1 1 1 1 1 1 1 1 1 1]
                                   [0 0 1 1 0 0 1 1 0 0]
                                   [0 0 1 1 0 0 1 1 0 0]]
Zc  % convert 0 to spaces            ##  ##  
      1 to octothorpes               ##  ##  
      and join by newline          ##########
                                   ##########
                                     ##  ##  
                                     ##  ##  
                                   ##########
                                   ##########
                                     ##  ##  
                                     ##  ##  
```
[Answer]
# [Brain-Flak](https://github.com/DJMcMayhem/Brain-Flak), 420 bytes
```
(()()()){({}<(({})){({}<<>(<>({})<>){({}<((((()()()()){}){}()){}())>[(
)])}{}(<>({})<>){({}<((((()()()()){}){}){})>[()])}{}(<>({})<>){({}<(((
(()()()()){}){}()){}())>[()])}{}(<>({})<>){({}<((((()()()()){}){}){})>
[()])}{}((()()()()()){})<>>[()])}{}((({}))<(({})(({}){}){})>){({}<<>(<
>({})<>){({}<((((()()()()){}){}()){}())>[()])}{}((()()()()()){})<>>[()
])}{}{}>[()])}{}({}<>)(({})((({({})({}[()])}{})){}){}{}){({}<{}>[()])}
```
[Try it online!](https://tio.run/##pU/LCoBACPwdPXTovgh9R3TYDkEUHbqK32662eMSBbEyusyMMv2ax6Ua5jypAqA/ZGBJYBBjIrCyb6KDg9C6WqxKN6AWsEOx@c3h9V39d/9J7nSiO@VB97wFwvsj@/M1lktlywjjLHDpLAcbux1cePpUa62aDQ "Brain-Flak – Try It Online")
No, the score of 420 was not intentional. I promise. Readable version:
```
# 3 Times...
(()()())
{
({}<
    #Duplicate the input
    (({}))
    #Input times...
    {
        ({}<
        #Switch to the main stack
        <>
        #Grab the duplicate of the input
        (<>({})<>)
        #That many times...
        {({}<
            # Push a hash
            ((((()()()()){}){}()){}())
        >[()])}{}
        #Grab the duplicate of the input
        (<>({})<>)
        #That many times...
        {({}<
            #Push a space
            ((((()()()()){}){}){})
        >[()])}{}
        #Grab the duplicate of the input
        (<>({})<>)
        #That many times...
        {({}<
            # Push a hash
            ((((()()()()){}){}()){}())
        >[()])}{}
        #Grab the duplicate of the input
        (<>({})<>)
        #That many times...
        {({}<
            #Push a space
            ((((()()()()){}){}){})
        >[()])}{}
        #Push a newline
        ((()()()()()){})
        #Toggle back to the alternate stack
        <>
        #Decrement the (second) loop counter
        >[()])
    #Endwhile
    }
    #Pop the now zeroed loop counter
    {}
    #Turn [a] into [a, a*5, a]
    ((({}))<(({})(({}){}){})>)
    #A times....
    {
        ({}<
        #Toggle back over
        <>
        #Grab a*5
        (<>({})<>)
        #That many times...
        {({}<
            #Push a space
            ((((()()()()){}){}()){}())
        >[()])}{}
        #Push a newline
        ((()()()()()){})
        #Toggle back
        <>
        #Decrement the (second) loop counter
        >[()])
    }
    #Pop the loop counter and the a*5
    {}{}
#Decrement the outer loop counter
>[()])
}
#Pop the zeroed loop counter
{}
#Pop a over
({}<>)
#Pushes (a**2) * 5 + a
(({})((({({})({}[()])}{})){}){}{})
#That many times...
{({}<
    #Pop a character off the output stack
    {}
>[()])}
```
[Answer]
# [6502 machine code](https://en.wikibooks.org/wiki/6502_Assembly) (C64), 59 56 bytes
```
00 C0 20 9B B7 A9 06 85 FC 86 FE A6 FE 86 FD A9 03 4D 1F C0 8D 1F C0 C6 FC D0
01 60 A9 23 A0 05 49 00 20 D2 FF CA D0 FA A6 FE 88 D0 F3 A9 0D 20 D2 FF C6 FD
D0 E6 F0 D3
```
### [Online demo](https://vice.janicek.co/c64/#%7B"controlPort2":"joystick","primaryControlPort":2,"keys":%7B"SPACE":"","RETURN":"","F1":"","F3":"","F5":"","F7":""%7D,"files":%7B"hash.prg":"data:;base64,AMAgm7epBoX8hv6m/ob9qQNNH8CNH8DG/NABYKkjoAVJACDS/8rQ+qb+iNDzqQ0g0v/G/dDm8NM="%7D,"vice":%7B"-autostart":"hash.prg"%7D%7D)
Usage: `SYS49152,N` where N is a number between 1 and 255.
(values greater than 4 will already be too large for the C64 screen, starting from 8, the output is even too wide)
**Explanation**:
```
         00 C0       .WORD $C000    ; load address
.C:c000  20 9B B7    JSR $B79B      ; read N into X
.C:c003  A9 06       LDA #$06       ; number of "logical" lines plus 1 for hash
.C:c005  85 FC       STA $FC        ; store in counter variable for lines
.C:c007  86 FE       STX $FE        ; store N in counter variable for char repetitions
.C:c009  A6 FE       LDX $FE        ; load repetition counter
.C:c00b  86 FD       STX $FD        ; store in counter variable for line repetitions
.C:c00d  A9 03       LDA #$03       ; value to toggle the character toggle
.C:c00f  4D 1F C0    EOR $C01F      ; xor character bit toggle
.C:c012  8D 1F C0    STA $C01F      ; store character bit toggle
.C:c015  C6 FC       DEC $FC        ; decrement "logical" lines
.C:c017  D0 01       BNE $C01A      ; not 0 -> continue
.C:c019  60          RTS            ; program done
.C:c01a  A9 23       LDA #$23       ; load hash character
.C:c01c  A0 05       LDY #$05       ; load "logical" columns for hash
.C:c01e  49 00       EOR #$00       ; in each odd "logical" line, toggle character
.C:c020  20 D2 FF    JSR $FFD2      ; output one character
.C:c023  CA          DEX            ; decrement character repetition
.C:c024  D0 FA       BNE $C020      ; not 0 -> back to output
.C:c026  A6 FE       LDX $FE        ; reload character repetition
.C:c028  88          DEY            ; decrement "logical" columns
.C:c029  D0 F3       BNE $C01E      ; not 0 -> back to character toggle
.C:c02b  A9 0D       LDA #$0D       ; line done, load newline character
.C:c02d  20 D2 FF    JSR $FFD2      ; and output
.C:c030  C6 FD       DEC $FD        ; decrement line repetitions
.C:c032  D0 E6       BNE $C01A      ; not 0 -> back to character init
.C:c034  F0 D3       BEQ $C009      ; else back to main loop (toggle char toggling)
```
[![Screenshot](https://i.stack.imgur.com/XzZd6.png)](https://i.stack.imgur.com/XzZd6.png)
[Answer]
# [Haskell](https://www.haskell.org/), 43 bytes
```
l%n=l!!1:l++l<*[1..n]
f n=["##"%n,"# "%n]%n
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/P0c1zzZHUdHQKkdbO8dGK9pQTy8vlitNIc82WklZWUk1T0dJWQFIxarm/c9NzMxTsFXITSzwVSgoLQkuKfLJU1BRSFMw@Q8A "Haskell – Try It Online")
Outputs a list of strings.
[Answer]
# [Python 2](https://docs.python.org/2/), 55 bytes
```
def f(n):p=[(" "*n+"#"*n)*2]*n;print(p+["#"*n*5]*n)*2+p
```
[Try it online!](https://tio.run/##K6gsycjPM/r/PyU1TSFNI0/TqsA2WkNJQUkrT1tJGUhqahnFauVZFxRl5pVoFGhHgwW1TGPBMtoF/9PyixQyFTLzFIoS89JTNQx1zDSt0jQyNSE6/gMA "Python 2 – Try It Online")
This returns a 2D list of characters.
# [Python 2](https://docs.python.org/2/), 65 bytes
```
def f(n):p=((" "*n+"#"*n)*2+"\n")*n;print(p+("#"*n*5+"\n")*n)*2+p
```
[Try it online!](https://tio.run/##NYu7DoAgDAB/palLCy6S6IDxT1xMBGUpDXHx6/EVl1vuTs9jz@JqXUOESMJeJyIENGKxucnGWZwF2cioJclBauk1pv/F02iNuUCCJFAW2QJ17cA@UuJvqxc "Python 2 – Try It Online")
# [Python 2](https://docs.python.org/2/), 66 bytes
```
def f(n):p=[(" "*n+"#"*n)*2]*n;print'\n'.join((p+["#"*n*5]*n)*2+p)
```
[Try it online!](https://tio.run/##K6gsycjPM/r/PyU1TSFNI0/TqsA2WkNJQUkrT1tJGUhqahnFauVZFxRl5pWox@Sp62XlZ@ZpaBRoR4OltUxjwWq0CzT/p@UXKWQqZOYpFCXmpadqGOqYaVqlaWRqQjT/BwA "Python 2 – Try It Online")
[Answer]
## [Husk](https://github.com/barbuz/Husk), ~~12~~ 10 bytes
```
´Ṫ▲Ṙ" # # 
```
[Try it online!](https://tio.run/##yygtzv7//9CWhztXPZq26eHOGUoKykD4//9/YwA "Husk – Try It Online")
Note the trailing space.
## Explanation
```
´Ṫ▲Ṙ" # #   Implicit input, e.g. n=2.
   Ṙ" # #   Repeat each character of the string n times: "  ##  ##  "
´Ṫ          Outer product with itself by
  ▲         maximum: ["  ##  ##  ","  ##  ##  ","##########","##########","  ##  ##  ","  ##  ##  ","##########","##########","  ##  ##  ","  ##  ##  "]
            Print implicitly, separated by newlines.
```
[Answer]
# CJam, ~~27~~ ~~26~~ 25 bytes
```
{_[{S3*'#*'#5*}3*;]fe*e*}
```
[Try it online!](https://tio.run/##S85KzP2fqqwQlJqYopCYp5CZV5KanlqkkFaUn6sQHOLi6cdVlPm/Oj66OthYS10ZiEy1ao21rGPTUrVStWrBWkvzFEoyUhWScvKTs4FmpCik5RflJpaABYtSi0tzSoq56hT8tP6bAAA "CJam – Try It Online")
Fun fact: This originally started at 29 bytes, and bytes have been removed one-by-one ever since, alternating between block and full-program mode.
## Explanation:
```
{                          e# Stack:               | 2
 _                         e# Duplicate:           | 2 2
  [                        e# Begin array:         | 2 2 [
   {                       e# Do the following 3 times:
    S                      e#   Push a space       | 2 2 [" "
     3*                    e#   Repeat it 3 times: | 2 2 ["   "
       '#*                 e#   Join with '#':     | 2 2 [" # # "
          '#               e#   Push '#':          | 2 2 [" # # " '#
            5*             e#   Repeat it 5 times: | 2 2 [" # # " "#####"
              }3*          e# End:                 | 2 2 [" # # " "#####" " # # " "#####" " # # " "#####"
                 ;         e# Delete top of stack: | 2 2 [" # # " "#####" " # # " "#####" " # # "
                  ]        e# End array:           | 2 2 [" # # " "#####" " # # " "#####" " # # "]
                   fe*     e# Repeat characters:   | 2 ["  ##  ##  " "##########" "  ##  ##  " "##########" "  ##  ##  "]
                      e*   e# Repeat strings:      | ["  ##  ##  " "  ##  ##  " "##########" "##########" "  ##  ##  " "  ##  ##  " "##########" "##########" "  ##  ##  " "  ##  ##  "]
                        }  e# End
e# Result:
e# ["  ##  ##  "
e#  "  ##  ##  "
e#  "##########"
e#  "##########"
e#  "  ##  ##  "
e#  "  ##  ##  "
e#  "##########"
e#  "##########"
e#  "  ##  ##  "
e#  "  ##  ##  "]
```
[Answer]
# [Perl 5](https://www.perl.org/), 49 + 1 (-p) = 50 bytes
```
$_=' # # 
'=~s/./$&x$_/gre x$_;$_.=(y/ /#/r.$_)x2
```
[Try it online!](https://tio.run/##K0gtyjH9/18l3lZdQRkIudRt64r19fRV1CpU4vXTi1IVgLS1SryerUalvoK@sn6Rnkq8ZoXR//8m//ILSjLz84r/6/qa6hkYGvzXLQAA "Perl 5 – Try It Online")
**How?**
Implicitly store the input in `$_` via the `-p` flag. Start with the most basic possible top line `" # # "` with its trailing newline. Replicate each of those characters by the input number. Then replicate that by the input number to form the top part of the octothorpe, storing all of that back in `$_`. Then append the line with all characters replaced by '#' times the input number. Then append the top section. Do those last two sentences a total of two times. Output of the `$_` is implicit in the `-p` flag.
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 21 bytes
```
ＮθＵＯ×²θ#ＵＯθ Ｆ²⟲ＯＯ²⁴⁶θ
```
[Try it online!](https://tio.run/##S85ILErOT8z5/98zr6C0xK80Nym1SKNQ05rLPyknPy9dIyQzN7VYw0hHoVBTR0FJWQkhUwjkK4D4aflFChpGmgpB@SWJJan@ZalFOYkFUErDyMQMpNf6/3/T/7pl/3WLcwA "Charcoal – Try It Online") Link is to verbose version of code. I'd originally tried a cute bitmap approach:
```
Ｆ⁵Ｆ⁵Ｆ＆｜ικ¹«Ｊ×ιＩθ×κＩθＵＯθ#
```
[Try it online!](https://tio.run/##S85ILErOT8z5/z8tv0hBw1RTAYV2yiwpzyxOdcxLgTH9izQydRSyNXUUDDU1Faq5OL1KcwtC8jVCMnNTi0FSzonFJRqFmkAFEKFshJCmNRenf1JOfl66RqGOgpKykiZX7f//pv91y/7rFucAAA "Charcoal – Try It Online") Link is to verbose version of code. Explanation: Works by considering the `#` as an array of 5×5 squares. The squares that are in odd rows or columns need to be filled in.
[Answer]
# J, 22 bytes
```
#('# '{~#:5$21,0)#~"1]
```
[Try it online!](https://tio.run/##y/r/P03B1kpBWUNdWUG9uk7ZylTFyFDHQFO5TskwlosrNTkjXyFNTc9OwVDBSMGYy89JTwHEKy1OTVEoyVdIyq9QKMlIVcgvLSkoLSn@/x8A)
A lot of similarity to the other J answer, though I don't understand trains with lots of nouns well, so my answer has three potential bytes to cut off (two parens and a reflexive-`~`).
# Explanation
### Generating the octothorpe
The octothorpe is made by everything in the parenthetical, reproduced below for convenience.
```
'# '{~#:5$21,0
```
A lot of the way I make the octothorpe is abuse of the way that J pads its arrays when they aren't long enough.
`21,0` simply creates the array `21 0`.
`5$` reshapes that array into a 5-atom array: `21 0 21 0 21`.
`#:` converts each atom into a binary number. Since `#:` operates on each atom, the output is a matrix. Each `21` is replaced by `1 0 1 0 1` as expected, but each `0` is replaced by `0 0 0 0 0`! This is because J pads arrays not long enough to match the shape of the resulting 2D array which is forced to be `5 5` because of the `1 0 1 0 1` rows. Fortunately, for numbers it pads with `0`, so we get the resulting matrix
```
1 0 1 0 1
0 0 0 0 0
1 0 1 0 1
0 0 0 0 0
1 0 1 0 1
```
`'# '{~` converts each `1` to a space and `0` to `#`. `{` means "take" and `~` means "switch the dyadic arguments, so J looks to each element in the matrix as indices for the string `'# '` meaning each `0` becomes the zeroth element, `#` and each `1` becomes the first element, a space. This yields the size one octothorpe.
### Resizing the octothorpe
This is simply a matter of copying `n` times along each axis, done using
the first `#` (which is part of a hook) and `#~"1]`. `#` copies along the horizontal axis and `#"1` copies along the vertical axis.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~14~~ ~~13~~ 11 bytes
*Saved 2 bytes thanks to @JonathanAllen*
```
5ẋ€Ẏ&þ`ị⁾ #
```
A monadic link returning a list of lines. Note the trailing space.
[Try it online!](https://tio.run/##ASQA2/9qZWxsef//NeG6i@KCrOG6jibDvmDhu4vigb4gI//Dh1n//zg "Jelly – Try It Online")
### How it works
```
5ẋ€Ẏ&þ`ị⁾ #    Main link. Arguments: n (integer)            1
5              Yield 5.
 ẋ€            Create a range and repeat each item n times. [[1], [2], [3], [4], [5]]
   Ẏ           Tighten; dump all sublists into the main list.
                                                            [1, 2, 3, 4, 5]
     þ         Create a table of                            [[1, 0, 1, 0, 1],
    &          bitwise ANDs,                                 [0, 2, 2, 0, 0],
      `        reusing this list.                            [1, 2, 3, 0, 1],
                                                             [0, 0, 0, 4, 4],
                                                             [1, 0, 1, 4, 5]]
       ị⁾ #    Index into the string " #".                   [" # # ",
               0 -> "#", 1 -> " ", 2 -> "#", etc.             "#####",
                                                              " # # ",
                                                              "#####",
                                                              " # # "]
```
[Answer]
# [J](http://jsoftware.com/), ~~23~~ 19 bytes
```
' #'{~1=]+./~@#i:@2
```
Saved 4 bytes thanks to @LeakyNun.
[Try it online!](https://tio.run/##y/r/P03B1kpBXUFZvbrO0DZWW0@/zkE508rBiIsrNTkjX0FHTyFNTc9OwVDBSMH4/38A)
## Explanation
```
' #'{~1=]+./~@#i:@2  Input: integer n
                  2  The constant 2
               i:@   Range [-2, -1, 0, 1, 2]
        ]            Get n
              #      Copy each n times
         +./~@       GCD table
      1=             Equals 1, forms the hashtag for input 1
' #'{~               Index and select the char
```
[Answer]
# Game Maker Language, ~~138~~ 108 bytes
```
n=argument0 s=''for(j=0;j<5*n;j+=1){for(l=0;l<5*n;l+=1)if(j div n|l div n)&1s+='#'else s+=' 's+='
'}return s
```
Intended as a script (Game Maker's name for user-defined functions), thus the `n=argument0` and `return s`. 20 bytes could be shaved by taking `n` directly from the current instance and using `s` as the result. (The instance gets these variables anyway because they weren't declared with `var`).
Beware of course that `#` is used by Game Maker's graphics stuff as an alternative newline character, so you might want to prefix it with `\` if you want to output to the screen ;)
Also note that I'm using Game Maker 8.0's version of GML here; modern GML versions might have features that could save additional bytes.
Some ideas courtesy of friends wareya and chordbug.
[Answer]
# [Brain-Flak](https://github.com/DJMcMayhem/Brain-Flak), ~~338~~ 332 bytes
6 bytes thanks to Riley.
```
(({}<>)<(())>)(()()()()()){({}<(<>)<>{({}<<>({}<(((((()()()()())){})){}{}{})<>([({})]()){(<{}({}<((((({}))){}){}{}){({}<<>(({}))<>>[()])}{}>)>)}{}(({})<{{}(<(()()()()()){({}<<>(<([{}](((((()()){}){}){}){}()){}())>)<>{({}<<>({}<(({}))>())<>>[()])}<>({}<>{})>[()])}{}>)}>{})<>((()()()()()){})>())<>>[()])}<>({}<>{}<([{}]())>)>[()])}<>
```
[Try it online!](https://tio.run/##dU@7DgJBCPwdKK6yJZP4HZstzsLEaCxsCd@OwHrrqXHZJzMws6fHerkv59t6dSdSE7AQMYNj34I1EUoMdRVUosabxWq5MoJILTjcq1rUZkGSklm0rVtlBWjEnQNAGIij8qJxkR87USXU1Pq0MbqOWa/6x5flFALtxAaAyO/UDeMPH6r2p/BlI8Um5H7w5fgE "Brain-Flak – Try It Online")
## More "readable" version
```
(({}<>)<(())>)(()()()()())
{({}<(<>)<>{({}<<>({}<(((((()()()()())){})){}{}{})<>
  ([({})]()){(<{}({}<
    ((((({}))){}){}{}){({}<<>(({}))<>>[()])}{}
  >)>)}{}(({})<{{}(<
    (()()()()()){({}<<>(<([{}](((((()()){}){}){}){}()){}())>)<>{({}<<>({}<(({}))>())<>>[()])}<>({}<>{})>[()])}{}
  >)}>{})
<>((()()()()()){})>())<>>[()])}<>({}<>{}<([{}]())>)>[()])}<>
```
[Try it online!](https://tio.run/##dU8xDsIwDNz7io720InVssQ7ogxlQEIgBlbLbw9nh7QFiSStnLuz73J5rbfncn2s99aIzEVZiJiV8R@bJwuKgtQsRRPItcvYPL7YEE7zTAUyrqCMxDx6gAKPFeLoSPmYmqioFuLKICBXhEGVlBiKMWM3Ht1Cxbxusfr0fvKWD/t5QhgqHUw7ocC/U3hAU2Q8Ovuf5k@UMNyo1k5tOb8B "Brain-Flak – Try It Online")
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~25~~ ~~22~~ 21 bytes
```
•LQ•bûε×}5ôεS„# èJ¹F=
```
[Try it online!](https://tio.run/##MzBNTDJM/f//UcMin0AgkXR497mth6fXmh7ecm5r8KOGecoKh1d4HdrpZvv/v5EBAA "05AB1E – Try It Online")
---
***-1 because Emigna hates transliterate and, thankfully, reminds me I should too :P.***
---
Gotta be a better way than bitmapping it... Still working.
[Answer]
## JavaScript (ES6), 79 bytes
```
f=
n=>[...Array(n*5)].map((_,i,a)=>a.map((_,j)=>` #`[(i/n|j/n)&1]).join``).join`
`
```
```
<input type=number oninput=o.textContent=f(this.value)><pre id=o>
```
Port of the bitmap approach that I'd used for my original Charcoal attempt.
[Answer]
# [Python 2](https://docs.python.org/2/), ~~124~~, ~~116~~, ~~113~~, ~~112~~, ~~98~~, ~~96~~ 66 bytes
New (Credit: HyperNeutrino):
```
def f(a):i='print(" "*a+"#"*a)*2;'*a;exec(i+'print"#"*a*5;'*a)*2+i
```
Old:
```
a=input();b,c="# "
for i in"012":
	exec'print c*a+b*a+c*a+b*a;'*a
	if i<"2":exec'print b*a*5;'*a
```
[Try it online!](https://tio.run/##K6gsycjPM/r/P9E2M6@gtERD0zpJJ9lWSVlBiSstv0ghUyEzT8nA0EjJiosztSI1Wb2gKDOvRCFZK1E7CYihtLW6ViIXZ2aaQqaNElApkkKgpJYpSPr/f2MA "Python 2 – Try It Online")
Obviously not the shortest solution, but I think it's decent. Any feedback would be appreciated!
[Answer]
# [brainfuck](https://github.com/TryItOnline/tio-transpilers), 224 bytes
```
,[->+>>>>+<<<<<]>>>+>+++++[-<<<[->+>>>>>+>+++++[-<<<[->+<<<[->>>>>>+<<[->>>+>---<<<<]<<<<]>>>>>>[-<<<<<<+>>>>>>]>[-<<<+>>>]+++++[->+++++++<]>.[-]<<<<<<]>[-<+>]>[-<->]<+[->+<]>>]<<++++++++++.[-]<<<<<]>[-<+>]>[-<->]<+[->+<]>>]
```
[Try it online!](https://tio.run/##dY5LCoAwDAUXHucZT1BykZKFCoIILgTPH/Np3YizaT4vQ5dr3s/tXg/VsRKDDRRHvGI4lazv288wH26XUYKJKCTdZMSBkRaWHHgnTZhiwC6mSlLaPyyHjBNLiZw7bY@XN/8fVx0e "brainfuck – Try It Online")
## Making-of
I tried to build this code by hand and spent quite a few hours, so I decided to make a transpiler in Python.
Here is the code I entered to make this code:
```
read(0)
copy(0,(1,1),(5,1))
add(3,1)
add(4,5)
loop(4)
loop(1)
add(2,1)
add(7,1)
add(8,5)
loop(8)
loop(5)
add(6,1)
loop(3)
add(9,1)
loop(7)
add(10,1)
add(11,-3)
end(7)
end(3)
copy(9,(3,1))
copy(10,(7,1))
add(10,5)
copy(10,(11,7))
write(11)
clear(11)
end(5)
copy(6,(5,1))
copy(7,(6,-1))
add(6,1)
copy(6,(7,1))
end(8)
add(6,10)
write(6)
clear(6)
end(1)
copy(2,(1,1))
copy(3,(2,-1))
add(2,1)
copy(2,(3,1))
end(4)
```
[Try it online!](https://tio.run/##hZPBboMwDIbPzVNEnEibTFAKtFXbF5l6YAM6JpREgDT16ZljJ4hduktj@//92QmqfU5fRmezNeM1YeM1iljdtPxhJhNbcWabR28@qp6DLke26VpubxCf@bi7RrdoG1sFqSDlsigXp5hRWVAc2iK1quvYSr3CAtKPQoK@JdS/i7aaKhdfUUBUWiBnaKr6z3ZrjDNLusXP0E3NS@MbGXtj7EvfuyJjo18PvpPt09gn3HRbOauHs01rBt7Jb95pPpphauoYdPcmUASZ2NTfN9Xwz0L3aMZ3SATDcYmMU5kKGefwK5jjZhBhcJC5YLjHwZ9e2DsHRmXwHhfv0Z85CQV6sZJR5eQqWCipkCaBkqZSgcvdqaQj83ueJO7lM@jA0Ut/vhIAUoJCnzEFMr2LixAZvEW4NGalhIIKSNw6uGiSaz0uahIGFIFfeHxo3NPL@iyTUFjwe7lyZQv@IGY7dHqKRwkp/KvE/As)
[Answer]
# [Befunge](https://github.com/catseye/Befunge-93), ~~105~~ 103 bytes
```
p9p&5*08p>08g-   v
>,g1+:00p^v0:/5g8_p9g1+:09p08g-#v_@
gvg90\/\g0< # # ##### 0:/5g8,+55<
^>\/2%5*+92++2
```
[Try it online!](https://tio.run/##JYpBCoQwDADvfUVA3INRmgRzUKTsQ4rCgpvbkov9fpfqzG2Yz/m9fnbW6uwvHUg8kdgEACVAMsaVyPdCa1STw/ku7O3pyvEOMBamHLPRBl2zAc8@ouoWbE@Wo/Q64CKIUuv8Bw "Befunge – Try It Online")
[Answer]
# [MAWP 2.0](https://esolangs.org/wiki/MAWP), 46 bytes
```
@!!!"#"*/" "*\+2*"
"+*!:/!5*"#"*"
"+*!:\!:/:/:
```
[Try it!](https://8dion8.github.io/MAWP/v2.0?code=%40!!!%22%23%22*%2F%22%20%22*%5C%2B2*%22%0A%22%2B*!%3A%2F!5*%22%23%22*%22%0A%22%2B*!%3A%5C!%3A%2F%3A%2F%3A&input=3)
[Answer]
# [SOGL (SOGLOnline commit 2940dbe)](https://github.com/dzaima/SOGLOnline/tree/2940dbe13bc955f6456c1d3a737b40e255a1d103), 15 [bytes](https://github.com/dzaima/SOGL/blob/master/chartable.md)
```
ø─Ζ┘Χ⁴‘5n{.∙.*T
```
To run this, download [this](https://github.com/dzaima/SOGLOnline/archive/2940dbe13bc955f6456c1d3a737b40e255a1d103.zip) and run the code in the `index.html` file.
Uses that at that commit (and before it) `*` repeated each character, not the whole string.
Explanation:
```
ø─Ζ┘Χ⁴‘          push " # # ##### # # ##### # # "
       5n        split into lines of length 5
         {       for each line do
          .∙       multiply vertically input times
            .*     multiply horizontally input times
              T    output in a new line
```
Bonus: add 2 inputs for separate X and Y length!
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~98~~ 93 bytes
5 bytes thanks to Felix Palmen.
```
i,j;main(a){for(scanf("%d",&a);j<a*5||(j=!puts(""),++i<a*5);)putchar(i/a+1&j++/a+1&1?32:35);}
```
[Try it online!](https://tio.run/##S9ZNT07@/z9TJ8s6NzEzTyNRszotv0ijODkxL01DSTVFSUctUdM6yyZRy7SmRiPLVrGgtKRYQ0lJU0dbOxMkqmmtCRRKzkgs0sjUT9Q2VMvS1gbThvbGRlbGQPna//8tAA "C (gcc) – Try It Online")
[Answer]
# [Gaia](https://github.com/splcurran/Gaia), 9 bytes
```
 # ”ṫ&:Ṁ‡
```
Pretty much a port of [Zgarb's great answer](https://codegolf.stackexchange.com/a/139584/53880)
[Try it online!](https://tio.run/##ASAA3/9nYWlh//8gIyDigJ3huasmOuG5gOKAof/ih5HhuaP/Mw "Gaia – Try It Online") (the footer is just to pretty print, the program itself returns a 2D list of characters)
### Explanation
```
 # ”       Push the string " # "
    ṫ      Bounce, giving " # # "
     &     Repeat each character by input
      :    Copy
       Ṁ‡  Tabled maximum with itself
```
[Answer]
# [Canvas](https://github.com/dzaima/Canvas), 11 [bytes](https://github.com/dzaima/Canvas/blob/master/files/chartable.md)
```
 #¶##┼∙┼╶╶＊
```
[Try it here!](https://dzaima.github.io/Canvas/?u=JTIwJTIzJUI2JTIzJTIzJXUyNTNDJXUyMjE5JXUyNTNDJXUyNTc2JXUyNTc2JXVGRjBB,i=Mw__,v=1)
Explanation:
```
 #¶##         push "#\n##"
     ┼        quad-palindromize with 1 overlap
      ∙┼      quad-palindromize with 1 overlap again
        ╶╶＊  expand vertically and horizontally by the input
```
[Answer]
# Python, ~~88~~ ~~84~~ 77 bytes
```
lambda x:[[(' #'[i//x%2]+'#')[j//x%2]for j in range(5*x)]for i in range(5*x)]
```
[Try it online!](https://tio.run/##K6gsycjPM/6fZhvzPycxNyklUaHCKjpaQ11BWT06U1@/QtUoVltdWV0zOgvCScsvUshSyMxTKErMS0/VMNWq0ASLZaKJ/QcJJiIJalpxcRYUZeaVaCRqwljqMXnqeln5mXkauYkFGuoQto5CGlAJEPwHAA)
Returns 2D list of characters.
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), ~~72~~ ~~68~~ ~~63~~ 60 bytes
```
param($a)(,($x=,((' '*$a+"#"*$a)*2)*$a)+,("#"*5*$a)*$a)*2;$x
```
[Try it online!](https://tio.run/##K8gvTy0qzkjNyfn/vyCxKDFXQyVRU0NHQ6XCVkdDQ11BXUslUVtJWQlIaWoZaYIobR0NkIApWAgsbK1S8f//f2MA "PowerShell – Try It Online")
Takes input `$a`. Then, we do a bunch of ~~magic~~ string and array manipulation.
```
(,($x=,((' '*$a+"#"*$a)*2)*$a)+,("#"*5*$a)*$a)*2;$x
         ' '*$a+"#"*$a                              # Construct a string of spaces and #
        (             )*2                           # Repeat it twice
      ,(                 )*$a                       # Repeat that $a times to get the top as an array
  ($x=                       )                      # Store that into $x and immediately output it
 ,                            +                     # Array concatenate that with ...
                               ,("#"*5*$a)          # another string, the middle bar ...
                                          *$a       # repeated $a times.
(                                            )*2;   # Do that twice
                                                 $x # Output $x again
```
You can peel off the parts of the explanation starting from the bottom to see how the output is constructed, so hopefully my explanation makes sense.
[Answer]
## Haskell, 72 bytes
```
a#b=a++b++a++b++a
c%l=((c<$l)#('#'<$l))<$l
f n=(' '%[1..n])#('#'%[1..n])
```
Returns a list of strings. [Try it online!](https://tio.run/##y0gszk7Nyfn/P1E5yTZRWztJWxtKciWr5thqaCTbqORoKmuoK6uDGJpAgitNIc9WQ11BXTXaUE8vLxYiC@P8z03MzFOwVchNLPBVKCgtCS4p8slTUFFIUzD5DwA "Haskell – Try It Online")
How it works:
```
a#b=a++b++a++b++a          -- concatenate the strings a and b in the given pattern
c%l=                       -- take a char c and a list l (we only use the length
                           -- of l, the actual content doesn't matter)
    c<$l                   -- make length l copies of c
         '#'<$l            -- make length l copies of '#'
        #                  -- combine them via function #
               <$l         -- and make length l copies of that string
f n=                       -- main function
              #            -- make the "a b a b a" pattern with the strings
                           -- returned by the calls to function %                                
    ' '%[1..n]             --   one time with a space 
               '#'%[1..n]  --   one time with a '#'
```
[Answer]
# Mathematica, 63 bytes
```
ArrayFlatten@Array[x=#;Table[If[OddQ@-##," ","#"],x,x]&,{5,5}]&
```
### Explanation
```
ArrayFlatten@Array[x=#;Table[If[OddQ@-##," ","#"],x,x]&,{5,5}]&  (* input N *)
                   x=#                                           (* Set x to N *)
                                                      &          (* A function that takes two inputs: *)
                             If[OddQ@-##," ","#"]                (* if both inputs are odd (1), " ". "#" otherwise *)
                       Table[                    ,x,x]           (* Make N x N array of that string *)
             Array[                                     ,{5,5}]  (* Make a 5 x 5 array, applying that function to each index *)
ArrayFlatten@                                                    (* Flatten into 2D array *)
```
(1)`-##` parses into `Times[-1, ##]`
[Answer]
# Python 2, 113 bytes
**As an array of strings:**
```
r=[1-1*(i%(2*n)<n)for i in range(5*n)]
print[''.join(' #'[r[k]+r[j]>0]for k in range(len(r)))for j in range(n*5)]
```
---
**As ASCII art:**
# Python 3, 115 bytes
```
r=[1-1*(i%(2*n)<n)for i in range(5*n)]
for j in range(n*5):print(*(' #'[r[k]+r[j]>0]for k in range(len(r))),sep='')
```
# Python 3, 117 bytes
```
p=range(5*n)
for i,e in enumerate([j%(2*n)>=n for j in p]for k in p):print(*[' #'[i%(2*n)>=n or k]for k in e],sep='')
```
---
~~**As an array of booleans**~~
# Python 2, 75 bytes
```
p=range(5*n)
f=lambda o:o%(2*n)>=n
print[[f(j)or f(i)for j in p]for i in p]
```
[Answer]
# Java 8, 103 bytes
Lambda accepts `Integer` and prints the octothorpe to standard out. Cast to `Consumer<Integer>`.
```
n->{for(int s=5*n,x=0,y;x<s;x++)for(y=0;y<s;)System.out.print((x/n%2+y++/n%2>0?'#':32)+(y<s?"":"\n"));}
```
[Try It Online](https://tio.run/##XY8xT8MwEIXn5FdYQag2bk3UiqVu0oGJATF0BAbjusEhsSP7HCWq8tuDA0xMp7t37@l7tejFxnbK1OevuQsfjZZINsJ79Cy0Qdc06ZzuBSjkQUAU62hgAXTDLsFI0NawR2t8aJU7PBlQlXIlih4DLxIsfFrXKVTMZlNeL9bheEe@eLgz66HI1yMfDp4PlJJFG4ucj3Enp9GDapkNwH6SMB7uze2WjpQus8yPq5vVfrclFMf/Y5btszeTEcKnOeFpRP7t8UfcW31GbWyDTxDTqtd3JFzlyVIu@UfKhJSqA7wjPE2mdJq/AQ)
## Ungolfed lambda
```
n -> {
    for (
        int
            s = 5 * n,
            x = 0,
            y
        ;
        x < s;
        x++
    )
        for (y = 0; y < s; )
            System.out.print(
                (x / n % 2 + y++ / n % 2 > 0 ? '#' : 32)
                + (y < s ? "" : "\n")
            );
}
```
The key observation here is that, on a 5 by 5 grid of *n* by *n* cells, octothorpes appear wherever the row or column number (0-based) is odd. I'm pretty sure this is the cheapest general approach, but it seems further golfable.
## Acknowledgments
* -1 byte thanks to *Kevin Cruijssen*
]