text:
Syllables in a Number
Make a program/function which takes in an integer from 0 to 999999999999 (inclusive) as input and returns how many syllables it has when spoken in English. Make your code short.
Specification

A billion is a thousand million, a trillion is a million million, etc.
A million has three syllables -- it's mill-ee-on, as opposed to mill-yon. Pronounce all -illions like this.
Numbers like 1115 are 'one thousand, one hundred and fifteen'. The 'and' counts as a syllable.
0 is zero. That's two syllables.

I know the specification seems mishmash in terms of which standards are used (British or American, mainly) -- it's what I and everyone I know use. I would change it so it's consistent, but someone's already answered...
Test Cases
> 0
2
(zero)

> 100
3
(one hundred)

> 1000001
6
(one million and one)

> 1001000001
10
(one billon, one million and one)

> 7
2
(seven)

> 28
3
(twenty-eight)

> 78
4
(seventy-eight)

> 11
3
(eleven)

> 1111
10
(one thousand, one hundred and eleven)

> 999999999999
36
(nine hundred and ninety-nine billion, nine hundred and ninety-nine million, nine hundred and ninety-nine thousand, nine hundred and ninety-nine)

Possible duplicate of this one or this one

@DJMcMayhem They're similar, but certainly not duplicates.

You were quite short on tags :/

Relevant OEIS, although I'm not sure how it copes with illions...

IMHO, This specification is awful. "Billion" is used in American English, so if that's the standard you're using (it is, seeing your examples), then you shouldn't include and in the numbers, because that's grammatically incorrect, unless you're using British English, I think. So 1111 would be one thousand, one hundred, eleven). But British English uses "thousand million" instead of "billion". So you're mixing standards.

@mbomb007 I was just using what I use in real life. I'm British. I say 1111 as 'one thousand, one hundred and eleven' (which makes logical sense). What does 'mixing standards' take away from the challenge, though?

Personally, just as we fix typos and grammar mistakes in questions and answers, it feels bad to see it wrong in a challenge spec.

@mbomb007 Seeing as someone's already answered, I'll just add a note in the description.

Possible duplicate of Count up by Syllables

"Please clarify your specific problem or add additional details to highlight exactly what you need." Exactly what is wrong with the wording and level of detail?

This seems completely clear to me. Could one of the people who marked it as unclear maybe specify what's unclear about it?

Python 2, 232 bytes
def f(a):o=map(int,format(a,",").split(","));print(a%100>0)*(a>1000)+sum((k%100>0)*(k/100>0)for k in o[:-1])+sum((k>99)*2+`k`.count('7')+(k/10%10>0)+3-`k+1000`.count('0')for k in o)+sum((0<o[~k])*(5-k)*k/2for k in range(len(o)))or 2

Try it online!
This still has some potential for golfing, maybe in a lambda.
The function splits the input into groups of three digits, each of which have a certain number of syllables. Luckily, every digit is 1 syllable except for 7. Every tens-place adds an extra 1 syllable to the number of syllables of the digit except for 1, which adds 0 (-teen or ten).
Ungolfed:
def f(k):
    a=k
    if a==0:return 2
    o=[]
    while a>0:
        o.append(a%1000)
        a/=1000
    o=o[::-1]
    return \
int(o[-1]%100>0 and len(o)>1)        +len('+1 if first group of three have "and"'[0:0])+\
sum(\
  [int(k%100>0 and k/100>0)        +len('+1 if rest have "and"'[0:0])\
for k in o[:-1]])+
sum(\
  [int(k>99)*2                      +len('have "hundred"'[0:0])\
  +str(k).count('7')               +len('+1 for "se-ven"'[0:0])\
  +(k/10%10>0)                    +len('+1 for "-ty" e.g. nine-ty'[0:0])\
  +3-str(k+1000).count('0')        +len('+1 for each number'[0:0])\
for k in o])+\
sum(\
  [int(o[-(k+1)]>0)*([0,2,3,3][k])  +len('add 2 if "thousand", add 3 if "million", add 3 if "billion"'[0:0])\
for k in range(len(o))])

-12 bytes thanks to @Mr.Xcoder

237 bytes, starter, much more left to golf I think

Would a>1000 => a>1e3 work?

@Zacharý Indeed, 231


text:
Walkers Join! - Alan Walker's logo
You might know Alan Walker from his ever popular song Faded. Now his "followers" are called Walkers and they have a logo, here is a simplified version:
\\
 \\              //\\
  \\            //  \\            //
   \\          //    \\          //
    \\        //      \\        //
     \\      //        \\      //
      \\    //          \\    //
       \\  //    //\\    \\  //
        \\//    //  \\    \\//
         //    //    \\    \\
        //\\  //      \\  //\\
           \\//        \\//  \\
                              \\

The goal of this challenge is to print this logo.
RULES:

If you return a list of strings from a function as per meta standards, please provide a footer that prints it to the screen.
All characters of the above logo have to be there. No shortcuts!
Shortest number of bytes wins!

can there be extra spaces at the end of each line (as they don't change how the output looks)? Can there be leading/appending newlines?

@dzaima, yes you can.

+1 for Alan Walker!!

Walkers Join! - W41k3r 28881

Charcoal, 31 30 29 27 bytes
Ｆ²«Ｊι⁰↙χ↖↖⁵↙↙⁵↖↖²Ｐ↖χ↙↗χ↘↘¹²

Try it online! Link is to verbose version of code. Sadly Copy doesn't do what I want in this case, so I have to loop instead. Explanation:
Ｆ²«Ｊι⁰

Draw everything twice, but with the cursor starting one character to the right the second time.
   ↙χ↖↖⁵↙↙⁵↖↖²Ｐ↖χ

Draw the main W from right to left, but leave the cursor near the inverted V.
   ↙↗χ↘↘¹²

Draw the inverted V.

You "only" beat the naive solutions by 20 bytes :P

@StepHen A 46% saving isn't bad given the overhead of setting a loop up in the first place...

Is mirroring just not shorter for this?

@StepHen Fixing up the asymmetry costs too much. Best I could do was 35 bytes: Ｆ²«Ｊι⁰↘χ↗↗⁵Ｍ⁵↑←↙χ»‖Ｍ↥\\¶ \\Ｆ²«Ｊι⁰↖³.

JavaScript (ES6), 172 139 bytes

let f =

_=>`1
3s1
5o5o
7k9k
9gdg
bchc
d8l8
f48194
h08590
i899
g14d41
n0h05
1p`.replace(/.p?/g,n=>' '.repeat((n=parseInt(n,36))/2)+(c='/\\'[n&1])+c)

O.innerText = f()

How?
The logo basically consists of groups of spaces followed by either // or \\ and line feeds.
Spaces and ending patterns are encoded using base-36 values:

The least significant bit gives the ending pattern: 0 for //, 1 for \\.
All other bits give the number of spaces before the ending pattern.

Everything can be encoded this way with a single base-36 digit except the last line which consists of 30 spaces followed by \\, leading to 30*2+1 = 61 = 1p in base-36. This p should be interpreted as 12 spaces followed by \\ but this pattern doesn't appear anywhere. So, we can simply handle this special case at the cost of 2 extra bytes in the regular expression: /.p?/.

First version, 186 bytes
NB: This one was submitted prior to the logo update.

let f =

_=>[...`WALKER'S`].reduce((s,c)=>(x=s.split(c)).join(x.pop()),`E
 ELSRE
'LK'
 'LRWLR
WSKS'SK
S ESRLESR
S'KL'K
S 'RKEWR
LEAK'WA
L AKWW
SKERS'RE
L 'ALEA'
LLLS'S    '  ER  AE\\\\KSALSSA//WSE`)

O.innerText = f()

Nicely golfed. Took a stab at this myself before checking the answers; ended up with something similar to your 172 byte version.

brainfuck, 579 bytes
+++++++++[>+>+++++>+++>++++++++++<<<<-]>+>++>+++++>++..<<<.>>.>..<..............<..>>..<..<<.>>..>..<............<..>..>..<............<..<.>>...>..<..........<..>....>..<..........<..<.>>....>..<........<..>......>..<........<..<.>>.....>..<......<..>........>..<......<..<.>>......>..<....<..>..........>..<....<..<.>>.......>..<..<..>....<..>>..<....>..<..<..<.>>........>..<<..>....<..>..>..<....>..<<..<.>>.........<..>....<..>....>..<....>..<<<.>>........<..>>..<..<..>......>..<..<..>>..<<<.>>...........>..<<..>........>..<<..>..>..<<<.>>..............................>..

Try it online!
Generates the constants 47 92 32 10 in memory, then selects and outputs them as appropriate.

I'm pretty sure this can be golfed down, especially that last part

@StanStrum Feel free to give it a shot. I tried but couldn't find any nice way to express it, especially given BF's verbosity in conditionals.

SOGL V0.12, 38 bytes
6«╝5╚@┼╬⁷7«8ž'⁸3L╚ž92L╚╬5L«26«╝╬5:21╬5

Try it Here!

Now we're waiting for Charcoal :P

@Mr.Xcoder if it doesn't beat me, I don't know.

Bubblegum, 77 76 bytes
Hexdump:
0000000: 75cf c109 8000 0c43 d17b a6c8 0659 28fb  u......C.{...Y(.
0000010: cf21 05cb a782 3de9 4b5a b495 5b9f 4946  .!....=.KZ..[.IF
0000020: 870f dac3 f8ea 5704 51b9 2284 c611 0114  ......W.Q.".....
0000030: 9029 f09e ec67 2362 21e1 075e 2136 29b9  .)...g#b!..^!6).
0000040: 08b9 bf97 8939 cf33 ebbf d33e            .....9.3...>

Try it online!
Bubblegum threshold. :P

///, 166 bytes
/-/!#//,/%"//'/%#//&/!!//%/  //#/\\\/\\\///"/\\\\\\\\//!/%%/"
 "&!'"%
,&-,&-
% "&'!"&'
!"&#!,&#
! "!'&"!'
!,-&,-
!% "'-"!"'
&"#-,!"#
& #-!"!"
&#"'!,'"
&% "#&"#,
&&&!,

Try it online!

C (gcc), 377 bytes
char*r="2\\01 2\\14 2/2\\02 2\\12 2/2 2\\12 2/03 2\\10 2/4 2\\10 2/04 2\\8 2/6 2\\8 2/05 2\\6 2/8 2\\6 2/06 2\\4 2/10 2\\4 2/07 2\\2 2/4 2/2\\4 2\\2 2/08 2\\2/4 2/2 2\\4 2\\2/09 2/4 2/4 2\\4 2\\08 2/2\\2 2/6 2\\2 2/2\\011 2\\2/8 2\\2/2 2\\030 2\\";char d[9];main(i){do{if(*r==48)puts(""),r++;for(i=0;isdigit(*r);d[i++]=*r++);for(d[i]=0,i=atoi(d);i--;putchar(*r));}while(*r++);}

Try it online!

356 bytes

Python 2, 197 bytes
print''.join(i>'/'and(i<'2'and['/','\\'][int(i)]*2or' '*int(i))or i for i in"""1
 19501
2193021
319 0419 0
41806180
51608160
61409 140
71204014120
8104021410
90404141
8012061201
921081021
99931""")

Try it online!
Uses the logic from the JS answer.

191 bytes

Haskell, 161 160 bytes
foldr(\a->(++(' '<$[1..fromEnum a-last(96:[64|a<'`'])])++last("\\\\":["//"|a<'`'])))""<$>words"` `Na LbLb JdJc HfHd FhFe DjDf Bd`DBg @dbD@h ddDI `BfB`H b@h@k ~"

Try it online!
Spaces before \\ are encoded as lowercase letters and before // as uppercase letters where the number of spaces is the ASCII value minus 96 (or 64). Zero spaces is ` / @. The Spaces of each line are stored in reverse order, because the are consumes by a right-fold.

Charcoal, 51 bytes
Ｐ↘¹²→↘¹²↑Ｐ↗⁵→↗⁵↓Ｐ↘⁵→↘⁵↑Ｐ↗χ→↗χＭ¹¹↓Ｍ⁵←Ｐ↖¹²←↖¹²↓Ｐ↙χ←↙χ

Try it online!
Charcoal, 50 bytes
Ｐ↘χ→↘χ↑Ｐ↗⁵→↗⁵Ｍ⁵↑←Ｐ↙χ←↙χＭχ↗‖ＭＭ¹⁸←Ｐ↖²←↖²Ｊ²⁷¦⁹Ｐ↘²→↘²¦

Try it online!

Charcoal, 50 31 bytes
Ｆ²«↘¹²↗↗⁵↘↘⁵↗↗⁹Ｍχ↓Ｍ⁴←↖¹²↙↙χＪ¹¦⁰

Try it online! Link is to verbose version.
I tried. (Also, I will point out that I did this completely on my own, even if it looks somewhat similar to the other one. [Shiz, I did it again. This is still different, by the way. :P])

C# (Visual C# Interactive Compiler), 122 bytes (121 chars)
_=>@"
A
9;13) +!(# 0$(	-)
4	(	€".SelectMany(j=>(j%2>0?"//":@"\\").PadLeft(j/4)+(j%4>1?"\n":""))

Try it online!
Explanation
Each part of the logo is just 0+ spaces with either a \\ or a // at the end, plus maybe a newline. There are 52 of these. We then encode each segment into a character:

Take the number of spaces in each segment, then add 2 to that number.

Bit shift the number to the left 2 times.

If the segment ends with //, bit-wise OR the number by one.

If the segment ends with a newline, bit-wise OR the number by two.

Take the number, and cast it into a char.

Repeat for each segment.

Here are all of the 52 segments and the numeric value they encode into:
10,12,65,10,16,57,16,59,20,49,24,51,24,41,32,43,28,33,40,35,32,25,48,27,36,17,25,8,24,19,40,9,25,16,24,11,45,25,24,26,41,8,17,32,17,10,52,9,40,9,18,128

j>>2 -> j/4

124. also i think you can put the null-bytes in if you hand-craft the URL

in the explanation: bitshift left, not right. also list of strings is only if you return each line as its own string... you'll need the string.Concat here for it to be valid...

close, this is 143 whereas normal is 141

@ASCII-only I am pretty sure returning a list of strings like this is allowed, but I'll add another solution just in case. However, is this valid: https://tio.run/##Sy7WTS7O/O9Wmpdsk5@UlZpcouPpmleam1qUmJSTalNcUpSZlx4da2eXZvs/3tZOiYnFkonDkMOYR1NAW0BRQllEUkFaQlBDWIZTMMZAgFuBUZBDgFlVUEBIMcaAU4KTSYdRgTEmr0JJLzg1B2i4RpatnUZearlCMNhgDXUFdZ0sfRNNbY0sVSM7A3slfX0lKwelmBglsJCJnaG9UkyekpWSkqamXnBBTmaJBoj535orvCizJFUD4j495/y85MQSjTQNY02YRcm2dqiSyZpAYP0fAA

Check the meta rules for input/output, submissions may use a list of strings instead of multiline strings. anything else is not allowed.

PowerShell, 221 220 bytes
$ofs=''
"b
 b$(' '*14)/b
$((2..6|%{' '*$_+"b$(($a=' '*(14-++$i*2)))/$(' '*$i*2)b$a/`n"}))   4b  /4/b4b  /
44b/4/  b4b/
44 /4/4b4b
44/b  /4  b  /b
44   b/44b/  b
$(' '*30)b"-replace4,'    '-replace'/','//'-replace'b','\\'

Try it online!
Fairly naïve approach (and 50 bytes worse than the JS answer, cringe). Anyone know of a way to do multiple -replaces in PowerShell?
-1 byte thanks to Veskah.

If you swap \\ to any other character, you can save escaping it in the replace statement for a byte.

@Veskah Simple byte savings. Thanks!

Jelly, 65 bytes
“<fṭY2Ẹ<ƭẹ£ʋ¥¹)Œ<Ẓ⁹ḣ⁶ıĠ\ṃṛ?04|ẏḌẉƙ+’b36⁶ẋ“ÇỴ$ñ⁵FḄ’Bị⁾\/¤ẋ€2¤żFs36

Try it online!
Returns a list of characters. TIO link has a footer to print on separate lines.

PHP, 186 bytes:
Both versions require PHP 5.5 or later.
Run with -nr or try them online

space compression gives the shortest alternative:
(double backslash mapped to 0, double slash to f, sapces compressed to digits)
while(~$c="0
1077f0
2066f2066f
3055f4055f
408f608f
506f806f
604f5504f
702f4f0402f
80f4f2040f
9f4f4040
8f02f602f0
560f80f20
87870"[$i++])echo+$c?str_pad("",$c):strtr($c,["\\\\",f=>"//"]);

PHP 7.1 yields warnings; replace +$c with $c>0 to fix.

base 64 encoded bitmap (187 bytes):
(mapped space to 00, newline to 01, double backslash to 10 and double slash to 11,
then concatenated 3 "pixels" each to one character,
prepended 1 and converted from binary to ASCII)
for(;$c=ord("d`@@@@yB@@@@p`@@@M@`@@C@H@@@t@`@@p@H@@M@B@@p@@`@M@@`C@@@H@t@@`pC`BCP@@l@p`Bt@@C@L@`BP@@xL@BCd@@@K@@Bpd@@@@@@@@@B"
[$i++]);)for($b=6;$b;)echo[" ","
","\\\\","//"][3&$c>>$b-=2];

(first linebreak for reading convenience; the other one is essential)

Bubblegum, 74 bytes
00000000: 758c 4b11 0400 0885 eea6 a081 85e8 9f63  u.K............c
00000010: 4fb2 7f4f 0e30 4f07 e5ed 7615 8613 e16f  O..O.0O...v....o
00000020: 321c ab89 d484 4a22 2591 8a48 45a0 2052  2.....J"%..HE. R
00000030: 809e dfd5 481e 3d0d 7a24 4d96 bc43 b2fd  ....H.=.z$M..C..
00000040: 96d3 cdbf fff9 7fa7 f300                 ..........

Try it online!

Python 2, 180 bytes
print''.join(c<'3'and'\\/\n\\/'[int(c)::3]or' '*(int(c,36)-2)for c in'0230g104240e140e1250c160c1260a180a127081a08128061c0612904161060412a0161406012b16160602a1041804102d01a01402w0')

Try it online!
The encoding is base 36:
0 => \\
1 => //
2 => \n

and otherwise,
n => (n-2) spaces

C (gcc), 144 140 139 bytes
-4 bytes thanks to ceilingcat.
Each character in the string encodes a number of spaces to use before a certain string. If it's a lower-case letter (or a backtick), then the string is "\", and if upper-case or @, it's "//". A space signifies a newline.
f(c,i){for(i=0;c="` aN` bLbL cJdJ dHfH eFhF fDjD gBD`dB h@Dbd@ IDdd H`BfB` k@h@b ~"[i++];)printf("%*s",c%32+2,c<33?"\n":c<96?"//":"\\\\");}

Try it online!

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Is this a losing square?
There is a game called Get Home that is played on the a chess board.  In this game there is a single piece that is moved by both players in turns.  There are some rules to how the piece can be moved.  On a turn a player must make one of the following moves for positive n.

n spaces up
n spaces to the left
n spaces up and to the left (a diagonal)

The player who moves the piece into the top left corner of the board wins the game.
Now we will define the concept of a losing square.  In this video (from where I got the idea) a losing square is defined as a square on which, any player starting their turn will be forced to make a move allowing their opponent to force a win.  The simplest example of a losing square would be the square at (1,2).  A piece at (1,2) can move to any of the following places.

All of which have a direct path to victory for the next player.
It also follows that any square that has a one move path to a losing square  allows the player starting on that square to force a win.  This means that any square that is not one move away from a losing square is also a losing square.
This brings us to this rather neat definition of a losing square:
A losing square is a square from which no move can arrive on another losing square and (0,0) is a losing square.
Task
Given the coordinates of a square on an arbitrarily sized chess board determine if it is a losing square.  Output two values one for losing squares and one for others.
This is code-golf so answers will be scored in bytes with less bytes being better.
Test Cases
Here are all the losing squares on a regular 8 by 8 chess board (marked with 0).
0 1 1 1 1 1 1 1
1 1 0 1 1 1 1 1
1 0 1 1 1 1 1 1
1 1 1 1 1 0 1 1
1 1 1 1 1 1 1 0
1 1 1 0 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 0 1 1 1

Here is an image of a 100 by 100 board with losing squares marked in black (each square is 2 pixels by 2 pixels).

I don't think there are enough test cases to find a pattern.I think I see a pattern, but I couldn't say for sure. Is 10, 7 a losing square? Is 10, 8? What about 15, 11?

@DJMcMayhem I will update with an image showing the pattern.  The current test cases are there to verify answers.  I believe you are correct in your assertions of further losing squares.

@WheatWizard Do you mind making the image a bit larger?

@EriktheOutgolfer Its now 100 by 100, is that better?  It takes a while to do this because I'm making the image by hand.

@WheatWizard I meant larger pixels...e.g. 5x5 pixels instead of 1x1, possibly some grid too if not too hard (btw thanks for the 100x100)

@EriktheOutgolfer I've made each pixel 2x2.  I felt 5x5 was way too large.  Unfortunately I am not skilled enough with gimp to make a grid.

Correction: this is closely related to https://codegolf.stackexchange.com/q/95604/194 , but that's a heuristic rather than an exact question.

Also related (return optimal move or signal that the position is losing).

Is the "arbitrary size" allowed to be limited by floating point inaccuracies (i.e. if we are using a square root or a floating-point golden ratio) or must we really support arbitrary size (up to physical limitations) if our language supports arbitrarily large integers?

@JonathanAllan I don't know at the moment if you can give me a bit to think it over I can make a binding ruling.  But until I permit it I will say it is not allowed.  Is there a meta about floats?  This seems to be a common issue, if there is one I'll go with the consensus.

I think it is normal to allow floating point inaccuracies to hinder performance even with arbitrarily large integer capability...

I don't know about the meta consensus, but a reasonable argument to allow it was given to me by Dennis here for a similar task.

@WheatWizard I believe the consensus is approximately that the algorithm should work if the language didn't have limitations. So an answer which says (0,0) is a losing square and all other inputs are not, with the justification being "The language doesn't support integers, only bits" would be invalid, but if an algorithm that works for arbitrary numbers but is implemented in a language that only supports 8-bit integers would be valid.

@JonathanAllan I don't think Dennis' argument caries over here but I will allow it.  So long as answers work for values under 500.

@WheatWizard Here is the relevant post in forbidden loopholes. Perhaps concluding from there that floating point inaccuracies don't need to be handled unless specifically relevant is a stretch, but it indicates that answers that would need more than trivial modification if their language suddenly improved the data type are invalid and otherwise you can keep the limits to what your language supports

Strangely related

I'm not sure how to interpret the task: "Output two values one for losing squares and one for others." Wouldn't the output simply be yes/no? Oh, I think I get it now, the output should be one of two possible values. You don't want us to output two values, only one.

@Octopus Yes.  This is a decision problem.  Yes and no are fine.

The name of this game in formal mathematics is Wythoff's game

Python 3, 112 50 46 42 bytes
-4 bytes thanks to Jonathan Allan!
-2 bytes thanks to xnor!
lambda r,c:abs(r-c)*(3+5**.5)//2==max(r,c)

Try it online!
Based on the formula for cold positions in Wythoff's game and making some modifications in order to produce an explicit formula. Explanation inbound once I actually finish a proper methodology for the derivation of the formula.

Could not you change 0<=x to x>0 and save a byte or two?

@JonathanFrech It has to be either <= or >= in order to include position 0, 0.

You are right, only one byte can be saved.

@JonathanFrech I was a little weary of changing that <= because as the pairs get larger, the calculated quantity approaches 4/(1+5**.5)**2. As such, I was unsure of whether to make it < - although I guess it will never reach that point.

One less byte with a different implementation of the same: lambda r,c:int(abs(r-c)*(5**.5+1)**2/4)==max(r,c)

@JonathanAllan Honestly, I'm sort of struggling to formalize an explanation of why this works - could you help me out here?

/2//1 looks the same as //2.

See my Jelly answer, I hope it explains it.

Why can't (3+5**.5)//2 be replaced by its value?

@Mr.Xcoder The order of operations dictates that the absolute difference is multiple by the quantity in parentheses before being halved, so evaluating that portion gets a different result entirely.

Oh thanks! That's... interesting.

Jelly, 8 bytes
ạ/×ØpḞ⁼Ṃ

Try it online!, or see the top-left 60 by 60 as a grid.
How?
A cold position in Wythoff's game is a losing position. The coordinates [n,m] give a cold position when n = floor(kφ) = floor(mφ) - m or m = floor(kφφ) = ceil(nφ) = n + k for some natural number, k, and the golden ratio, φ. The former holds when n is less than m; the latter when m is less than n (both holding at 0,0).
k is thus the absolute difference between n and m and if floor(abs(n-m)φ)=min(n,m) the condition is met.
ạ/×ØpḞ⁼Ṃ - Link: list, c ([n,m])
 /       - reduce c by:
ạ        -   absolute difference = abs(n-m)
   Øp    - golden ratio yield
  ×      - multiply
     Ḟ   - floor
       Ṃ - minimum of c = min(n,m)
      ⁼  - equal?

JavaScript (ES6), 64 bytes
f=(x,y,p=5**.5/2+.5)=>x<y?f(y,x):y/p%p<1&(y/p%p-x*p%++p)**2<1e-9

I see now that this is not the best technique, but I had to come up with it myself because I lost internet shortly after loading this page. (Would've posted a while ago if not for these internet issues...)
In a perfect world, float precision wouldn't be an issue and I could save 9 bytes:
f=(x,y,p=5**.5/2+.5)=>x<y?f(y,x):y/p%p<1&y/p%p==x*p%++p

6 more bytes could be saved  if JS supported Python's comparison chaining:
f=(x,y,p=5**.5/2+.5)=>x<y?f(y,x):y/p%p==x*p%++p<1

Pyth, 39 Bytes
=SQL?!b0-byytb;q@myd+0.fqyZytZ@Q1)-F_Qh

I wrote this with a named function (ew), and was extremely lazy with golfing. Planning to golf off quite a number of bytes later tonight
Try it online, with my own generated tests, meant to alternate True / False
Explanation:
Diagonals of the solution matrix have a losing square according to the sequence of repeated numbers in OEIS A005206. From L through ; is pretty straightforward polish notation to define y(b)=b-y(y(b-1)).
The rest of the explanation follows
=SQL?!b0-byytb;q@myd+0.fqyZytZ@Q1)-F_Qh    Full program, take stdin as [x, y], output True or False to stdout
=SQ                                        Sort input
   L?!b0-byytb;                            Named lambda as explained above
                    +0.f                   Make sequence of first max(x, y) numbers, starting with 0,
                        qy y               For which are equal
                          Z tZ             each element and the previous are equal
                myd                        Map this sequence to the y(index), not just index numbers
             q                             Check if are equal
              @                  )-F_Q     the x-yth element of sequence (x-y represents which diagonal)
                                     h(Q)  and the lower of [x,y] (Q is added by the interpreter to fix arity issues

Batch, 204 bytes
@if %1 lss %2 %0 %2 %1
@if %1==0 exit/b0
@set/au=l=i=0
:g
@set/au+=2+i%%2,l+=1+i%%2
@if %1==%n% if %2==%m% exit/b0
@if %1 leq %n% exit/b1
:l
@set/a"k=3*i^2*i^i,i+=1
@if %k%==0 goto g
@goto l

Returns via exit code. Explanation: Since Batch only has integer arithmetic I had to devise a purely arithmetical solution. Excluding the 0,0 entry, the pairs of losing square coordinates follow the following rule: if the next 11-free binary number is even then add 3,2 otherwise add 2,1. A test for a 11-free binary number is if there are no carries when it is multiplied by three, in other words that (i*2)+i==(i*2)^i. Here are the first few 11-free binary numbers and their coordinates:
   0     2,1  + 3,2 =  5,3
   1     5,3  + 2,1 =  7,4
  10     7,4  + 3,2 = 10,6
 100    10,6  + 3,2 = 13,8
 101    13,8  + 2,1 = 15,9
1000    15,9  + 3,2 = 18,11
1001    18,11 + 2,1 = 20,12
1010    20,12 + 3,2 = 23,14

etc. Mysteriously this rule suffices to make the sequences complementary. It then remains to compute the sequence until it reaches the larger coordinate, at which point we can determine whether the square is losing.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Optimal path through a matrix
Given a matrix consisting of positive integers, output the path with the lowest sum when traversing from the upper left element to the bottom right. You may move vertically, horizontally and diagonally. Note that it's possible to move both up/down, right/left and diagonally to all sides.
Example:
 1*   9    7    3   10    2    2
10    4*   1*   1*   1*   7    8
 3    6    3    8    9    5*   7
 8   10    2    5    2    1*   4
 5    1    1    3    6    7    9*

The path giving the lowest sum is marked with asterisks, and results in the following sum: 1+4+1+1+1+5+1+9=23.
Test cases:
1   1   1
1   1   1
Output: 3

 7    9    6    6    4
 6    5    9    1    6
10    7   10    4    3
 4    2    2    3    7
 9    2    7    9    4
Output: 28

2  42   6   4   1
3  33   1   1   1
4  21   7  59   1
1   7   6  49   1
1   9   2  39   1
Output: 27 (2+3+4+7+7+1+1+1+1)

 5    6    7    4    4
12   12   25   25   25
 9    4   25    9    5
 7    4   25    1   12
 4    4    4    4    4
Output: 34 (5+12+4+4+4+1+4)

1   1   1   1
9   9   9   1
1   9   9   9
1   9   9   9
1   1   1   1
Output: 15

 2   55    5    3    1    1    4    1
 2   56    1   99   99   99   99    5
 3   57    5    2    2    2   99    1
 3   58    4    2    8    1   99    2
 4   65   66   67   68    3   99    3
 2    5    4    3    3    4   99    5
75   76   77   78   79   80   81    2
 5    4    5    1    1    3    3    2
Output: 67 (2+2+3+3+4+5+4+3+3+3+1+2+2+1+3+1+1+4+5+1+2+3+5+2+2)

This is code-golf so the shortest code in each language wins.

Very similar, though it doesn't allow diagonal movement.

@WheatWizard I disagree. Apart from the mostly superficial differences that this challenge allows for diagonal movement and all positions are reachable, the other challenge requires return of the path itself rather than just the cost of the path. Unless you're using built-ins that return both, the code is not interchangeable.

@beaker I don't really see the difference.  You have to find the path to know its length.  The difference here is a rather small difference in output in my opinion and this challenge offers nothing new or interesting not already covered by that challenge.

@WheatWizard My solution here does not find the path. It could find the path, but not without a separate predecessor array and logic to avoid making a node its own predecessor. Not to mention recovering the path at the end.

@beaker The modification is rather trivial in my opinion.  Regardless the question of dupes is not whether every single valid entry on one challenge can be ported over with minimal effort, its about the general case.  Not only do I think most efforts here can be ported I don't think this challenge offers anything new or interesting from the other.

JavaScript, 442 412 408 358 bytes
This is my first PPCG submission. Feedback would be appreciated.
(m,h=m.length,w=m[0].length)=>{for(i=0;i<h*w;i++)for(x=0;x<w;x++){for(y=0;y<h;y++){if(m[y][x]%1==0)m[y][x]={c:m[y][x],t:m[y][x]};for(X=-1;X<=1;X++)for(Y=-1;Y<=1;Y++){t=x+X;v=y+Y;if((X==0&&Y==0)||t<0||t>=w||v<0||v>=h)continue;if(m[v][t]%1==0)m[v][t]={c:m[v][t],t:null};c=m[y][x].t+m[v][t].c;if (c<m[v][t].t||m[v][t].t==null)m[v][t].t=c}}}return m[h-1][w-1].t}

This takes a multi-dimensional array as input.
Explanation
Basically, loop through all of the cells over and over adjusting the lowest known cost to get to each of the neighbors. Eventually, the grid will reach a state where the total cost to reach the bottom right is the lowest cost to get there.
Demo

f=(m,h=m.length,w=m[0].length)=>{for(i=0;i<h*w;i++)for(x=0;x<w;x++){for(y=0;y<h;y++){if(m[y][x]%1==0)m[y][x]={c:m[y][x],t:m[y][x]};for(X=-1;X<=1;X++)for(Y=-1;Y<=1;Y++){t=x+X;v=y+Y;if((X==0&&Y==0)||t<0||t>=w||v<0||v>=h)continue;if(m[v][t]%1==0)m[v][t]={c:m[v][t],t:null};c=m[y][x].t+m[v][t].c;if (c<m[v][t].t||m[v][t].t==null)m[v][t].t=c}}}return m[h-1][w-1].t}

//Tests
console.log(f([[1,1,1],[1,1,1]])===3);
console.log(f([[7,9,6,6,4],[6,5,9,1,6],[10,7,10,4,3],[4,2,2,3,7],[9,2,7,9,4]])===28);
console.log(f([[2,42,6,4,1],[3,33,1,1,1],[4,21,7,59,1],[1,7,6,49,1],[1,9,2,39,1]])===27);
console.log(f([[5,6,7,4,4],[12,12,25,25,25],[9,4,25,9,5],[7,4,25,1,12],[4,4,4,4,4]])===34);
console.log(f([[1,1,1,1],[9,9,9,1],[1,9,9,9],[1,9,9,9],[1,1,1,1]])===15)
console.log(f([[2,55,5,3,1,1,4,1],[2,56,1,99,99,99,99,5],[3,57,5,2,2,2,99,1],[3,58,4,2,8,1,99,2],[4,65,66,67,68,3,99,3],[2,5,4,3,3,4,99,5],[75,76,77,78,79,80,81,2],[5,4,5,1,1,3,3,2]])===67);

Edit: Special thanks to @ETHproductions for helping me shave dozens of tasty bytes.
More thanks to @Stewie Griffin for your tips that knocked off 50 bytes.

Welcome to PPCG! There are some extra spaces you could remove toward the end (I count 5 total), and you don't need any of the semicolons directly before a } which should save a few bytes. You also don't need to declare your variables; I think removing the vars should save you 24 more bytes total.

Welcome to PPCG =) I'm glad you chose one of my challenges as a starting point. My only comment: I love explanations. It's optional though, so you don't have to add it unless you want to. :)

I think maybe storing m[v][t] as a variable: t=x+X;v=y+Y;k=m[v][t] will be even shorter...?

Python 3 + numpy + scipy, 239 222 186 bytes
from numpy import*
from scipy.sparse.csgraph import*
def f(M):m,n=s=M.shape;x,y=indices(s);return dijkstra([(M*(abs(i//n-x)<2)*(abs(i%n-y)<2)).flatten()for i in range(m*n)])[0,-1]+M[0,0]

Try it online!

Octave + Image Processing package, 175 162 157 151 142 139 bytes
Saved 14 bytes thanks to @Luis Mendo and 1 byte thanks to @notjagan
function P(G)A=inf(z=size(G));A(1)=G(1);for k=G(:)'B=im2col(padarray(A,[1,1],inf),[3,3])+G(:)';B(5,:)-=G(:)';A=reshape(min(B),z);end,A(end)

Uses the Image Processing package, because why not? Isn't that how everybody solves graph problems?
Try it online!
Exploded
function P(G)
   A=inf(z=size(G));         % Initialize distance array to all Inf
   A(1)=G(1);                % Make A(1) = cost of start cell
   for k=G(:)'               % For a really long time...
      B=im2col(padarray(A,[1,1],inf),[3,3])+G(:)';
       %  B=padarray(A,[1,1],inf);     % Add border of Inf around distance array
       %  B=im2col(B,[3,3]);           % Turn each 3x3 neighborhood into a column
       %  B=B+G(:)';                   % Add the weights to each row
      B(5,:)-=G(:)';         % Subtract the weights from center of neighborhood
      A=reshape(min(B),z);   % Take minimum columnwise and reshape to original
   end
   A(end)                    % Display cost of getting to last cell

Explanation
Given an array of weights:
7   12    6    2    4
5   13    3   11    1
4    7    2    9    3
4    2   12   13    4
9    2    7    9    4

Initialize a cost array so that the cost to reach every element is Infinity, except the starting point (the upper left element) whose cost is equal to its weight.
  7   Inf   Inf   Inf   Inf
Inf   Inf   Inf   Inf   Inf
Inf   Inf   Inf   Inf   Inf
Inf   Inf   Inf   Inf   Inf
Inf   Inf   Inf   Inf   Inf

This is iteration 0. For each subsequent iteration, the cost to reach a cell is set to the minimum of:

the current cost to reach that element, and
the current cost to reach the element's neighbors + the weight of the element

After the first iteration, the cost of the path to element (2,2) (using 1-based indexing) will be
minimum([  7   Inf   Inf]   [13  13  13]) = 20
        [Inf   Inf   Inf] + [13   0  13]
        [Inf   Inf   Inf]   [13  13  13]

The full cost array after the first iteration would be:
  7    19   Inf   Inf   Inf
 12    20   Inf   Inf   Inf
Inf   Inf   Inf   Inf   Inf
Inf   Inf   Inf   Inf   Inf
Inf   Inf   Inf   Inf   Inf

After iteration k, each element will be the lowest cost of reaching that element from the start taking at most k steps. For example, the element at (3,3) can be reached in 2 steps (iterations) for a cost of 22:
  7    19    25   Inf   Inf
 12    20    22   Inf   Inf
 16    19    22   Inf   Inf
Inf   Inf   Inf   Inf   Inf
Inf   Inf   Inf   Inf   Inf

But on the 4th iteration, a path of 4 steps is found with a cost of 20:
 7   19   25   24   28
12   20   22   32   25
16   19   20   30   34
20   18   30   34   35
27   20   25   40   39

Since no path through the mxn matrix can be longer than the number of elements in the matrix (as a very loose upper bound), after m*n iterations every element will contain the cost of the shortest path to reach that element from the start.

-1 byte by removing the space between while and ~.

@notjagan I switched from while to for and was still able to use your tip. Thanks!

JavaScript, 197 bytes
a=>(v=a.map(x=>x.map(_=>1/0)),v[0][0]=a[0][0],q=[...(a+'')].map(_=>v=v.map((l,y)=>l.map((c,x)=>Math.min(c,...[...'012345678'].map(c=>a[y][x]+((v[y+(c/3|0)-1]||[])[x+c%3-1]||1/0)))))),v.pop().pop())

Prettify:
a=>(
  // v is a matrix holds minimal distance to the left top
  v=a.map(x=>x.map(_=>1/0)),
  v[0][0]=a[0][0],
  q=[
     // iterate more than width * height times to ensure the answer is correct
    ...(a+'')
  ].map(_=>
    v=v.map((l,y)=>
      l.map((c,x)=>
        // update each cell
        Math.min(c,...[...'012345678'].map(
          c=>a[y][x]+((v[y+(c/3|0)-1]||[])[x+c%3-1]||1/0)
        ))
      )
    )
  ),
  // get result at right bottom
  v.pop().pop()
)

Mathematica 279 Bytes
Basic idea is to create a graph with vertices corresponding to matrix entries and directed edges between any two vertices separated by a ChessboardDistance greater than zero but less than or equal to 1. Incidentally, this happens to be known as a King graph, since it corresponds to the valid moves of a king on a chessboard.
FindShortestPath is then used to get the minimal path.  It works on EdgeWeight, not VertexWeight, so there is some extra code to define the EdgeWeight as the matrix entry corresponding to the destination of each directed edge.
Code:
(m=Flatten[#];d=Dimensions@#;s=Range[Times@@d];e=Select[Tuples[s,2],0<ChessboardDistance@@(#/.Thread[s->({Ceiling[#/d[[1]]],Mod[#,d[[1]],1]}&/@s)])≤1&];Tr[FindShortestPath[Graph[s,#[[1]]->#[[2]]&/@e,EdgeWeight->(Last@#&/@Map[Extract[m,#]&,e,{2}])],1,Last@s]/.Thread[s->m]])&

Note that the  character is the transpose symbol.  It will paste into Mathematica as-is.
Usage:
%@{{2, 55, 5, 3, 1, 1, 4, 1},
  {2, 56, 1, 99, 99, 99, 99, 5},
  {3, 57, 5, 2, 2, 2, 99, 1},
  {3, 58, 4, 2, 8, 1, 99, 2},
  {4, 65, 66, 67, 68, 3, 99, 3},
  {2, 5, 4, 3, 3, 4, 99, 5},
  {75, 76, 77, 78, 79, 80, 81, 2},
  {5, 4, 5, 1, 1, 3, 3, 2}}

Output:
67

If you set g=Graph[...,GraphLayout->{"GridEmbedding","Dimension"->d},VertexLabels->Thread[s->m] and p=FindShortestPath[... then the following graphic will visually display the solution (top of the matrix corresponds to the bottom of the graph):
HighlightGraph[g,PathGraph[p,Thread[Most@p->Rest@p]]]

Python 2, 356 320 bytes
s=input()
r=lambda x:[x-1,x,x+1][-x-2:]
w=lambda z:[z+[(x,y)]for x in r(z[-1][0])for y in r(z[-1][1])if x<len(s)>0==((x,y)in z)<len(s[0])>y]
l=len(s)-1,len(s[0])-1
f=lambda x:all(l in y for y in x)and x or f([a for b in[l in z and[z]or w(z)for z in x]for a in b])
print min(sum(s[a][b]for(a,b)in x)for x in f([[(0,0)]]))

Try it here!
-36 bytes thanks to notjagan!
Receives a list of lists as an input, and outputs the lowest cost when navigating the matrix from the upper left to the bottom right.
Explanation
Find every possible route from the upper left to the bottom right of the matrix, creating a list of x,y coordinates for each route. The routes cannot backtrack, and they must end at (len(s)-1,len(s[0])-1).
Sum the integers on each path of coordinates, and return the minimum cost.
The print can be easily changed to output the list of coordinates for the shortest route.

-36 bytes with some miscellaneous changes.

@notjagan Great changes, especially the use of or for the conditionals. Thank you!

Haskell, 228 bytes
Positions are lists of two elements, because those are easy to generate with sequence and just as easy to pattern match as 2-tuples.
h=g[[-1,-1]]
g t@(p:r)c|p==m=0|1<2=minimum$(sum$concat c):(\q@[a,b]->c!!a!!b+g(q:t)c)#(f(e$s$(\x->[0..x])#m)$f(not.e t)$zipWith(+)p#s[[-1..1],[-1..1]])where m=[l(c)-1,l(head c)-1]
(#)=map
f=filter
e=flip elem
s=sequence
l=length

Start at -1,-1 and count the cost of each steps destination field.
Alternative first two lines: start at 0,0, count the departure fields, terminate at the coordinates equal to the matrix dimensions (so down-right from the goal, which needs to be added to the list of legal destinations) - exact same length but slower:
j=i[[0,0]]
i t@(p@[a,b]:r)c|p==m=0|1<2=c!!a!!b+(minimum$(sum$concat c):(\q->i(q:t)c)#(f(e$m:(s$(\x->[0..x-1])#m))$f(not.e t)$zipWith(+)p#s[[-1..1],[-1..1]]))where m=[l c,l$head c]

Using an infix for map does not save bytes here but I substitute it as soon as it doesn't cost one, because it can only get better with more uses, and sometimes with other restructurings as well which shave off another pair of parentheses.
To be improved: Redundant filters. Merging/in-lining them to filter(flip elem$(s$(\x->[0..x])#m)\\p) with import Data.List for \\ costs 3 bytes.
Also, too bad (fromEnumTo 0) is 2 bytes longer than (\x->[0..x]).
sum$concat c is all fields' cost summed up and thus a concisely expressible upper bound on the path cost which is given to the minimum to avoid an empty list (my type checker has already determined the whole thing to work on Integers, so no hard-coding the maximum, hehe). No matter how I restrict steps based on the previous one made (which would speed up the algorithm a lot, but also cost bytes), I can not avoid the dead ends that make this fall-back necessary.

One filter idea was ((not.e n).zipWith(-)(head r)) with extracting n=s[[-1..1],[-1..1]], which necessitates adding ,[-1,-1] to the initial path. The algorithm then avoids going where it could already have gone in the previous step, which makes stepping on an edge field orthogonally to that edge a dead end.
Another was ((>=0).sum.z(*)d) with extracting z=zipWith, which introduces a new argument d to the recursive function that is given as (z(-)p q) in the recursion and [1,1] in the initial case. The algorithm avoids successive steps with a negative scalar product (d being the previous step), which means no sharp 45°-turns. This still narrows down the choices considerably, and avoids the previous trivial dead end, but there are still paths that end up enclosed in already-visited fields (and possibly an 'escape' which however would be a sharp turn).

APL (Dyalog Classic), 33 bytes
{⊃⌽,(⊢⌊⍵+(⍉3⌊/⊣/,⊢,⊢/)⍣2)⍣≡+\+⍀⍵}

Try it online!
{ } function with argument ⍵
+\+⍀⍵ take partial sums by row and by column to establish a pessimistic upper bound on path distances
( )⍣≡ repeat until convergence:

(⍉3⌊/⊣/,⊢,⊢/)⍣2 min of distances to neighbours, i.e. do twice (( )⍣2): prepend leftmost column (⊣/,) to self (⊢) and append rightmost columns (,⊢/), find minima in horizontal triples (3⌊/) and transpose (⍉)
⍵+ add each node's value to its min of distances to neighbours
⊢⌊ try to beat the current best distances

⊃⌽, finally, return the bottom right cell


text:
#OctothorpeAsciiArt
An Octothorpe, (also called number sign, hash or hashtag, or pound 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!

Related

MATL, 20 16 12 11 bytes
3 bytes thanks to DJMcMayhem.
1 byte thanks to Luis Mendo.
21BwY"&*~Zc

Try it online!
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          ##########
                                   ##########
                                     ##  ##
                                     ##  ##
                                   ##########
                                   ##########
                                     ##  ##
                                     ##  ##

You can use Zc instead of 35*c and ~ (logical NOT) instead of 0=

@DJMcMayhem @_@ why is that a built-in

Actually, the reason that's a builtin is really interesting. I could be wrong, but I think conor suggested it, and Suever wrote a script that looks at all the MATL answers to see what functions are more common for future improvements. Zc was just added

Also, since each cell just has to be non-zero, you could do Q instead of 2<

@DJMcMayhem sorry I changed the algorithm removing that need.

@DJMcMayhem Yes, that's how it happened. Actually * was slightly more common, but I liked # better :-)

@LeakyNun You can change !t* to &*. The latter means "one-input multiplication", which multiplies (element-wise) the input by its transpose

Brain-Flak, 420 bytes
(()()()){({}<(({})){({}<<>(<>({})<>){({}<((((()()()()){}){}()){}())>[(
)])}{}(<>({})<>){({}<((((()()()()){}){}){})>[()])}{}(<>({})<>){({}<(((
(()()()()){}){}()){}())>[()])}{}(<>({})<>){({}<((((()()()()){}){}){})>
[()])}{}((()()()()()){})<>>[()])}{}((({}))<(({})(({}){}){})>){({}<<>(<
>({})<>){({}<((((()()()()){}){}()){}())>[()])}{}((()()()()()){})<>>[()
])}{}{}>[()])}{}({}<>)(({})((({({})({}[()])}{})){}){}{}){({}<{}>[()])}

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
    {}

>[()])}

6502 machine code (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
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)

+1 for nostalgia (6502 assembly on a c64 was my first programming experience...)

Haskell, 43 bytes
l%n=l!!1:l++l<*[1..n]
f n=["##"%n,"# "%n]%n

Try it online!
Outputs a list of strings.

Python 2, 55 bytes
def f(n):p=[(" "*n+"#"*n)*2]*n;print(p+["#"*n*5]*n)*2+p

Try it online!
This returns a 2D list of characters.
Python 2, 65 bytes
def f(n):p=((" "*n+"#"*n)*2+"\n")*n;print(p+("#"*n*5+"\n")*n)*2+p

Try it online!
Python 2, 66 bytes
def f(n):p=[(" "*n+"#"*n)*2]*n;print'\n'.join((p+["#"*n*5]*n)*2+p)

Try it online!

Wat witchkraft is yer footer

@LeakyNun A for loop :)

No, I'm talking about the f(i); storing the result in a temp and print accessing it.

@LeakyNun Ya misunderstood: f(i) prints and print in Python 2 adds a newline :P

Oh, how stupid of me.

But you only used k and o once...

@LeakyNun I was getting rid of that right when you commented

Sad that string multiplication and addition isn't distributive...

Husk, 12 10 bytes
´Ṫ▲Ṙ" # #

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.

CJam, 27 26 25 bytes
{_[{S3*'#*'#5*}3*;]fe*e*}

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#  "  ##  ##  "]

Someone was prepared for this challenge :P

@ETHproductions It was a CMC and moved to main...

@ETHproductions Can't really blame him for that...

Perl 5, 49 + 1 (-p) = 50 bytes
$_=' # #
'=~s/./$&x$_/gre x$_;$_.=(y/ /#/r.$_)x2

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.

I like how your answer is just as readable as mine.

They've always said that Perl is a write-only language.

This is a nice solution, don't think I can improve the approach at all! You can save a couple of bytes though, although when this was originally scored, one wouldn't have saved a byte (since it involves adding -a), but using $\= instead of $_.= saves a byte at least! Try it online!

J, 23 19 bytes
' #'{~1=]+./~@#i:@2

Saved 4 bytes thanks to @LeakyNun.
Try it online!
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

Rats! Was just about to post a (4 byte longer) solution of my own. I'm really impressed by how you're able to compose these functions without caps and with few conjunctions.

@cole Thanks. Sometimes caps can be avoided by using a noun and dyad. For example, [:|:f could be 0|:f

' # '{~]#"1]#+./~@i:@2 saves a byte

repeat before multiplication gives you 19 bytes: f=:' #'{~1=]+./~@#i:@2

i:@2 throws a domain error for me in JVERSION j805/j64/darwin

@hoosierEE It's a new feature coming in J 8.06. You can try the beta http://www.jsoftware.com/download/j806/install/

@miles how did you come up with the idea for using a GCD table?  beyond sheer genius?

Charcoal, 21 bytes
ＮθＵＯ×²θ#ＵＯθ Ｆ²⟲ＯＯ²⁴⁶θ

Try it online! Link is to verbose version of code. I'd originally tried a cute bitmap approach:
Ｆ⁵Ｆ⁵Ｆ＆｜ικ¹«Ｊ×ιＩθ×κＩθＵＯθ#

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.

does charcoal really not have a hashtag shape built-in?

Did I tie charcoal O_O?

yay (hmm looks like I need to fix that a bit)

@ASCII-only What needs fixing?

Oblong shouldn't be printing the steps for the polygon it uses internally lol

Oh I meant the thing I linked lol

Yes it is, I guess it's not that important but it's still broken

Well the debug shows polygon drawing but that should be hidden as an implementation detail behind the oblong drawing

Oh oops sorry copied wrong link lol :/

J, 22 bytes
#('# '{~#:5$21,0)#~"1]

Try it online!
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.

##"1&('# '{~#:5$21,0) saves a byte.

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!
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.             "#####",
                                                              " # # ",
                                                              "#####",
                                                              " # # "]

Nice observation regarding bitwise or - save two bytes by switching from or to and - removing the need to lower, allowing an implicit range and removing the need for µ (or the ⁸ you could have had there instead)... 5ẋ€Ẏ&þ`ị⁾ #

@JonathanAllan Interesting--why does 5Ḷẋ€ require the µ, but not 5ẋ€?

I thought the need was just to stop Ẏ acting on n and then passing it to the right of ẋ€, since with a nilad-dyad leading chain being called monadically it's not necessary. I'm not quite sure, however, how \`` seems to then place 5 (or maybe the list of that length) on the right of the tabled &` though.

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.

I think this is the first GML answer i've ever seen

@TimothyGroote It's a shame it isn't used more, its optional brackets and semicolons are great for golfing :)

Brain-Flak, 338 332 bytes
6 bytes thanks to Riley.
(({}<>)<(())>)(()()()()()){({}<(<>)<>{({}<<>({}<(((((()()()()())){})){}{}{})<>([({})]()){(<{}({}<((((({}))){}){}{}){({}<<>(({}))<>>[()])}{}>)>)}{}(({})<{{}(<(()()()()()){({}<<>(<([{}](((((()()){}){}){}){}()){}())>)<>{({}<<>({}<(({}))>())<>>[()])}<>({}<>{})>[()])}{}>)}>{})<>((()()()()()){})>())<>>[()])}<>({}<>{}<([{}]())>)>[()])}<>

Try it online!
More "readable" version
(({}<>)<(())>)(()()()()())
{({}<(<>)<>{({}<<>({}<(((((()()()()())){})){}{}{})<>
  ([({})]()){(<{}({}<
    ((((({}))){}){}{}){({}<<>(({}))<>>[()])}{}
  >)>)}{}(({})<{{}(<
    (()()()()()){({}<<>(<([{}](((((()()){}){}){}){}()){}())>)<>{({}<<>({}<(({}))>())<>>[()])}<>({}<>{})>[()])}{}
  >)}>{})
<>((()()()()()){})>())<>>[()])}<>({}<>{}<([{}]())>)>[()])}<>

Try it online!

(({})<>)(())<>({}<>) at the beginning can be replaced with (({}<>)<(())>)

05AB1E, 25 22 21 bytes
•LQ•bûε×}5ôεS„# èJ¹F=

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.

Reflection... is not the answer in 05AB1E, though it seems like it could be...

5ôεS„# èJ¹F= saves a byte.

@Emigna would canvas be good for this?

Possibly. I haven't tried the canvas yet so I'm not really sure of its capabilities. Seems like something it's made for.

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.

Python 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!
Obviously not the shortest solution, but I think it's decent. Any feedback would be appreciated!

a,b,c=input()," #" should save some bytes.

@DJMcMayhem That gave me an error. Did you mean a,b,c=input(),"#"," "? Which isn't any shorter...I appreciate the help!

Oh, sorry. I assumed that worked because a,b="# " works.

a=input();b,c="# " will work and save bytes

You can also get get rid of the parens in (i==2) and add a space to the beginning.

@WheatWizard Fantastic! Thanks for your help. Down to 112.

110 bytes by removing the parens around the print statements

102 bytes since 2 is the last iteration of range, so we can just only do the last exec if i < 2

96 bytes by taking out range

@StepHen Those are fantastic. I also got rid of some excess chars in the 1st print. The last spaces. Thanks for your help!

@BraedenSmith yep, you bet! You might need to change i<2 to i<"2" for it to work. Otherwise, welcome to PPCG, golfing is fun :)

76 bytes

71 bytes

67 bytes

66 bytes as a function

@HyperNeutrino. Wow! That's great golfing :). I added it to the original.

Befunge, 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!

Could you add a link to an online interpreter? https://tio.run/#befunge is a good one AFAIK.

brainfuck, 224 bytes
,[->+>>>>+<<<<<]>>>+>+++++[-<<<[->+>>>>>+>+++++[-<<<[->+<<<[->>>>>>+<<[->>>+>---<<<<]<<<<]>>>>>>[-<<<<<<+>>>>>>]>[-<<<+>>>]+++++[->+++++++<]>.[-]<<<<<<]>[-<+>]>[-<->]<+[->+<]>>]<<++++++++++.[-]<<<<<]>[-<+>]>[-<->]<+[->+<]>>]

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!

MAWP 2.0, 46 bytes
@!!!"#"*/" "*\+2*"
"+*!:/!5*"#"*"
"+*!:\!:/:/:

Try it!

SOGL (SOGLOnline commit 2940dbe), 15 bytes
ø─Ζ┘Χ⁴‘5n{.∙.*T

To run this, download this 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!

"commit 2940dbe" - I like that idea. Can you explain why ø─Ζ┘Χ⁴‘ pushes that though?

@MagicOctopusUrn That's SOGLs compression, which here stores a dictionary of " " and # and the base-2 data required for that string.

Neat, is it stable enough for me to start using :)?

@MagicOctopusUrn Well it's pretty stable as there have been no answer-breaking changes since SOGLOnline, but whether you can use it (as in understand it) is another question. You can try though and ask question in TNB

Haha... Ill wait for documentation then. I do need coddled a little.

@MagicOctopusUrn there is some documentation on the characters, though I don't really know where to start for a full documentation (and is it even worth it)

You absolutely MURDER ASCII challenges, so... imho I believe SOGL would be the next Jelly in terms of some challenges if you made it accessible to new people.

C (gcc), 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!

Gaia, 9 bytes
 # ”ṫ&:Ṁ‡

Pretty much a port of Zgarb's great answer
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

Canvas, 11 bytes
 #¶##┼∙┼╶╶＊

Try it here!
Explanation:
 #¶##         push "#\n##"
     ┼        quad-palindromize with 1 overlap
      ∙┼      quad-palindromize with 1 overlap again
        ╶╶＊  expand vertically and horizontally by the input

PowerShell, 72 68 63 60 bytes
param($a)(,($x=,((' '*$a+"#"*$a)*2)*$a)+,("#"*5*$a)*$a)*2;$x

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.

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!
Returns 2D list of characters.

Pyth, 28 22 bytes
-6 bytes thanks to @LeakyNun
JsC*]S5Qjmsm@"# "*kdJJ

Test Suite.

22 bytes

@LeakyNun Thanks, I didn't really golf this answer so far.

Dyalog APL, 35 30 28 26 bytes
2 bytes saved thanks to @ngn
' #'[∘.{∨/2|⌊⍺⍵÷k}⍨⍳5×k←⎕]

Try it online!
With ⎕IO←0.

Nice. k÷⍨⍺ ⍵ could be ⍺⍵÷k

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, ##]

ArrayFlatten is very nice.

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!
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 '#'

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]

Long time, no see :-)

Yes, it has! @ETHproductions

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
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

You can place the int s=5*n,x=0,y instead the for-loop to save a byte on the semicolon.

R, 87 85 62 bytes
m=matrix(" ",x<-scan()*5,x);m[s,]=m[,s<-rep(!1:0,e=x/5)]="#";m

2 bytes saved by representing c(F,T) as !1:0, thanks to LeakyNun
23 bytes saved thanks to Giuseppe
Try it online!
Explanation (ungolfed):
x=scan()*5              # Multiply input by 5 to get the required width/height of the matrix
m=matrix(" ",x,x)       # Create a matrix of the required dimensions
s=rep(!1:0,each=x/5)    # The sequence s consists of F repeated n times, followed by T repeated n times
m[s,]="#"               # Use s as logical indices to set those rows as "#" characters.
                        # R recycles the sequence to the height of the matrix.
m[,s]="#"               # Same, with columns
write(m,"",x,,"")       # Print out across the required number of columns

It doesn't work on TIO because it scans the next line, which is a code.

replace newlines with semicolons to solve the problem

85 bytes

78 bytes

67 bytes with a function

@Giuseppe Good suggestions! In that last example, the savings come from  outputting a matrix rather than a single string. So can we just keep scan() and replace the write command with just m?

Also, a bit off-topic, but when does R allow you to abbreviate function arguments, as you did with each? I swear every time I try it, it fails (e.g. cat(..., s = "") does not work).

I don't know... I'm not 100% sure how R returns values; simply returning m in that case might only be a snippet unless executed in a REPL (which prints something by default). I believe R has partial matching of named arguments if there's not a ... but I usually just try it and move on if it doesn't work, although I did know that rep had this behavior

Excel, 133 bytes
=REPT(REPT(REPT(REPT(" ",A1)&REPT("#",A1),2)&"
",A1)&REPT(REPT("#",5*A1)&"
",A1),2)&REPT(REPT(REPT(" ",A1)&REPT("#",A1),2)&"
",A1)

TeX, 240 bytes
\newcommand{\f}[1]{\h{\g{#1}{\h{\hphantom{\g{#1}{\#}}}{\g{#1}{\#}}\\}}{\g{#1}{\h{\g{#1}{\#}}{\g{#1}{\#}}\\}}}\newcommand{\g}[2]{\begingroup\count0=1\loop#2%
\advance\count0 by 1\ifnum\count0<#1\repeat\endgroup}\newcommand{\h}[2]{#1#2#1#2#1}

Example usage
\documentclass[12pt,a4paper]{article}
\begin{document}
\newcommand{\f}[1]{\h{\g{#1}{\h{\hphantom{\g{#1}{\#}}}{\g{#1}{\#}}\\}}{\g{#1}{\h{\g{#1}{\#}}{\g{#1}{\#}}\\}}}\newcommand{\g}[2]{\begingroup\count0=1\loop#2%
\advance\count0 by 1\ifnum\count0<#1\repeat\endgroup}\newcommand{\h}[2]{#1#2#1#2#1}

\noindent\texttt{\f{8}}
\end{document}

Octave, 39 bytes
@(n)[kron(max(a=' # # ',a'),!!e(n)) '']

Try it online!
Explanation:
m = max(a=' # # ',a')  % Computes elementwise maximum of `a` and its transpose.

Since they have different dimensions broadcasting occurs and a 5*5 matrix (Octothorpe ASCII art of size 1) is generated.
One = !!e(n);          % a n*n matrix of ones
kron(m , One)          % form the Kronecker product of 'm' and 'One'
                       % so each character converted to a n*n matrix of that character.

[  ... '']             % convert ASCII numeric values to char

Can you explain what this does?

@MarkS. Explanations added.

APL (Dyalog), 16 bytes
' #'[∘.⌈⍨⎕/5⍴⍳2]

Try it online!
' #'[…] index the string with
 ⍳2 first two ɩntegers; [1,2]
 5⍴ cyclically reshape to length five; [1,2,1,2,1]
 ⎕/ get input (mnemonic: console) and use that to replicate, e.g. 2 → [1,1,2,2,1,1,2,2,1,1]
 ∘.⌈⍨ maximum table; [[1,1,2,2,1,1,2,2,1,1],[1,1,2,2,1,1,2,2,1,1],[2,2,2,2,…

Stax, 10 bytes
┐/Θô¥+○╬µ^

Run and debug it
uses Zgarb's idea.

05AB1E, 16 12 bytes
-4 thanks to ovs.
„# 5LI×SDδ&è

Try it online! Outputs as a list of lists of characters of lines. Link includes a footer to format the output.

12 bytes using δ.

@ovs Thanks! I knew I was underusing that

Recursiva, 56 44 bytes
P+D+*aGD+*' 'a*'#'a*aG**5a'#'*aGD+*' 'a*'#'a

Try it online!

PHP, 117, 114, 112, 111 110 bytes
Php isn't optimal for short code, but it less bad than expected. Open with ?a=5 in the url
for(;$i++<$_GET[a];){$a.="oxox
";$b.="xxxxx
";$c.=' ';$d.='#';}echo str_replace([o,x],[$c,$d],$a.$b.$a.$b.$a);

Or a little longer, but similar
PHP 113 bytes
for(;$i++<$_GET[a];){$a.=oxoxoN;$b.=xxxxxN;$c.=' ';$d.='#';}echo str_replace([o,x,N],[$c,$d,"
"],$a.$b.$a.$b.$a);

With a normal PHP installation, you need <?php or at a minimum (shorttags on) <? as a preface to switch from echoing the text to running actual code. Where I commented on this elsewhere I was told there was a command-line override (which itself should mean an extra byte) but here you imply running in the normal server->browser mode with "?a=5 in the url" so it should be +2 for <? added at the beginning.

APL (Dyalog), 21 bytes
(⍴⍴'#'/⍨,)∘.⌈⍨¯1*⎕/⍳5

Try it online!

Way too complicated. See?

cool :) yours would be hard to beat

Cubically [Variant], 163 102 bytes
■f₀₂f₁₅D₁D₃B₀B₂D₁D₃B₄D₁D₃$-₀(+f₄6:7(f₅6-₀(+f₂6:7(f₃6*₅4₀+2₀@1⁶:3₁-)6:2₀-)6@₀:5₁-)6:4₀-)6

This is a variant of Cubically. It isn't as fun to use as the original, but it can complete certain challenges the original can't. For example, this variant has a command to set the value of each square on a face, which makes it a lot easier to store values in memory, although the number of values you can store this way is limited to the number of faces on the cube (6). You'll also see some constant values that don't need to be pulled from faces or stored in the notepad before use. For example, ₂ which passes the value 32 to the command.
I don't think I'll be changing the language enough to break this code in the future (f is changing to ƒ but does the same thing), but because this branch of the language is constantly changing, I've included a link to the commit this can run on in the header.
This solution creates a 5x5x5 cube and sets the left face to this:
01010
11111
01010
11111
01010

It then sets the value of face 0's squares to 32 and the value of face 1's and face 2's squares to 35, essentially creating a 1-width octothorpe on the left of the cube:
 # #
#####
 # #
#####
 # #

Then it goes through each square on the left face and enlarges it.
How it works
■                   Set the cube to a new 5x5x5 cube
f₀₂f₁₅             Set face 0's values to 32 and face 1's values to 35
D₁D₃B₀B₂D₁D₃B₄D₁D₃ Create an octothorpe on face 1
$                    Input a number
-₀(                 Set the notepad to -5, and loop while notepad != 0
  +                   Add 5 to the notepad
  f₄6                  Set face 4's values to the notepad
  :7(                  Set the notepad to the input, and loop while notepad != 0
    f₅6                  Set face 5's values to the notepad
    -₀(                 Set the notepad to -5, and loop while notepad != 0
      +                   Add 5 to the notepad
      f₂6                  Set face 2's values to the notepad
      :7(                  Set the notepad to the input, and loop while notepad != 0
        f₃6                  Set face 3's values to the notepad
        *₅4₀                 Set the notepad to the value of the first square on the 4th face times 5
        +2₀                  Add the value of the first square on the 2nd face
        @1⁶                  Output the character with the ASCII value equal to the square on the 1st face with index equal to the notepad
        :3₁-                Set the notepad to the first square on the 3rd face minus 1
      )6
      :2₀-                Set the notepad to the first square on the 2nd face minus 4
    )6
    @₀                  Output \n
    :5₁-              Set the notepad to the first square on the 5th face minus 1
  )6
  :4₀-              Set the notepad to the first square on the 4th face minus 4
)6

I've actually found a way to easily create the octothorpe with only values from two faces, but I need to fix a bug in the language before that will work. It would open up the possibility of looping through the x-coordinate on the top face which would (most likely) shorten the answer. Bug was fixed but it didn't affect whether that solution would work or not, so I've updated this answer.

Mathematica, 59 bytes
Table[If[OddQ@*Ceiling/@(i/#&&j/#)," ","#"],{i,5#},{j,5#}]&

Explanation
The input is #. Make a Table that's 5#(implied multiplication) by 5# where the variables i and j range from 1(default) to 5#. The entries in the table will be " " or "#" depending on If a condition is true.
The condition is a little complicated. Ungolfed, it's equivalent to And[Composition[OddQ, Ceiling][i/#],Composition[OddQ, Ceiling][j/#]]. We test if the Ceiling of i/# is odd And similarly for j/#. But this is golfed into OddQ@*Ceiling/@(i/#&&j/#) by:

Using the fact that Map works for anything, not just lists, so we can write this as Map[Composition[OddQ, Ceiling],And[i/#,j/#]]
Using the facts that &&, /@, and @* are infixes for And, Map, and Composition, respectively (adding parentheses to handle the fact that && doesn't have higher precedence than /@).

Try it online
You can try this in the Wolfram Cloud Sandbox by pasting code like:
Table[If[OddQ@*Ceiling/@(i/#&&j/#)," ","#"],{i,5#},{j,5#}]&@4//Grid

and pressing Shift+Enter or numpad Enter or clicking Gear>Evaluate cell.

C# (.NET Core), 225 192 169 165 161 160 158 bytes
using System;class P{static void Main(string[]args){for(int n=int.Parse(args[0]),d=5*n,i=0;i<d*d;)Console.Write(" ##"[i/d/n%2+i%d/n%2]+(i++%d<d-1?"":"\n"));}}

Try it online!
Explanation:
Using the 1D array (representing a 2D array) row and column approach from before, I changed the area array to be the symbols to print, and as such, there are only two types of rows. The i/d/n%2*5 selects the appropriate row in the string array, and i%d/n selects the column.
Update
I simplified the string further, as each row has repetitions, so now it only looks at the first two characters of each row. Actually, I got the string down a # and simplified the equation. I'm sure the equation and the newline calculation could be shortened.
for(int n=int.Parse(args[0]),d=5*n,i=0;i<d*d;)
{
    Console.Write(" ##"[i/d/n%2+i%d/n%2]+(i++%d<d-1?"":"\n"));
}

Treat the octothorpe as a 5x5 area
var x=new[]{0,1,0,1,0}

The areas are accessed by a 1D array, where if the index is in a given area print " " otherwise print "#". Each area is determined by row and column position, i/d and i%d, respectively, then adjusted given n. Using x, both horizontally and vertically, gives the different areas as (0,0), (0,1), (1,0), and (1,1). If the area is (0,0) it should be " ", otherwise use "#".
for(;i<d*d;)
{
    Console.Write((x[i/d/n]+x[i%d/n]<1?" ":"#")+(i++%d==d-1?"\n":""));
}

(First time on code-golf, so comments or suggestions appreciated)

144 bytes

Actually, 29 bytes
5R@♀α♂i╗╜⌠╝╜⌠╛*2@%"# "E⌡MΣ⌡Mi

Try it online!

28 bytes. You can output as a list of lines.

@Mego but it doesn't work

@LeakyNun Oh right, the space is important. Nevermind.

Alice, 36 bytes
/a/E #...##Sd
\i&''d?!''yy'??dS.o!@/

Try it online!
Explanation
This is a standard ordinal mode program, with two modifications:

The & command is run in cardinal mode.  This allows the input to be taken as an integer.  This also forces the & to be run in ordinal mode later.  While & can be skipped with #, in this case I arrange for it to be a no-op.
The end is flattened a bit to allow a space literal to be encoded in empty space, saving a byte.

The linearized program is as follows:
i&' d.!.'#yd?d.!a&E'#?.'#yS' ?So@

i          take input
           STACK: ["2"]
&'(space)  push " " that many times
           STACK: [" ", " "]
d          push the concatenation of the entire stack
           STACK: [" ", " ", "  "]
.!         copy this string to tape
.'#y       change all characters to #
           STACK: [" ", " ", "##"]
d          concatenate stack again
           STACK: [" ", " ", "##", "  ##"]
?d         copy string back from tape and concatenate stack again
           STACK: [" ", " ", "##", "  ##", "  ", "  ##  ##  "]
           everything below the current top of the stack is irrelevant to the rest of the program
.!         copy string to stack: this will be used to set up individual rows
a&         for every character in "\n" (all 1 of them):
  E        place that character between every pair of characters
           this will put each character on one line, to be replaced by entire rows
           STACK: [..., " \n \n#\n#\n \n \n#\n#\n \n "]
'#         push "#" on the stack
?          copy string from stack
.'#y       replace all characters with #
           STACK: [..., " \n \n#\n#\n \n \n#\n#\n \n ", "#", "##########"]
S          substitute: replace each # with a full row of #s
' ?S       replace each space with the row "  ##  ##  " created earlier
o          output
@          terminate

TXR Lisp, 158 141 133 124 122 bytes
(do each((i #1=(range* 0(* @1 5))))(each((j #1#))(pprint[[(repeat'(" # # ""#####"))(trunc i @1)](trunc j @1)]))(put-line))

Uncondensed:
(do each ((i #1=(range* 0 (* @1 5))))
  (each ((j #1#))
    (pprint [[(repeat '(" # # " "#####")) (trunc i @1)] (trunc j @1)]))
  (put-line))

Simply scale the basic 5x5 "bitmap" by backwards mapping from screen character coordinates into the texture.
Run:
1> (do each((i #1=(range* 0(* @1 5))))(each((j #1#))(pprint[[(repeat'(" # # ""#####"))(trunc i @1)](trunc j @1)]))(put-line))
#<interpreted fun: lambda (#:arg-01-0169 . #:rest-0168)>
2> [*1 1]
 # #
#####
 # #
#####
 # #
nil
3> [*1 3]
   ###   ###
   ###   ###
   ###   ###
###############
###############
###############
   ###   ###
   ###   ###
   ###   ###
###############
###############
###############
   ###   ###
   ###   ###
   ###   ###
nil
4> [*1 4]
    ####    ####
    ####    ####
    ####    ####
    ####    ####
####################
####################
####################
####################
    ####    ####
    ####    ####
    ####    ####
    ####    ####
####################
####################
####################
####################
    ####    ####
    ####    ####
    ####    ####
    ####    ####
nil

Vyxal, 28 bytes
ð\#3*+2/2(ƛøm;øm)ƛƛ?*;ṅ;ƛ?(,

Try it Online!
What. A. Mess.

Jelly, 10 bytes
⁾ #ŒḄ⁺xµ»þ

Try it online!
Another one using Zgarb's idea.
   ŒḄ         Palindromize
⁾ #           " #".
     ⁺        Palindromize it again. (" # # ")
      x       Repeat that by the input,
       µ»þ    then table it with itself by maximum.


text:
Mario Kart Scoring w/ Ties
I ran into this problem while working on another challenge I'm making for this site. In that challenge I utilize "Mario Kart 8 Scoring". The amount of points the player in kth place gets is represented by this 1-indexed array: [15,12,10,9,8,7,6,5,4,3,2,1]. So 1st place gets 15 points, 2nd place gets 12 points, etc.
It's easy enough to assign points like this, however the tricky part comes with how I handle ties. What I do is give each tying player the average of the points given for each tying place. For example, if only 1st and 2nd tied, then both players get (15+12)/2 = 13.5 points. (Note: You're allowed to round to the nearest int, so 13 or 14 are both also acceptable.) Then 3rd - 12th place get the normal amount of points for their position.
Challenge
Given 12 non-negative integer scores that are decreasingly sorted, output the number of points each player gets. You can also take the points list [15,12,10,9,...] as input. Note that the number of points each player gets does not depend on the actual values of the scores, but how they compare to the other scores.
Test Cases

[21,21,15,14,12,9,6,5,4,3,2,1] => [14,14,10,9,8,7,6,5,4,3,2,1]
[20,15,15,15,10,9,8,7,6,5,4,3] => [15,10,10,10,8,7,6,5,4,3,2,1]

explanation: (12+10+9)/3 = 10.3333

[1,1,1,1,1,1,1,1,1,1,1,1] => [7,7,7,7,7,7,7,7,7,7,7,7]

explanation: (15+12+10+9+8+7+6+5+4+3+2+1)/12 = 6.8333

[20,20,20,20,10,10,10,9,8,7,6,5] => [12,12,12,12,7,7,7,5,4,3,2,1]

explanation: (15+12+10+9)/4 = 11.5, (8+7+6)/3 = 7

[100,99,98,95,95,95,94,93,93,92,91,91] => [15,12,10,8,8,8,6,5,5,3,2,2]

explanation: (9+8+7)/3 = 8, (5+4)/2 = 4.5, (2+1)/2 = 1.5

Related: Rank a list of scores with "skips"

JavaScript (ES6), 57 bytes
Takes input in currying syntax (p)(s), where p is the list of points and s is the list of scores.
p=>s=>s.map(v=>s.reduce((t,x,i)=>x-v?t:t+p[n++,i],n=0)/n)

Test cases

let f =

p=>s=>s.map(v=>s.reduce((t,x,i)=>x-v?t:t+p[n++,i],n=0)/n)

points = [15,12,10,9,8,7,6,5,4,3,2,1];

console.log(JSON.stringify(f(points)([21,21,15,14,12,9,6,5,4,3,2,1])))
console.log(JSON.stringify(f(points)([20,15,15,15,10,9,8,7,6,5,4,3])))
console.log(JSON.stringify(f(points)([1,1,1,1,1,1,1,1,1,1,1,1])))
console.log(JSON.stringify(f(points)([20,20,20,20,10,10,10,9,8,7,6,5])))
console.log(JSON.stringify(f(points)([100,99,98,95,95,95,94,93,93,92,91,91])))

R, 3 bytes
Apparently R has a built-in for this. Takes a list of points and scores as input.
ave

Try it online!
Example:
p=c(15,12,10,9,8,7,6,5,4,3,2,1)

> ave(p,c(20,15,15,15,10,9,8,7,6,5,4,3))
 [1] 15.00000 10.33333 10.33333 10.33333  8.00000  7.00000  6.00000  5.00000  4.00000  3.00000  2.00000  1.00000
> ave(p,c(1,1,1,1,1,1,1,1,1,1,1,1))
 [1] 6.833333 6.833333 6.833333 6.833333 6.833333 6.833333 6.833333 6.833333 6.833333 6.833333 6.833333 6.833333

Right tool for the job!

This should be 3 bytes (just ave) otherwise it's just a snippet (which isn't allowed). Fortunately, this saves you 5 bytes.

@caird thanks, you're absolutely right.

Perl 5, 109 +1 (-a) = 110 bytes
@p=(1..10,12,15);while(@F){$/=$,=0;do{$,++;$/+=pop@p}while($w=shift@F)==$F[0];push@r,(int.5+$//$,)x$,}say"@r"

Try it online!
Includes 17 bytes to hardcode the point values.

MATL, 12 10 bytes
2 bytes off thanks to @geokavel!
7#uti2XQw)

Inputs are a column vector (; as separator) of integer scores and a column vector with the points. The output contains the results separated by newlines.
Try it online!
Or verify all test cases.
Explanation
       % Implicitly take first input.
       % STACK: [21;21;15;14;12;9;6;5;4;3;2;1]
7#u    % Unique consecutive integer labels
       % STACK: [1;1;2;3;4;5;6;7;8;9;10;11]
t      % Duplicate
       % STACK: [1;1;2;3;4;5;6;7;8;9;10;11], [1;1;2;3;4;5;6;7;8;9;10;11]
i      % Take second input
       % STACK: [1;1;2;3;4;5;6;7;8;9;10;11], [1;1;2;3;4;5;6;7;8;9;10;11], [15;12;10;9;8;7;6;5;4;3;2;1]
2XQ    % Average second argument as grouped by the first
       % STACK: [1;1;2;3;4;5;6;7;8;9;10;11], [13.5;10;9;8;7;6;5;4;3;2;1]
w      % Swap
       % STACK: [[13.5;10;9;8;7;6;5;4;3;2;1], [1;1;2;3;4;5;6;7;8;9;10;11]
)      % Reference indexing
       % STACK: [13.5;10;9;8;7;6;5;4;3;2;1]
       % Implicitly display

Nics solution! I think you can save some bytes by not rounding to nearest int (it's not required).

@geokavel Oh, you are right! I misread the challenge as requering rounding. Thanks!

05AB1E, 12 bytes
γ€g£vygFyÅAˆ

Try it online!
Explanation
γ              # group the scores into chunks of consecutive equal elements
 €g            # get the length of each chunk
   £           # split the points list into chunks of these sizes
    v          # for each chunk y in the points list
     ygF       # len(y) times do:
        yÅA    # get the arithmetic mean of y
           ˆ   # add to global list
               # implicitly output global list

Jelly, 11 bytes
ṁ⁴Œg¤Æmṁ$€F

Try it online!
-3 bytes thanks to fireflame for noticing new Jelly features :D

Yeah, it's probably too long looking at how short the solutions on the related challenge are.

@geokavel the annoying thing is that the code to generate the list is longer than the J solution on that one ;_;

I forgot to put that you can take the points list as input too. I'm going to add that.

11 bytes. Uses the new arithmetic mean monad instead of S÷L and mold instead of xL, which allows $ instead of two µ.

I was planning on implementing a key quick in Jelly. If I had gotten around to it, based on the J solution, something like xÆm$ƙ might have existed.

@fireflame241 o cool, thanks!

Introducing the key quick ƙ. Now solvable (but noncompeting since the feature was introduced after the challenge) in 6 bytes: Æmṁ$ƙẎ

@miles Non-competing is not really a thing anymore.

10 bytes

J, 15 bytes
[:;<@(##+/%#)/.

Try it online!
Takes the list of scores (1 2 ... 12 15) as a right-hand argument and the   values to score as a left-hand argument. If this isn't a logical input, add 1 byte for a ~-passive to invert the order in which the inputs are taken.
There might be a few things to golf, which include

My usage of boxing
The cap at the end

Explanation
I'll split this into a couple functions.
avg_and_dupe =. # # +/ % #
score        =. [: ; <@avg_and_dupe/.

avg_and_dupe takes the average of a list and duplicates it as many times as the list's length
score scores an input (left argument) given a list of scores (right argument).

avg_and_dupe
# # +/ % #
#           Length
  #         Copy as many times as the left argument
    +/ % #  Average
    +/       Sum
       %     Divided by
         #   Length

This works so nicely because it's treated as two forks. If you're still scratching your head (I know I was at first), ask and I can provide a more in-depth explanation for why this works as it does.
score
[: ; <@avg_and_dupe/.
                   /.  Key: using the values given, partition the scores
     <@avg_and_dupe     For each partition:
       avg_and_dupe      Average and duplicate
     <                   Then box
   ;                   Raze the boxes into a single list

If it's still confusing, I can also add an explanation for /.-key, but I think the wiki page explains it pretty well.

Note that OP added You can also take the points list [15,12,10,9,...] as input. if that saves you any bytes

C# (.NET Core), 154 bytes
x=>s=>{for(int i=0;i<12;){int b=0,j=i,a=0,c=0;for(;j<12&&x[i]==x[j];j++,b++){a+=s[j];}a=(int)Math.Round(a/(b+.0));for(;c<b;c++){x[i+c]=a;}i+=b;}return x;}

Try it online!
C# (.NET Core) + using Linq, 170 + 23 bytes
x=>s=>x.GroupBy(z=>z).Select(y=>Enumerable.Repeat(Math.Round(s.Skip(Array.IndexOf(x,y.Key)).Take(y.Count()).Average()),y.Count())).Aggregate((a,b)=>a.Concat(b)).ToArray()

Try it online!

Python 2, 66 bytes
-8 bytes thanks to Leaky Nun.
lambda s,p:[sum(p[s.index(i):][:s.count(i)])/s.count(i)for i in s]

Try it online!

Python 3, 67 bytes
lambda s,p:[sum(v for j,v in zip(s,p)if j==i)/s.count(i)for i in s]

Try it online!
Python 2, 108 70 bytes
lambda s,p:[1.*sum(v for j,v in zip(s,p)if j==i)/s.count(i)for i in s]

Try it online!

Haskell, 152 bytes
f::[Int]->[Int]
f=concat.g(15:12:[10,9..1])[]
g[q]t _=[q:t]
g(q:r)t(x:z)|x>head z=(replicate(l(q:t))(sum(q:t)`div`l(q:t))):g r[]z|1<2=g
r(q:t)z
l=length

It's a pain to import groupBy and on, so I had to do my own.
Averaging function will be shortened shortly.
Needing the signature could probably be avoided with compiler flags.

Python 3, 72 bytes
lambda s,p:[sum(p[s.index(i):12-s[::-1].index(i)])/s.count(i)for i in s]

Try it online!

Proton, 62 bytes
(s,p)=>[sum(p[s.index(i)to][to s.count(i)])/s.count(i)for i:s]

Try it online!
Proton, 63 bytes
(s,p)=>map(i=>sum(p[s.index(i)to][to s.count(i)])/s.count(i),s)

Try it online!

^^ I'm just gonna start with Proton next time lol.

Dyalog APL, 14 bytes
∊{(⊂≢⍴+/÷≢)⍵}⌸

Takes the list of scores as left argument and points list as right argument. Add 2 bytes for wrapping it in () if called directly and not as a named function.
{...}⌸ group right argument by key in left argument and apply function in braces to each group (key operator).
⊂≢⍴+/÷≢ is a fork where:
+/÷≢ is average points for group (sum divided by tally)
≢⍴ tally reshape (replicate the average to match number of items in group)
⊂ boxes the result (this is to counteract the mixing of the result that the key operator applies)
∊ is enlist and flattens the result of the key operator (which is a nested vector of vectors) into a simple list.
TryAPL online