text:
Print the f × f times table
Your task is to print the hexidecimal times table:
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
00 02 04 06 08 0a 0c 0e 10 12 14 16 18 1a 1c 1e
00 03 06 09 0c 0f 12 15 18 1b 1e 21 24 27 2a 2d
00 04 08 0c 10 14 18 1c 20 24 28 2c 30 34 38 3c
00 05 0a 0f 14 19 1e 23 28 2d 32 37 3c 41 46 4b
00 06 0c 12 18 1e 24 2a 30 36 3c 42 48 4e 54 5a
00 07 0e 15 1c 23 2a 31 38 3f 46 4d 54 5b 62 69
00 08 10 18 20 28 30 38 40 48 50 58 60 68 70 78
00 09 12 1b 24 2d 36 3f 48 51 5a 63 6c 75 7e 87
00 0a 14 1e 28 32 3c 46 50 5a 64 6e 78 82 8c 96
00 0b 16 21 2c 37 42 4d 58 63 6e 79 84 8f 9a a5
00 0c 18 24 30 3c 48 54 60 6c 78 84 90 9c a8 b4
00 0d 1a 27 34 41 4e 5b 68 75 82 8f 9c a9 b6 c3
00 0e 1c 2a 38 46 54 62 70 7e 8c 9a a8 b6 c4 d2
00 0f 1e 2d 3c 4b 5a 69 78 87 96 a5 b4 c3 d2 e1

Specifications:

You can print the hex values in uppercase.
Your lines can end with a trailing space and the program output
can end with a trailing newline.
Every hex value must be padded to 2 digits with 0s as shown.

This is code-golf, so the shortest answer (measured in bytes) wins.

Related

Also related

Multiplication tables don't usually include factor 0... :-)

@Luis Mendo: How else will school children be able to memorize what 0 times a number is? :P

@milk It's simpler in many languages to start counting from 0.

Darn, I wanted to make a solution using hexdump, but that groups into 4-byte blocks. :(

@HyperNeutrino: You can tell how to format, with eg. hexdump -e'16/1 "%02X ""␤"'.

Can we have more space between columns if we're consistent?

Stax, 11 bytes
äΔ←ùûv╚ö♦.J

Run and debug it

Jelly, 12 bytes
⁴Ḷ×þ`d⁴‘ịØhG

Try it online!
How it works
⁴Ḷ×þ`d⁴‘ịØhG  Main link. No arguments.

⁴             Set the return value to 16.
 Ḷ            Unlength; yield [0, ..., 15].
  ×þ`         Build the multiplication table of [0, ..., 15] and itself.
     d⁴       Divmod 16; yield [p : 16, p % 16] for each product p.
       ‘      Increment quotients and remainders (1-based indexing).
        ịØh   Index into the lowercase hexadecimal alphabet.
           G  Grid; join columns by spaces, rows by newlines.

That's 12 characters, not bytes. According to the question, answer is measured in bytes, and your answer is 25 bytes and 12 characters. At least according to this website https://mothereff.in/byte-counter

In UTF-8, sure. However, Jelly uses a SBCS, so each character can be encoded using a single byte.

Python 2, 60 bytes
for n in range(256):r=n%16;print'%02x%s'%(n/16*r,r/15*'\n'),

Try it online!
How it works
For all integers n from 0 to 255, we do the following.

We compute (n / 16) × (n % 16).
Over the range of n, both n / 16 and n % 16 independently cover the range 0, …, 15, so this generates all entries of the multiplication table.

We repeat the linefeed character ('\n') (n % 16) / 15 times, which results in the same character when n % 16 = 15 and an empty string otherwise.

The format string '%02x%s' turns the two previous results into a single string, first a lowercase hexadecimal integer representation, zero-padded to (at least) two digits, then the generated string.

Finally, print..., prints the formatted results.
Since the print statement ends with a comma, Python will not append a linefeed. Also, before printing the next string, Python will prepend a space unless we're at the beginning of a new line. (source) This happens to format the output exactly like we want to.

R, 42 bytes
as.hexmode(sapply(0:15,function(x)x*0:15))

Prints the following:
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16]
 [1,] "00" "00" "00" "00" "00" "00" "00" "00" "00" "00"  "00"  "00"  "00"  "00"  "00"  "00"
 [2,] "00" "01" "02" "03" "04" "05" "06" "07" "08" "09"  "0a"  "0b"  "0c"  "0d"  "0e"  "0f"
 [3,] "00" "02" "04" "06" "08" "0a" "0c" "0e" "10" "12"  "14"  "16"  "18"  "1a"  "1c"  "1e"
 [4,] "00" "03" "06" "09" "0c" "0f" "12" "15" "18" "1b"  "1e"  "21"  "24"  "27"  "2a"  "2d"
 [5,] "00" "04" "08" "0c" "10" "14" "18" "1c" "20" "24"  "28"  "2c"  "30"  "34"  "38"  "3c"
 [6,] "00" "05" "0a" "0f" "14" "19" "1e" "23" "28" "2d"  "32"  "37"  "3c"  "41"  "46"  "4b"
 [7,] "00" "06" "0c" "12" "18" "1e" "24" "2a" "30" "36"  "3c"  "42"  "48"  "4e"  "54"  "5a"
 [8,] "00" "07" "0e" "15" "1c" "23" "2a" "31" "38" "3f"  "46"  "4d"  "54"  "5b"  "62"  "69"
 [9,] "00" "08" "10" "18" "20" "28" "30" "38" "40" "48"  "50"  "58"  "60"  "68"  "70"  "78"
[10,] "00" "09" "12" "1b" "24" "2d" "36" "3f" "48" "51"  "5a"  "63"  "6c"  "75"  "7e"  "87"
[11,] "00" "0a" "14" "1e" "28" "32" "3c" "46" "50" "5a"  "64"  "6e"  "78"  "82"  "8c"  "96"
[12,] "00" "0b" "16" "21" "2c" "37" "42" "4d" "58" "63"  "6e"  "79"  "84"  "8f"  "9a"  "a5"
[13,] "00" "0c" "18" "24" "30" "3c" "48" "54" "60" "6c"  "78"  "84"  "90"  "9c"  "a8"  "b4"
[14,] "00" "0d" "1a" "27" "34" "41" "4e" "5b" "68" "75"  "82"  "8f"  "9c"  "a9"  "b6"  "c3"
[15,] "00" "0e" "1c" "2a" "38" "46" "54" "62" "70" "7e"  "8c"  "9a"  "a8"  "b6"  "c4"  "d2"
[16,] "00" "0f" "1e" "2d" "3c" "4b" "5a" "69" "78" "87"  "96"  "a5"  "b4"  "c3"  "d2"  "e1"

How about:
as.hexmode(outer(0:15,0:15,`*`))

Or better yet, as.hexmode(0:15%o%0:15)

Bash + coreutils, 40

1 byte saved thanks to @MitchellSpector

printf %02x\  $[{0..15}*{0..15}]|fmt -52

Bash expands brace expansions before arithmetic expansions, so the string $[{0..15}*{0..15}] first expands to $[0*0] $[0*1] $[0*2] ... $[0*15] $[1*0] ... $[15*15].
The above series of arithmetic expansions then expand to the numerical table contents, as decimal integers.
The printf '%02x ' expresses this list of decimal integers as hex, zero-padded to two characters
fmt -52 formats the integers as 47 character wide lines, giving the desired alignment.  Note fmt tries to make lines goal characters wide.  By default, this is 7% shorter than width.  52*93% -1 (for newline) = 47.

Try it online.

Nice solution. It looks like you can shave one byte off by using fmt -52 (without the w).

nice! btw. in zsh it could be {0..15}\*{0..15} which is 2 bytes shorter :)

C#6, 98 bytes
()=>{int i,j;for(i=-1;++i<16;)for(j=-1;++j<16;)System.Console.Write($"{i*j:x2} {j<15?"":"\n"}");};

repl.it demo
Standard nested for-loop. Only trick is to print newline when j>=15.

+1, but it seems repl.it doesn't like $""

@Metoniem https://tio.run/# is much superior

JavaScript (ES6), 79 78 77 bytes

f=(i=256)=>i?f(--i)+(i%16*(i>>4)+256).toString(16).slice(1)+`
 `[~i&15&&1]:``

document.write('<pre>'+f())

Edit: Saved 1 byte thanks to @ETHproductions and another byte thanks to @YairRand.

@ETHproductions Bah, the .slice(-2) was left over from when I was doing ('0'+toString(16)). I think I'd already tried ' \n'[+!(~i&15)] but it's the same length.

@ETHproductions I also saved 1 bytes...

You can save a byte by replacing (~i&15?' ':'\n') with ' \n'[~i&15&&1] .

@YairRand I think you mean '\n ' but I get the idea, thanks!

MATL, 19 18 bytes
16:q&*1YAO3Z(!48e!

Try it online!
16:q   % Push [0 1 ... 15]
&*     % 16×16 matrix of pairwise products
1YA    % Convert to hexadecimal. Gives a 256×2 char array
O3Z(   % Assign char 0 to 3rd column. Gives a 256×3 char array
!48e!  % Reshape in row-major order as a 48-column char array
       % Implicitly display. Char 0 is shown as space

PowerShell, 46 bytes
0..15|%{$i=$_;"$(0..15|%{"{0:X2}"-f($i*$_)})"}

Try it online!
Loops from 0 to 15, sets $i to be that current number, then loops again. Uses the -format operator with the X2 designation to specify the output is heXadecimal padded to 2 spaces with leading zeros.
Of special note, and really the only golf, is that instead of using a (...)-join' ' to take the hex results, encapsulate them in an array, and concatenate them together into a string, we leverage the fact that the default $OutputFieldSeparator value for stringifying an array is a space. That means we can do a string with a script block in it "$(...)" instead, saving 6 bytes.
Those strings are all left on the pipeline, and output via implicit Write-Output at program completion gives us a newline between them for free.

Haskell, 87 bytes
import Numeric
main=mapM(\x->putStrLn$do y<-s;['0'|x*y<16]++showHex(x*y)" ")s
s=[0..15]

Try it online!
I imagine there's a better way. Maybe depend on the printf package....

Using no imports you could do mapM(pure"0123456789abcdef")".."!!(x*y)++" " for the same bytecount, but you're right with printf 81 bytes.

K7, 36 bytes
` 0:" "/:'{`hex@`c$x}''{x*/:\:x}@!16

" "/:'(\hex@`c$)''x*/:x:!16` should do it

Better yet: (" "/:\hex@')'x*/:x:`c$!16` (26 bytes)

Ruby, 49 bytes
256.times{|i|print"%02x "%(i/16*j=i%16),$/*j/=15}

Pretty straightforward use of the % operator equivalent to sprintf.
$/ is the line separator variable (\n by default.)
Note the use of assignments such as j/=15 to avoid longer parentheses (j/15)

Mathematica, 46 bytes
Grid@Array[IntegerString[1##,16,2]&,{16,16},0]

Straightforward implementation using the built-in IntegerString, in base 16, padding to length 2. The Array[...,{16,16},0] has the two variables each run from 0 to 15.

Matlab, 53 Bytes
for i=[0:15]'*[0:15];fprintf('%02X ',i);disp(' ');end

Sample output:
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00 02 04 06 08 0A 0C 0E 10 12 14 16 18 1A 1C 1E
00 03 06 09 0C 0F 12 15 18 1B 1E 21 24 27 2A 2D
00 04 08 0C 10 14 18 1C 20 24 28 2C 30 34 38 3C
00 05 0A 0F 14 19 1E 23 28 2D 32 37 3C 41 46 4B
00 06 0C 12 18 1E 24 2A 30 36 3C 42 48 4E 54 5A
00 07 0E 15 1C 23 2A 31 38 3F 46 4D 54 5B 62 69
00 08 10 18 20 28 30 38 40 48 50 58 60 68 70 78
00 09 12 1B 24 2D 36 3F 48 51 5A 63 6C 75 7E 87
00 0A 14 1E 28 32 3C 46 50 5A 64 6E 78 82 8C 96
00 0B 16 21 2C 37 42 4D 58 63 6E 79 84 8F 9A A5
00 0C 18 24 30 3C 48 54 60 6C 78 84 90 9C A8 B4
00 0D 1A 27 34 41 4E 5B 68 75 82 8F 9C A9 B6 C3
00 0E 1C 2A 38 46 54 62 70 7E 8C 9A A8 B6 C4 D2
00 0F 1E 2D 3C 4B 5A 69 78 87 96 A5 B4 C3 D2 E1

Try it online!(sort of...)

Perl, 48 bytes
for$a(@%=0..15){printf"%02x "x@%.$/,map$a*$_,@%}

Try it online!
I'm positive this isn't optimally golfed, but I'll be damned if I can find something better.
Code breakdown:
for$a(@%=0..15){printf"%02x "x@%.$/,map$a*$_,@%}
         0..15                                    #Create a list of the range 0 - 15...
      @%=                                         #...and store it in the array @%
for$a(        ){                               }  #Loop through @% with $a as the iterator
                printf[  string   ],[ params  ]   #Perl's port of the standard printf function
                      "%02x "                     #2-digit (hexit?) padding, followed by space...
                             x@%                  #...repeated 16 times (in scalar context, @% represents the size of array @%)...
                                .$/               #...followed by a newline
                                     map$a*$_,@%  #Loops through @%, and using $_ as the iterator, returns a list composed of each member of @% multiplied by the current $a

Perl 6, 42 bytes
.fmt("%02x").put for (^16 X*^16).rotor: 16

Try it
Expanded:
.fmt("%02x") # format each element of list to lowercase hex
.put         # print with trailing newline

for          # for each of the following

(
  ^16  # Range upto ( and excluding ) 16
  X*   # cross multiplied with
  ^16
).rotor: 16 # break it up into chunks of 16 values

C, 68 66 bytes
f(i){for(i=0;i<256;)printf("%02x%c",i%16*(i++/16),i%16<15?32:10);}

-2 bytes thanks to ceilingcat!
Ungolfed:
f(i){
  for(i=0; i<256;)
    printf("%02x%c", i%16*(i++/16), i%16<15 ? 32 : 10);
}

Prints the zero padded result and either space or newline.

Is that i implicitly deduced as int a standard feature of C?

@sergiol yes, int is the default assumption.

Sadly the output is undefined according to C standard (C99 - 6.5.2.2 Function calls).

Suggest ~i%16 instead of i%16<15

JavaScript, 104 Bytes
s="";for(a=0;16>a;a++){for(b=0;16>b;b++)c=(a*b).toString(16),s=1==c.length?s+(" 0"+c):s+(" "+c);s+="\n"}

Call using variable s:
console.log("HEX Table: " + s)

Ungolfed code:
s=""; // Define s as empty string
for(a=0;16>a;a++){ // For y axis
  for(b=0;16>b;b++) // For x axis
    c=(a*b).toString(16),s=1==c.length?s+(" 0"+c):s+(" "+c); // Multiply and format
  s+="\n" // Add line breaks
}

Isn't "\n" line break? Wow, someone used pure ECMA for once.

And you should be able to use s+=2>c.length?" 0"+c:" "+c.

I know this is old, but I noticed a few savings that might help in future challenges too! you can set both a and s to "" since ""*0 is still 0. It's possible to inline your b++ to where it's being used in a*b too for a another slight saving, but if you rewrite the string append to: s+=" "+(0+(a*b++).toString(16)).substr(-2) that'll save a chunk. Should be at 86 bytes with those! Hope that helps!

Japt -R, 20 15 bytes
GÆGÇ*X sGÃùT2 ¸

Try It Online!
GÆGÇ*X sGÃùT2 ¸
G                   :16
 Æ                  :Map each X in the range [0,G)
  GÇ                :  Map the range [0,G)
    *X              :    Multiply by X
       sG           :    Convert to base-16 string
         Ã          :  End map
          ù         :  Left pad each
           T        :    With 0
            2       :    To length 2
              ¸     :  Join with spaces
                    :Implicitly join with newlines and output

You just as easily could've done ® instead of Ë ;P

@ETHproductions: Yeah, but I wanted to play with the shiny new shortcut! :D

Python 3, 55 bytes
r=range(16)
for x in r:print(*['%02x'%(x*y)for y in r])

Using %formatting saves quite a few bytes over [2:] usage. So does using * splats on the print function.

Python 2, 112 109 100 96 73 Bytes
R=range(16)
for i in R:print' '.join('0'*(i*j<16)+hex(i*j)[2:]for j in R)

Try it online!

saved 3 bytes: Thanks to Wheat Wizard; predefined range(16) into R which is used twice.
saved 9 bytes: Crunched up the earlier if statement into a single statement.
saved 4 bytes: crunched the statements in 2nd 'for' block.
saved 23 bytes: Thanks @J843136028: used list comprehension

You can predefine range(16) with R=range(16) and replace each instance of range(16) with R.

You can use list comprehension and starred expressions to save variables. See my answer (currently below).

Thanks, @J843136028 I did some changes and got to 73 bytes, and kept it a bit different than your answer. :)

Python2, 102 97 92 90 89 bytes
i=1
exec"print' '.join('%02x'%(j-x)*(i>0)for x,j in enumerate(range(0,16*i,i)));i+=1;"*16

Output:
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
00 02 04 06 08 0a 0c 0e 10 12 14 16 18 1a 1c 1e
00 03 06 09 0c 0f 12 15 18 1b 1e 21 24 27 2a 2d
00 04 08 0c 10 14 18 1c 20 24 28 2c 30 34 38 3c
00 05 0a 0f 14 19 1e 23 28 2d 32 37 3c 41 46 4b
00 06 0c 12 18 1e 24 2a 30 36 3c 42 48 4e 54 5a
00 07 0e 15 1c 23 2a 31 38 3f 46 4d 54 5b 62 69
00 08 10 18 20 28 30 38 40 48 50 58 60 68 70 78
00 09 12 1b 24 2d 36 3f 48 51 5a 63 6c 75 7e 87
00 0a 14 1e 28 32 3c 46 50 5a 64 6e 78 82 8c 96
00 0b 16 21 2c 37 42 4d 58 63 6e 79 84 8f 9a a5
00 0c 18 24 30 3c 48 54 60 6c 78 84 90 9c a8 b4
00 0d 1a 27 34 41 4e 5b 68 75 82 8f 9c a9 b6 c3
00 0e 1c 2a 38 46 54 62 70 7e 8c 9a a8 b6 c4 d2
00 0f 1e 2d 3c 4b 5a 69 78 87 96 a5 b4 c3 d2 e1

Try it online!

Octave, 34 bytes
disp(num2str((a=0:15)'*a,'%02x '))

05AB1E, 17 bytes
16F15ÝN*8o+h€¦ðý»

Try it online!
16F               For N in [0,15]
   15Ý            Push [0, ..., 15]
      N*          Multiply by N
        8o+       Add 256
           h      Take the uppercase hexadecimal representation
            €¦    Remove the leading 1 of each value
              ðý  Join with spaces
                » End for and join everything with newlines

There might be a better way to handle this in 05AB1E.

8o can be ₁ to save a byte. Although you're right that there might be a better way. :)

Indeed! ;)
Such commands didn't exist back then; pushing 256 was the 2-byte command žz. See Info.txt on November 12th 2016.
Nice to see that the language is still evolving and that people use it :D .

Ah ok. I knew the small number constants are pretty new, but thought the ₁ for 256 was there longer. But I see your answer is from December 2016, so I can understand it wasn't there yet at the time. :) I've seen some 05AB1E answers from 2016 that didn't even had implicit input yet..

VBA, 66 bytes
For m=0To 15:For n=0To 15:?Right(Hex(256+n*m)&" ",3);:Next:?:Next

Enter in Immediate window in VBA editor. Adding 256 to the expression to convert to hexadecimal is only shorter because the concatenater "&" requires a space after it to separate from alphabetic strings.

Alternatively you could use For m=0To 15:For n=0To 15:?Right("0"+Hex(n*m)+" ",3);:Next:?:Next for the same bytecount (which is 65 not 66 by the way)

C, 61 bytes
i;f(){while(i<256)printf("%02x%c",i%16*(i>>4),++i%16?32:10);}

Wandbox

is that i implicitly deduced as int a standard feature of C?

SmileBASIC, 56 51 47 bytes
I=RND(16)J=RND(16)LOCATE I*3,J?HEX$(I*J,2)EXEC.

k, 50 bytes
`0:" "/'("0123456789abcdef"@16 16\)''{x*\:/:x}@!16

Alas, it is hindered by the lack of a built-in hexadecimal printer.
Reading right-to-left, more-or-less:
                                               !16 / make the array {0, 1, 2, ..., 15}
                                     {x*\:/:x}@    / cartesian product of the array multiplied by itself, results in a table
        (                         )''              / for each row, for each column
                            16 16\                 / decode int to two digits in base 16
         "0123456789abcdef"@                       / get the characters to form a string
   " "/'                                           / join the columns with a space, the table is now an array
`0:                                                / print the array, each element is one line

///, 588 bytes
/;/\/ //|/\/\///A/00 |B/
A|C;0|D;1|E;2|F;3|G;4|H;5|I;6|J;7|K;8/AAAAAAAAAAAAAAAAB01C2C3C4C5C6C7C8C9CaCbCcCdCeCf B02C4C6C8CaCcCeD0D2D4D6D8DaDcDe B03C6C9CcCfD2D5D8DbDeE1E4E7EaEd B04C8CcD0D4D8DcE0E4E8EcF0F4F8Fc B05CaCfD4D9DeE3E8EdF2F7FcG1G6Gb B06CcD2D8DeE4EaF0F6FcG2G8GeH4Ha B07CeD5 1cE3EaF1F8FfG6GdH4HbI2I9 B08D0D8E0E8F0F8G0G8H0H8I0I8J0J8 B09D2DbE4EdF6FfG8H1HaI3IcJ5JeK7 B0aD4DeE8F2FcG6H0HaI4IeJ8K2Kc 96 B0b 16E1EcF7G2Gd 58I3IeJ9K4Kf 9a a5 B0c 18E4F0FcG8 54I0IcJ8K4 90 9c a8 b4 B0d 1aE7F4G1GeHbI8J5K2Kf 9c a9 b6 c3 B0eDcEaF8G6H4I2J0JeKc 9a a8 b6 c4 d2 B0fDeEdFcGb 5aI9J8K7 96 a5 b4 c3 d2 e1

A more readable version with newlines:
/]
[///;/\/ //|/\/\///A/00 |B/
A|C;0|D;1|E;2|F;3|G;4|H;5|I;6|J;7|K;8/]
[AAAAAAAAAAAAAAAAB01C2C3C4C5C6C7C8C9CaCbCcCdCeCf ]
[B02C4C6C8CaCcCeD0D2D4D6D8DaDcDe B03C6C9CcCfD2D5D]
[8DbDeE1E4E7EaEd B04C8CcD0D4D8DcE0E4E8EcF0F4F8Fc ]
[B05CaCfD4D9DeE3E8EdF2F7FcG1G6Gb B06CcD2D8DeE4EaF]
[0F6FcG2G8GeH4Ha B07CeD5 1cE3EaF1F8FfG6GdH4HbI2I9]
[ B08D0D8E0E8F0F8G0G8H0H8I0I8J0J8 B09D2DbE4EdF6Ff]
[G8H1HaI3IcJ5JeK7 B0aD4DeE8F2FcG6H0HaI4IeJ8K2Kc 9]
[6 B0b 16E1EcF7G2Gd 58I3IeJ9K4Kf 9a a5 B0c 18E4F0]
[FcG8 54I0IcJ8K4 90 9c a8 b4 B0d 1aE7F4G1GeHbI8J5]
[K2Kf 9c a9 b6 c3 B0eDcEaF8G6H4I2J0JeKc 9a a8 b6 ]
[c4 d2 B0fDeEdFcGb 5aI9J8K7 96 a5 b4 c3 d2 e1

Pretty simple if  you know how /// works. It's just a few string replacements.

///, 544 bytes
Well, everyone's doing /// answers now:
/|/\/\///Z/\/ |P/
0B|MZ9|LZ8|KZ7|JZ6|IZ5|HZ4|GZ3|FZ2|EZ1|C/BBB|B/0A|AZ0/0CCCCC0P1A2A3A4A5A6A7A8A9AaAbAcAdAeAfP2A4A6A8AaAcAeE0E2E4E6E8EaEcEeP3A6A9AcAfE2E5E8EbEeF1F4F7FaFdP4A8AcE0E4E8EcF0F4F8FcG0G4G8GcP5AaAfE4E9EeF3F8FdG2G7GcH1H6HbP6AcE2E8EeF4FaG0G6GcH2H8HeI4IaP7AeE5EcF3FaG1G8GfH6HdI4IbJ2J9P8E0E8F0F8G0G8H0H8I0I8J0J8K0K8P9E2EbF4FdG6GfH8I1IaJ3JcK5KeL7PaE4EeF8G2GcH6I0IaJ4JeK8L2LcM6PbE6F1FcG7H2HdI8J3JeK9L4LfMa a5PcE8F4G0GcH8I4J0JcK8L4M0Mc a8 b4PdEaF7G4H1HeIbJ8K5L2LfMc a9 b6 c3PeEcFaG8H6I4J2K0KeLcMa a8 b6 c4 d2PfEeFdGcHbIaJ9K8L7M6 a5 b4 c3 d2 e1

I replaced \s0 through \s9 with A then E through M, 0 0 with C, \n00 0 with P, /\s with Z and finally // with |, adding all these at the front of the code as I went.
Try it online!

Python 3, 66 bytes
r=range(16)
for i in r:print(*[('0'+hex(j*i)[2:])[-2:]for j in r])

Perl 5, 45 bytes
for$"(@a=0..15){printf"%02x ",$_*$"for@a;say}

Try it online!

PHP, 57 56 bytes
while($z<256)printf("
"[$x=$z%16]."%02x ",$x*($z++>>4));

Run with -nr or try it online.
Note the trailing space in the first line! One byte saved by @gwaugh.

You can -1 byte by eliminating the ! and moving the space to the end of the "%02x ". https://tio.run/##K8go@G9jXwAkyzMyc1I1VCpsjEzNNAuKMvNK0jSUuJSiVSptVSpUDc1i9dRVDYwqFNR1VCq1gOq0te3sTDQ1rf//BwA

APL (Dyalog), 44 43 36 33 bytes
10 bytes saved thanks to @Adám
Crossed out 44 is still regular 44 ;(
↑,/{(⎕D,⎕A)[16 16⊤⍵],' '}¨∘.×⍨⍳16

Uses ⎕IO←0.
Try it online!
How?
∘.×⍨⍳16 - multiplication table of 0 .. 15
¨ - for each item
16 16⊤⍵ - take the first 2 digits of hexadecimal encoding
(⎕D,⎕A)[...] - index into "0123456789ABCDEF..."
,' ' - append space
,/ - join each row
↑ - and columnify
Output
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00 02 04 06 08 0A 0C 0E 10 12 14 16 18 1A 1C 1E
00 03 06 09 0C 0F 12 15 18 1B 1E 21 24 27 2A 2D
00 04 08 0C 10 14 18 1C 20 24 28 2C 30 34 38 3C
00 05 0A 0F 14 19 1E 23 28 2D 32 37 3C 41 46 4B
00 06 0C 12 18 1E 24 2A 30 36 3C 42 48 4E 54 5A
00 07 0E 15 1C 23 2A 31 38 3F 46 4D 54 5B 62 69
00 08 10 18 20 28 30 38 40 48 50 58 60 68 70 78
00 09 12 1B 24 2D 36 3F 48 51 5A 63 6C 75 7E 87
00 0A 14 1E 28 32 3C 46 50 5A 64 6E 78 82 8C 96
00 0B 16 21 2C 37 42 4D 58 63 6E 79 84 8F 9A A5
00 0C 18 24 30 3C 48 54 60 6C 78 84 90 9C A8 B4
00 0D 1A 27 34 41 4E 5B 68 75 82 8F 9C A9 B6 C3
00 0E 1C 2A 38 46 54 62 70 7E 8C 9A A8 B6 C4 D2
00 0F 1E 2D 3C 4B 5A 69 78 87 96 A5 B4 C3 D2 E1

36, just by removing no-ops and using a variable: ⍪' ',⍨G G 2⍴⍉(⎕D,⎕A)[G⊥⍣¯1∘.×⍨⍳G←16]

@Adám thanks! I was just about to edit some of these changes, but yours is shorter

33: ↑,/{(⎕D,⎕A)[16 16⊤⍵],' '}¨∘.×⍨⍳16

Java 8, 98 90 79 bytes
v->{for(int i=0;i<256;System.out.printf("%02x%c",i/16*(i++%16),i%16<1?10:32));}

Explanation:
Try it here.
v->{                    // Method with empty unused parameter and no return-type
  for(int i=0;          //  Index-integer, starting at 0
      i<256;            //  Loop from 0 to 256
    System.out.printf(  //   Print with format:
      "%02x             //    the lowercase 2-digit hexadecimal representation
           %c",         //    + a character
       i/16             //     `i` divided by 16 (integer division in Java truncates)
       *(i++%16)        //     multiplied by `i` modulo-16
                        //     (and increase `i` by 1 afterwards with `i++`)
       i%16<1?          //     If `i` is now a multiple of 16:
        10              //      Replace `%c` with a new-line
       :                //     Else:
        32)             //      Replace `%c` with a space instead
  );                    //  End of loop
}                       // End of method

@OlivierGrégoire Oops.. thanks for noticing. Back to 79 bytes (although old 79-byte answer was i%16*(i>>4), but I like i/16 more than i>>4.

Julia, 83 75 bytes
r=0:15;[([print(num2hex(i*j)[15:16]," ")for i in r],print('\n'))for j in r]

Ink, 169 167 161 bytes
VAR r=-1
-(l)
~temp c=0
~r++
{r>15:->END}
-(v)
{h((r*c)/16)}{h(r*c)}
~c++
{c>15:->l}<> ->v
==function h(n)
{n%16-10:
-0:a
-1:b
-2:c
-3:d
-4:e
-5:f
-else:{n%16}
}

Try it online!
Ungolfed
VAR row=-1                                  // Declare a global variable which keeps track of the current row.
-(line)                                     // A named gather point, which can be jumped to later.

~temp column = 0                            // Declare a local varialbe called column, and set it to 0. Locals use 2 bytes more than globals, but they also reset the value if the line is later reached again.
~row++                                      // Increment the row counter.
{row>15:->END}                              // If we're about to start a 17th row, we terminate the program instead. If not, we continue onwards...

-(number)                                   // Another place to jump to
{digit((row*column)/16)}{digit(row*column)} // Calculate the two digits of the number and pass each of them to the digit function defined below to print them.
~column++                                   // Increment the column counter
{column>15:->row}<> ->number                // If we're done with this row we divert to row, to print another row. Otherwise, we concatenate a space to this row and divert to number.

== function digit(n) ==                     // Declare a function which prints a single hex digit.
{n%16-10:                                   // Multi-line conditional - basically a switch statement.
-0:a                                        // If n mod 16 is 10, write an a
-1:b                                        // If it's 11, write a b
-2:c                                        // ...etc...
-3:d
-4:e
-5:f
-else:{n%16}                                // If none of those matched, write n mod 16, as it'll be the same in hex and decimal
}                                           // End of conditional, and also of the function - it doesn't return anything.

Edit: Saved 2 bytes by using stitches instead of knots.
Edit: Saved 3 bytes by tweaking the printing function, and another 3 bytes by rewriting the main logic to use gathers instead of stitches.

Hello and welcome to PPCG. Would it be possible to provide an online testing environment for ease of verification of your solution?

QBasic, 73 bytes
FOR x=0TO 15
FOR y=0TO 15
?HEX$(x*y\16);HEX$(x*y MOD 16);" ";
NEXT
?
NEXT

I golfed a custom procedure for converting to hex digits, before I realized there's a builtin for that. Now my code is shorter and more boring. :^(
Original 103-byte code:
FOR x=0TO 15
FOR y=0TO 15
p x*y\16
p x*y MOD 16
?" ";
NEXT
?
NEXT
SUB p(d)
?CHR$(48+d-7*(d>9));
END SUB

05AB1E, 12 bytes
15ÝDδ*16‰hJ»

Try it online.
Explanation:
15Ý           # Create a list in the range [0,15]: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
   D          # Duplicate this list
    δ*        # Multiply each pair double vectorized
      16‰     # Take the divmod 16 for each
         h    # Convert each number to hexadecimal
          J   # Join the pairs together
           »  # Join each inner list by spaces, and then each string by newlines
              # (and output the result implicitly)

Good idea using ‰ to get the leading 0's.

@Emigna Remembered it from some date/time related challenges where leading 0s were mandatory as well (where I used divmod 10). :) Too bad there isn't a 1-byte constant for integers 16 and 32, though.. I use those more often than the 1-bytes 95 and 36, although I guess those were added later, so I kinda understand why these constants are there as 1-byte instead of 2-byte.

Yeah, 16 should definitely be a candidate as a 1-byte constant. Should be the most used 2-digit number. I don't think I've used 36 much, if ever. 95 was needed a lot in ascii challenges previously. Although I haven't seen many uses for it recently, I still feel as if it has a place.

@Emigna I understand the use of constants 95 and 36, for ASCII and Base challenged respectively. I just feel like there are indeed much better candidates for 1-byte constants than these. These small-number builtins were added later however, after the 2-byte constants already existed, which is probably why it's like it is now. Changing it now would also invalidate quite a few answers.. Ah well. Btw, completely unrelated: do you know how to update the wiki? Some commands are incorrect/missing (like .µ to reset the counter_variable, or .½, .¾, .¼ which should be Å½, Å¾, Å¼ instead).

I haven't updated (or even looked at) the wiki, so I'm not 100% certain. I presume you could just fork it and make a pull request as with code updates. @Mr.Xcoder will know for sure as he's done a lot of work on it.

Vyxal j, 22 bytes
15ʀƛ15ʀ*ƛk6τ:L1=[0p];Ṅ

Try it Online!
15ʀ                    # List 0...15
   ƛ                   # Map to...
    15ʀ                # 0...15
       *               # Multiplied by (number)
        ƛ           ;  # Map to...
         k6τ           # Base16
            :L1=[0p]   # Prepend 0 as necessary
                     Ṅ # Join by spaces

Pyth - 24 23 bytes
Looking to golf the padding.
jjL;c16%L"%02x"*M^U16 2

Try it online here.

Maybe add 256 and then take off the first digit after converting to string? Maybe that's what you're doing. I really don't know Pyth :-P

@Challenger5 I'm just using Python's format strings

WinDbg, 85 68 bytes
Formatting the output manually:
.for(rip=0;.<100;rip=.+1){.printf"%02x%c",./10*(.%10),a+(f>.%10)*16}

Or using a built-in to format the output, which also outputs some bonus text. Also 68 bytes:
.for(rip=0;.<100;rip=.+1){eb(8<<16)+. .%10*(./10)};db/c10 8<<16 L100

-17 bytes because it turns out the pseudo-register $ip can be read with ., so using that one instead of $t0.
WinDbg's default base is 16 so this looks essentially like it's just code to print the 10x10 decimal multiplication table.
How it works:
.for (r ip=0; .<100; r ip=.+1)        * Loop 256 times
{
    .printf "%02x%c", ./10*(.%10),    * Print the result, padded to 2 places
        a+(f>.%10)*16                 * Print a space or \n if end of line
}

* OR:

.for (r ip=0; .<100; r ip=.+1)        * Loop 256 times
{
    eb (8<<16)+. .%10*(./10)          * Put the result in memory
};
db /c10 8<<16 L100                    * Print the memory as bytes in lines of length 16

Sample output:
0:000> .for(rip=0;.<100;rip=.+1){.printf"%02x%c",./10*(.%10),a+(f>.%10)*16}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
00 02 04 06 08 0a 0c 0e 10 12 14 16 18 1a 1c 1e
00 03 06 09 0c 0f 12 15 18 1b 1e 21 24 27 2a 2d
00 04 08 0c 10 14 18 1c 20 24 28 2c 30 34 38 3c
00 05 0a 0f 14 19 1e 23 28 2d 32 37 3c 41 46 4b
00 06 0c 12 18 1e 24 2a 30 36 3c 42 48 4e 54 5a
00 07 0e 15 1c 23 2a 31 38 3f 46 4d 54 5b 62 69
00 08 10 18 20 28 30 38 40 48 50 58 60 68 70 78
00 09 12 1b 24 2d 36 3f 48 51 5a 63 6c 75 7e 87
00 0a 14 1e 28 32 3c 46 50 5a 64 6e 78 82 8c 96
00 0b 16 21 2c 37 42 4d 58 63 6e 79 84 8f 9a a5
00 0c 18 24 30 3c 48 54 60 6c 78 84 90 9c a8 b4
00 0d 1a 27 34 41 4e 5b 68 75 82 8f 9c a9 b6 c3
00 0e 1c 2a 38 46 54 62 70 7e 8c 9a a8 b6 c4 d2
00 0f 1e 2d 3c 4b 5a 69 78 87 96 a5 b4 c3 d2 e1

0:000> * OR:

0:000> .for(rip=0;.<100;rip=.+1){eb(8<<16)+. .%10*(./10)};db/c10 8<<16 L100
02000000  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
02000010  00 01 02 03 04 05 06 07-08 09 0a 0b 0c 0d 0e 0f  ................
02000020  00 02 04 06 08 0a 0c 0e-10 12 14 16 18 1a 1c 1e  ................
02000030  00 03 06 09 0c 0f 12 15-18 1b 1e 21 24 27 2a 2d  ...........!$'*-
02000040  00 04 08 0c 10 14 18 1c-20 24 28 2c 30 34 38 3c  ........ $(,048<
02000050  00 05 0a 0f 14 19 1e 23-28 2d 32 37 3c 41 46 4b  .......#(-27<AFK
02000060  00 06 0c 12 18 1e 24 2a-30 36 3c 42 48 4e 54 5a  ......$*06<BHNTZ
02000070  00 07 0e 15 1c 23 2a 31-38 3f 46 4d 54 5b 62 69  .....#*18?FMT[bi
02000080  00 08 10 18 20 28 30 38-40 48 50 58 60 68 70 78  .... (08@HPX`hpx
02000090  00 09 12 1b 24 2d 36 3f-48 51 5a 63 6c 75 7e 87  ....$-6?HQZclu~.
020000a0  00 0a 14 1e 28 32 3c 46-50 5a 64 6e 78 82 8c 96  ....(2<FPZdnx...
020000b0  00 0b 16 21 2c 37 42 4d-58 63 6e 79 84 8f 9a a5  ...!,7BMXcny....
020000c0  00 0c 18 24 30 3c 48 54-60 6c 78 84 90 9c a8 b4  ...$0<HT`lx.....
020000d0  00 0d 1a 27 34 41 4e 5b-68 75 82 8f 9c a9 b6 c3  ...'4AN[hu......
020000e0  00 0e 1c 2a 38 46 54 62-70 7e 8c 9a a8 b6 c4 d2  ...*8FTbp~......
020000f0  00 0f 1e 2d 3c 4b 5a 69-78 87 96 a5 b4 c3 d2 e1  ...-<KZix.......

Scala, 56 bytes
for(x<-0 to 15){for(y<-0 to 15)printf("%02x ",x*y);println}

Ungolfed:
for(x<-0 to 15){
  for(y←0 to 15)
    printf("%02x ",x*y);
  println
}

Explanation:
for(x<-0 to 15){        //count from 0 to 15 using the variable x
  for(y←0 to 15)          //count from 0 to 15 using the variable y
    printf("%02x ",x*y);    //print x*y as a hex string with leading zeros and a width of 2 characters
  println                 //print a newline
}

Common Lisp, 88 70 69 63 bytes
(#1=dotimes(j 16)(#1#(k 16)(format t"~2,'0x "(* k j)))(terpri))

Using idea from here
A bit of explanation
~2,'0x ;display in hexadecimal, padding with minimum two digits, padding symbol is 0

q/kdb+, 46 26 bytes
Solution:
-1" "sv'($)4h$x*/:x:(!)16;

Example:
q)-1" "sv'($)4h$x*/:x:(!)16;
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
00 02 04 06 08 0a 0c 0e 10 12 14 16 18 1a 1c 1e
00 03 06 09 0c 0f 12 15 18 1b 1e 21 24 27 2a 2d
00 04 08 0c 10 14 18 1c 20 24 28 2c 30 34 38 3c
00 05 0a 0f 14 19 1e 23 28 2d 32 37 3c 41 46 4b
00 06 0c 12 18 1e 24 2a 30 36 3c 42 48 4e 54 5a
00 07 0e 15 1c 23 2a 31 38 3f 46 4d 54 5b 62 69
00 08 10 18 20 28 30 38 40 48 50 58 60 68 70 78
00 09 12 1b 24 2d 36 3f 48 51 5a 63 6c 75 7e 87
00 0a 14 1e 28 32 3c 46 50 5a 64 6e 78 82 8c 96
00 0b 16 21 2c 37 42 4d 58 63 6e 79 84 8f 9a a5
00 0c 18 24 30 3c 48 54 60 6c 78 84 90 9c a8 b4
00 0d 1a 27 34 41 4e 5b 68 75 82 8f 9c a9 b6 c3
00 0e 1c 2a 38 46 54 62 70 7e 8c 9a a8 b6 c4 d2
00 0f 1e 2d 3c 4b 5a 69 78 87 96 a5 b4 c3 d2 e1

Explanation:
-1" "sv'string 4h$x*/:x:til 16; / ungolfed solution
                        til 16  / range 0..15
                      x:        / save in variable x
                  x*/:          / x multiplied by each-right (generate 0..15*0..15)
               4h$              / cast result to byte array (0x00...)
        string                  / convert byte array to string
  " "sv'                        / join (sv) each (') with space (" ")
-1                            ; / write to stdout and swallow return value

Notes:

-20 byte saving by complete re-write.

Proton, 60 bytes
x=0;eval("print(' '.join('%02x'%(x*y)for y:0..16));x++;"*16)

Try it online!

Excel VBA, 58 54 Bytes
Anonymous VBE immediate window function that takes no input and outputs the FxF hex multiplication table to the range [A1:P16]
[A1:P16]="=Right(0&Dec2Hex((Row()-1)*(Column()-1)),2)"

J, 22 bytes
echo,.3{."1 hfd*/~i.16

Try it online!

VBA (Excel), 45 Bytes
By using VBA Immediate Window.
[A1:P16]="=DEC2HEX((row()-1)*(column()-1),2)"

Jq 1.5, 105 bytes
def h:[("0123456789abcdef"/"")[.[]]]|add;[range(16)*range(16)|[(./16|floor),.%16]|h]|_nwise(16)|join(" ")

Expanded (jq has no "%x" formatting so we roll our own)
def tohex:                 # convert [x,y] to hex string "xy"
  [("0123456789abcdef"/"")[.[]]] | add;

[   range(16)*range(16)    # generate values
  | [(./16|floor), .%16]   # convert to [x,y] digits base 16
  | tohex                  # convert to hex string
]
| _nwise(16)               # split into subarrays of length 16
| join(" ")                # convert subarrays to strings

Try it online!

Tcl, 98 bytes
time {incr i
set j 0
time {puts -nonewline [format %02x\  [expr ($i-1)*$j]]
incr j} 16
puts ""} 16

Try it online!

Tcl, 102 bytes
set i 0
time {set j 0
time {puts -nonewline [format %02x\  [expr $i*$j]]
incr j} 16
puts ""
incr i} 16

Try it online!
Will golf it more later!

Forth (gforth), 65 bytes
: f 16. do cr 16. do i j * 16 /mod hex 1 .r . decimal loop loop ;

Try it online!
Explanation
Nested loop from 0 to 15. Each Iteration:

multiply row and column numbers to get result
split into first and second digit (first digit will be 0 if result < 16)
set base to 16 (hexadecimal)
print first digit with no space
print second digit with space
set base to 10 (decimal)

Code Explanation
: f             \ start new word definition
  16. do        \ outer loop from 0 to 15
    cr          \ output newline
    16. do      \ inner loop from 0 to 15
      i j *     \ multiply loop indexes
      16 /mod   \ get quotient and remainder of dividing by 16
      hex       \ set base to 16
      1 .r      \ print quotient (equivalent to first digit) right-aligned in space of 1 (no space)
      .         \ print second digit (with space)
      decimal   \ set base back to 10 (decimal)
    loop        \ end inner loop
  loop          \ end outer loop
;               \ end word definition

Perl 6, 49 36 bytes
say ($_ <<*<<^16).fmt("%02x")for ^16

Old solution:
for ^16 ->\a {printf "%02x ",a*$_ for ^16;say ""}

C# (Visual C# Interactive Compiler), 67 bytes
for(int i=0;i<256;)Write($"{(i%16<1?"\n":"")} {i/16*(i++%16):X2}");

Try it online!

Mouse-2002, 58 bytes
8&WSIZE (qx.-^x.0y:(y.q<^y.x.y.*&!HEX " "y.1+y:)"!"x.1+x:)

Try it online!

Pyth, 24 bytes
V16FZU16p+%"%02x"*ZNd)pb

Try it online!
Might post an explanation or ungolfed version later.

APL(NARS), 42 chars, 84 bytes
{{(⎕D,⎕A)[1+16∣(⌊⍵÷16),⍵]}¨×/¨m∘.,m←0,⍳15}

I copy something from others... ×/¨m∘.,m←0,⍳15 would build the multiplication table of 0,⍳15; the function
{(⎕D,⎕A)[1+16∣(⌊⍵÷16),⍵]}  convert each number in the multiplication table in hex for only 2 digits.
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
 00 02 04 06 08 0A 0C 0E 10 12 14 16 18 1A 1C 1E
 00 03 06 09 0C 0F 12 15 18 1B 1E 21 24 27 2A 2D
 00 04 08 0C 10 14 18 1C 20 24 28 2C 30 34 38 3C
 00 05 0A 0F 14 19 1E 23 28 2D 32 37 3C 41 46 4B
 00 06 0C 12 18 1E 24 2A 30 36 3C 42 48 4E 54 5A
 00 07 0E 15 1C 23 2A 31 38 3F 46 4D 54 5B 62 69
 00 08 10 18 20 28 30 38 40 48 50 58 60 68 70 78
 00 09 12 1B 24 2D 36 3F 48 51 5A 63 6C 75 7E 87
 00 0A 14 1E 28 32 3C 46 50 5A 64 6E 78 82 8C 96
 00 0B 16 21 2C 37 42 4D 58 63 6E 79 84 8F 9A A5
 00 0C 18 24 30 3C 48 54 60 6C 78 84 90 9C A8 B4
 00 0D 1A 27 34 41 4E 5B 68 75 82 8F 9C A9 B6 C3
 00 0E 1C 2A 38 46 54 62 70 7E 8C 9A A8 B6 C4 D2
 00 0F 1E 2D 3C 4B 5A 69 78 87 96 A5 B4 C3 D2 E1

I see how using functions and ¨ problems are break in simple problems...

Charcoal, 16 15 bytes
Ｅ¹⁶⭆¹⁶﹪%02x ×ιλ

Try it online! Link is to verbose version of code.
Alternative 16-byter using automatic grid output of Wolfram lists:
▷LＥ¹⁶Ｅ¹⁶﹪%02x×κμ
Explanation
Ｅ¹⁶                      Map for i from 0 to 15 (with k as index variable, but here it's the same as i)
    ⭆¹⁶                  Map for l from 0 to 15 (with m as index variable), then join with "" into a string
       ﹪                Modulo (used for Python's string format here)
         %02x            Input formatted (%), padded with zeros (0) to length two (2)
                         as a hexadecimal number (x), with a space ( ) at the end
              ×ιλ        i * l

MathGolf, 16 bytes
☻r■mÉε*¢0═ uM∞/n

Try it online!
Explanation
It might be shorter to do it with a loop, I'll have to try that.
☻                  push 16
 r                 range(0, n)
  ■                cartesian product with itself
   mÉ              explicit map using next 3 operators
     ε*            reduce list by multiplication
       ¢           convert to/from hexadecimal
        0          push 0
         ═         pad list elements with zeroes to equal length
                   space character
           u       join with separator (joins on space)
            M      push 24
             ∞     pop a, push 2*a = 48 (each line is 48 characters long)
              /    pop a, b : push(a/b), split strings
               n   newline char, or map array with newlines

Factor, 56 bytes
16 iota dup '[ _ [ * "%02X "printf ] with each nl ] each

Try it online!
I went through a progression as I realized matrix words are too long:
{ 16 16 } matrix-coordinates [ Π "%02X"sprintf ] matrix-map simple-table.
{ 16 16 } matrix-coordinates [ [ Π "%02X "printf ] each nl ] each
16 iota dup [ * "%02X"sprintf ] cartesian-map simple-table.
16 iota [ 16 iota [ * "%02X "printf ] with each nl ] each
16 iota dup '[ _ [ * "%02X "printf ] with each nl ] each


text:
Every nth prime number up to 8675309
Read this if you're confused.
Challenge:
The goal of this code-golf is based around the number 8675309...
Your goal is to print out every prime number from 2 to 8675309, starting with the number 2 and then skipping 8 prime numbers, then skipping 6, then skipping 7, etc. In essence, skip a number of primes determined by the next number in the sequence 8675309. Cycling over to 8 once it reaches 9.
Output:
2
29

(skipped 8 to get to the 10th prime)
59

(skipped 6 to get to the 17th prime)
97

(skipped 7 to get to the 25th prime)

Example: (PHP-like pseudo-code where $prime is an array containing all the prime numbers.)
$tn=1;
$c=1;
$na=array(8,6,7,5,3,0,9);
l:
output($prime[$tn]);
if ($prime[$tn]>=8675309) {exit(8675309)};
$c+=1;
if ($c>=8) {$c=1};
$tn+=$na[$c];
goto l;

When I say skip 8 primes, I mean to go from the #1 prime, to the #10 prime (skipping the 8 in between).
Each number must be on a new line.
When you reach the 0 in 8675309, just just print the next prime number without skipping any.
This is code-golf so the shortest code (in-bytes) wins.

so that just gives a fixed output?

@trichoplax Any idea how to get an array filled with prime numbers?? Anyway the pseudo-code looks good now.

You can use the code from one of the languages used for the list of primes under a million challenge, and just change 1 million to the number you want.

Your pseudo code still seems to skip one less than described, it increases $c  to early, and if we don't hit 8675309 exactly (do we?), it also prints the first number exceeding that value.

@ChristianSievers Yes, sorry, I'm on it.

@trichoplax https://jsfiddle.net/gssleader/nn4fkrdq/ is code in progress, not golfed at all.

Most challenges have things that need adjusting before they are ready. For future challenge ideas, I find the sandbox very useful for getting feedback before posting.

The newly added rule:
"The last line of output should be 8675209, regardless of whether the sequence lands on it."
does not feel right to me at all, IMO it adds nothing to the challenge and is only here to masquerade an error OP has made in the initial calculations.

The program should print 8675309 out at the end why? it's not in the challenge, not even in a comment. The pseudo code should not be the spec

the pseudo-code has other bugs. - like off by one on the array, also php exit() with integer argument doesn't print.

Mathematica 67 bytes
Doesn't hit 8675309 though - not sure of OP's intention on this.
Column@FoldList[NextPrime,2,Flatten@Array[{9,7,8,6,4,1,10}&,12937]]

Would upvote if it didn't use built-ins for prime numbers ...

this is mathematica we're talking about--we're lucky that there's not a builtin for this

Jelly, 23 29 24 bytes
+6 bytes for a temporary patch to fulfil the requirement to print 8675309.
-5 bytes moving to a golfier but slower approach to address that.
“⁹Ṁ:’©D‘ẋ“2Ṿ’R®ÆR¤ṁḢ€;®Y

Now too slow to run on TryItOnline, but it runs locally in a couple of minutes, producing the numbers shown below with line feeds in-between (# of primes skipped shown below in parentheses):
2, 29, 59, 97, 127, 149, 151, 199, 257, 293, 349, 383, 409, 419, ...
 (8) (6) (7) (5)  (3)  (0)  (9)  (8)  (6)  (7)  (5)  (3)  (0)

..., 8674537, 8674727, 8674867, 8675003, 8675053, 8675113, 8675137, 8675309
            (8)      (6)      (7)      (5)      (3)      (0)      (4)*

* the last is only an effective skip of 4, as it is simply appended to the list.
Click here for a version using 3659 instead of 8675309, which has 19 sets of four skips (rather than 12937 sets of 7) and appends 3659 (which is an effective skip of 6).
How?
“⁹Ṁ:’©D‘ẋ“2Ṿ’R®ÆR¤ṁḢ€;®Y - Main link: no arguments
“⁹Ṁ:’                    - base 250 number: 8675309
     ©                   - save in register
      D                  - convert to a decimal list: [8, 6, 7, 5, 3, 0, 9]
       ‘                 - increment: [9,7,8,6,4,1,10]
         “2Ṿ’            - base 250 number: 12937
        ẋ                - repeat: [9,7,8,6,4,1,10,9,7,8,6,4,1,10, ... ,9,7,8,6,4,1,10]
             R           - range (vectorises) [[1,2,3,4,5,6,7,8,9],[1,2,3,4,5,6,7], ...]
                 ¤       - nilad followed by link(s) as a nilad
              ®          - retrieve value from register: 8675309
               ÆR        - prime range [2,3,5,7, ... ,8675309]
                  ṁ      - mould the primes like the range list:
                               [[2,3,5,7,11,13,17,19,23],[29,31,37,41,43,47,53],...]
                   Ḣ€    - head €ach: [2,29,59,97,127,149,151,199, ..., 8675137]
                      ®  - retrieve value from register: 8675309
                     ;   - concatenate: [2,29,59,97,127,149,151,199, ..., 8675137, 8675309]
                       Y - join with line feeds
                         - implicit print

The program should print 8675309 out at the end, like the pseudo code does.

@cascading-style OK, I did not realise from the spec that was a requirement (I should have looked at your pseudo code!). I have fixed it up in a naive way for now and will look at the possibility of changing the method at some point to cut this down in size.

Wonder, 47 bytes
P\tk582161P;(_>@(os tk1P;P\dp +1#0P))cyc8675309

Oh geez, this gets slower and slower as time goes on...
Explanation
P\tk582161P;

Takes 582161 (amount of primes <= 8675309) items from the infinite primes list P and redeclares result as P.
(_>@(...))cyc8675309

Infinitely cycles the digits of 8675309 and performs a takewhile on the resulting list.
os tk1P;P\dp +1#0P

Output the first item in P, drop cycle item + 1 elements from P, and redeclare result as P. This operation on P also acts as a truth value for takewhile; if the list is empty / falsy (meaning that we have reached 8675309), then we stop taking from the cycled list.
Faster implementation (for testing)
P\tk582161P;(_>@(os tk1P;P\dp +1#0P;#0))cyc8675309

Still really slow, but noticeably faster.

Ruby, 121 bytes
Trailing newline at end of file unnecessary and unscored.
P=[]
(2..8675309).map{|c|s=1;P.map{|p|s*=c%p};P<<c if s!=0}
S=[9,7,8,6,4,1,10]*P[-1]
while y=P[0]
p y
P.shift S.shift
end

Explanation: P is an array of primes. c is a candidate prime; s is the product of the residues modulo every smaller prime; if any such residue is zero (indicating that c is composite), s becomes (and stays) zero.
The prime number generator is slow. It will take a looooong time to run. Testing was done by substituting a P array generated by more efficient means (specifically, short circuit on even division, and it also helps a lot to stop testing at the square root).

Haskell, 122 bytes
This might be what is asked for:
s(a:b)=a:s[c|c<-b,c`mod`a>0]
f(a:b)(s:t)=a:f(drop s b)t
main=mapM print$takeWhile(<8675310)$f(s[2..])$cycle[8,6,7,5,3,0,9]

I could save a few bytes by precomputing how many number are needed, and replacing takeWhile with take. That would also allow to adapt to any decision about the last number to be output. It has already printed numbers up to 600000 using very few memory in my test, so I think it can go all the way.

-1 Doesn't work: http://rextester.com/GPCX98454

Might they have a runtime restriction? It works there if you replace 8675310 with 8675, say. And it works for me (compiled, with optimization, didn't try without) in the original form. A faster machine, startet later than the first test, has already reached 1,600,000.

Getting a stack space overflow. Now trying with a bigger one. Alternatively, can use a more naive prime generator which leads to the same code size.

Haskell, 109 bytes
(p:z)%(x:r)=print p>>(drop x z)%r
p%x=pure()
[n|n<-[2..8675309],all((>0).mod n)[2..n-1]]%cycle[8,6,7,5,3,0,9]

Try it online! (truncated 8675309 to 8675, otherwise it times out on Try it online)
Usage:

*Main> [n|n0).mod n)[2..n-1]]%cycle[8,6,7,5,3,0,9]
2
29
59
97
127
149
151
199
257
293
349
383
409
419
467
541
587
631
661
691
701
769
829
881
941
983
1013
...

Perl 6,  65 73  67 bytes

$_=8675309;.[0].put for (2..$_).grep(*.is-prime).rotor(1 X+.comb)

( failed to print 8675137 because of missing :partial )
$_=8675309;.[0].put for ^$_ .grep(*.is-prime).rotor((1 X+.comb),:partial)

$_=8675309;.[0].put for ^($_+33) .grep(*.is-prime).rotor(1 X+.comb)

By shifting up the end of the Range, the :partial can be removed.
Try it ( 5 second limit added ) See it finish
Initial example was timed at 52 minutes 41.464 seconds.
Expanded:
$_ = 8675309;

  .[0]              # get the first value out of inner list
  .put              # print with trailing newline

for                 # for every one of the following

  ^($_+33)          # the Range ( add 33 so that ｢.rotor｣ doesn't need ｢:partial｣ )
  .grep(*.is-prime) # the primes
  .rotor(
    1 X+ .comb      # (1 X+ (8,6,7,5,3,0,9)) eqv (9,7,8,6,4,1,10)
  )

The result from the rotor call is the following sequence
(
 (  2   3   5   7  11  13  17  19  23)     #  9 (8)
 ( 29  31  37  41  43  47  53)             #  7 (6)
 ( 59  61  67  71  73  79  83  89)         #  8 (7)
 ( 97 101 103 107 109 113)                 #  6 (5)
 (127 131 137 139)                         #  4 (3)
 (149)                                     #  1 (0)
 (151 157 163 167 173 179 181 191 193 197) # 10 (9)

 (199 211 223 227 229 233 239 241 251)     #  9 (8)
 (257 263 269 271 277 281 283)             #  7 (6)
 (293 307 311 313 317 331 337 347)         #  8 (7)
 (349 353 359 367 373 379)                 #  6 (5)
 (383 389 397 401)                         #  4 (3)
 (409)                                     #  1 (0)
 (419 421 431 433 439 443 449 457 461 463) # 10 (9)

 ...
)

Nice answer, how long would it take to finish?

@cascading-style It takes almost 53 minutes to run to completion. Good thing I let it run to completion, as I forgot a :partial adverb on the call to .rotor

Befunge, 136 bytes
p2>:1>1+:"~"%55p:"~"/45p:*\`!v
1+^<+ 1<_:#!v#%+g55@#*"~"g54:_\:!#v_1-\
p00%7+1: ,+64g00.:_^#!`***"'(CS":$<^0-"/"g4
>5g#*^#"~"g5<
8675309

Try it online!, but be aware that it's going to time out long before it reaches the end. A compiled version on my local machine completes in under 10 seconds though.
Explanation
To test for primality we iterate over the range 2 to sqrt(n) and check if n is a multiple of any of those values - if not, it's a prime. This process is complicated by the fact that the iterated value needs to be stored in a temporary "variable", and since Befunge's memory cells are limited in size, that storage has to be split over two cells. To handle the skipped primes, we use a lookup "table" (which you can see on line 5) to keep track of the different ranges that need to be skipped.
I'm not going to do a detailed analysis of the code, because there's quite a lot of interleaving code with commands shared across different code paths in order to save space. This makes things rather difficult to follow and I don't think it would be particularly interesting to anyone that wasn't already familiar with Befunge.
Sample Output
2
29
59
97
127
149
151
199
...
8674397
8674537
8674727
8674867
8675003
8675053
8675113
8675137

Bash (+coreutils), 98, 94 bytes
EDITS:

Optimized row filter a bit, -4 bytes

Golfed
seq 8675309|factor|grep -oP "^.*(?=: \S*$)"|sed 1b\;`printf '%d~45b;' {10,17,25,31,35,36,46}`d

Test
>seq 8675309|factor|grep -oP "^.*(?=: \S*$)"|sed 1b\;`printf '%d~45b;' {10,17,25,31,35,36,46}`d| head -25
2
29
59
97
127
149
151
199
257
293
349
383
409
419
467
541
587
631
661
691
701
769
829
881
941

Try It Online! (limited to N<1000, to make it run fast)
The full version takes around ~15 seconds to complete on my machine.

I wonder who put "factor" in coreutils.

@Jasen see http://unix.stackexchange.com/a/58105/182018

Vyxal, 114 bitsv2, 14.25 bytes
Þp»¤j⌈»~Þ<$f›ẇvh

Try it Online!
Bitstring:
001010110011101110011001011110011100110101100010101111000100110100100001101101111001000000011010110111001011110100

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:
Golf a recursive web crawler
Challenge
Create a program that will build a recursive list of all linked webpages (given a starting point), to a depth determined by user input.
Any valid link in the HTML should be crawled, whether or not it is a script, image, etc.
Example Input
<program name> <url to crawl> <depth>
webcrawler http://crawlthissite.com/mypage.html 2

Example Output
http://crawlthissite.com/book1
http://crawlthissite.com/book2
http://crawlthissite.com/book1/1.html
http://crawlthissite.com/book2/1.html
http://site.net
http://coolsite.com/
http://coolsite.com/about.html
http://coolsite.com/shop.html

This is code-golf so the shortest answer (in bytes) wins.
P.S. this is my first code-golf, please don't get mad if I have broken the rules of the site in any way, please just let me know.

Welcome to PPCG! Try posting in the Sandbox for Proposed Challenges to receive feedback on answers before posting on the main site.

Parsing HTML and deciding what a "valid" link is is a very complex subject, which would need to be described in much more detail to make a challenge.

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


text:
Repeat after me!
Given a string as argument, output the length of the longest(s) non-overlapping repeated substring(s) or zero if there is no such string.
You can assume the input string is not empty.
Examples
abcdefabc : the substring abc is repeated at positions 1 and 7, so the program should output 3
abcabcabcabcab : abcabc or bcabca or cabcab are repeated, so the program should output 6. (the substring abcabcabcab is also repeated, but the occurrences overlap, so we don't accept it).
aaaaaaa : aaa is repeated at positions 1 and 4 for example, so the program should output 3
abcda : a is repeated, so the program should output 1
xyz : no repeated string → 0
ababcabcabcabcab : should return 6
This is code-golf, so fewest bytes wins.

Could the string be empty? If that's the case, would it be allowed to output False rather than 0?

@Dennis You can assume the string is not empty.

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

Formatted:
,[<<<,]
+
[
  for each suffix
  >>->
  [
    for each prefix
    [
      for each suffix
      [
        for each char while no mismatch
        [
          >>[>>>]
          <+<-<[<<<]
          > >+<-
        ]
        >[<+>-]
        >[>>>]
        <<
        [
          mismatch
          >[<+>-]
        ]
        >
        [
          [<+>-]
          >+[<<<]
          >>>-
          [
            match
            +>[<<<]
            <
            [
              >+>[->]
              <<[<]
              >-
            ]
            >[<+> >+<-]
            >>>[>>>]
          ]
          >>
        ]
        <
      ]
      >+[,<<<+]
      ->[<<<]
      >>> >>+[,+>>>+]
      -[>>>]
      ->
    ]
    <[+<<<]
    +<<<++[->>>]
    +>>>->
  ]
  <[,<<<]
  <[>>>+<<<-]
  >+>,>>>
]
<<.

Expects input with or without a trailing newline, and outputs the result as a byte value.
Try it online.
This checks each prefix to see whether it occurs later in the string, then chops off the first character and repeats the process until there are no more characters left.
The tape is divided into 3-cell nodes,
c 0 f
where c is a character of the given string, and f is a flag that can be either one, negative one, or zero. Nonzero flags are placed between the two characters currently being compared, and negative ones are reserved for the cells after the end of the current prefix and before the beginning of the current suffix (i.e., before the index of the current potential match).
The result is stored to the left of the string and is updated whenever a match is found.
(The string is actually processed in reverse with a \x01 appended to it.)

Jelly, 12 bytes
œ-QL€
ŒṖÇ€FṀ

Try it online!
How it works
ŒṖÇ€FṀ  Main link. Argument: s (string)

ŒṖ      Generate all partitions of s.
  Ç€    Apply the helper link to each partition.
    F   Flatten the resulting array of lengths.
     Ṁ  Take the maximum.

œ-QL€   Helper link. Argument: P (partition)

  Q     Yield the elements of P, deduplicated.
œ-      Multiset subtraction; remove exactly one occurrence of each string in P.
   L€   Compute the lengths of the remaining strings.

All hail Jelly, the ultimate code golf language!

œ-Q is really neat.

Retina, 35 32 30 bytes
Pretty cool challenge.
M&!`(.*)(?=.*\1)
M%`.
O#^`
G1`

Try it online
Explanation:
M&!`(.*)(?=.*\1)    # Prints overlapping greedy substrings occuring more than once
M%`.                # Replace each line with its length
O#^`                # Sort lines by number in reverse
G1`                 # Return the first line

You can save two bytes by using M%\.` as the second stage.

Perl 6, 36 bytes
{m:ex/(.*).*$0/.map(*[0].chars).max}

Try it
Expanded:
{   # bare block lambda with implicit parameter ｢$_｣

  m           # match ( implicitly against ｢$_｣
  :exhaustive # every possible way
  /
    (.*)      # any number of characters ( stored in ｢$0｣ )
    .*
    $0
  /

  .map(

    *\        # the parameter to Whatever lambda
    [0]\      # the value that was in ｢$0｣ for that match
    .chars    # the number of characters

  ).max

}

JavaScript (ES6), 79 68 66 bytes

f=(s,r,l=s.match(/(.*).*\1/)[1].length)=>s?f(s.slice(1),l<r?r:l):r
<input oninput=o.textContent=f(this.value)><pre id=o>

Edit: Saved 11 13 bytes thanks to @Arnauld.

Haskell, 79 bytes
(""%)
(a:b)!(c:d)|a==c=1+b!d
_!_=0
a%c@(e:d)=maximum[a!c,""%d,(a++[e])%d]
_%_=0

Try it online!

It looks like first argument of % can accumulate a non-contiguous subsequence, giving false positives like 2 for aa in axayaa,

What @xnor said. I think the recursive call to a%d is wrong, but also unnecessary. Which also means you can use max instead of maximum.

I think changing a%d to ""%d fixes it.

Oh right, it's still needed (and sound) when a is empty.

I think sum[1|(x,y)<-zip a c,x==y] can be used instead of a!c.

@xnor I believe that does fix the issue.  I've made the change.

@Laikoni That does not work because we only want to count leading characters in common. For example if a and c are "abaaaa" and "acaaaa" that will count 5 common characters rather than the 1 common leading characters

Python 3, 75 72 bytes
f=lambda s,n=0:s[n:]and max(n*(s[:n]in s[n:]),f(s,n+1))or n and f(s[1:])

Try it online!

Husk, 11 bytes
L►L§fo↓2`xQ

Try it online!
Note: Husk is newer than this challenge.
Explanation
L►L§fo↓2`xQ  Implicit input, say x = "ababc"
          Q  Nonempty substrings: ["a","b","ab",..,"ababc"]
    f        Keep those that satisfy this:
              Take s = "ab" as an example.
   §    `x    Split x along s: ["","","c"]
     o↓2      Drop the first two pieces: ["c"]
              This is truthy (i.e. nonempty).
             Result is ["a","b","ab","a","b","ab"]
 ►L          Take element with maximal length: "ab"
             If the list is empty, "" is used instead.
L            Length: 2

 JavaScript, 120
function r(a,b,m){return b=-~b,t=a.slice(0,b),n=a.indexOf(t,b),m=b>m&&!~n?m:b,a!=t&&r(a,b,m)||(a?r(a.slice(1),m,m):~-m)}

Perl 5 with -p, 40 bytes
$_+=(sort map{y///c}/(?=(.+).*\1)/g)[-1]

Try it online!

Pyth - 16 bytes
I need to golf the converting all the strings to lengths and finding the max.
eSlM+ksmft/dTd./

Test Suite.

Mathematica, 75 65 bytes
10 bytes saved due to @JingHwan Min.
Max@StringLength@StringCases[#,a___~~___~~a___:>a,Overlaps->All]&

Anonymous function. Takes a string as input, and returns a number as output.

I don't think you need the beginning and ending BlankNullSequence (___) when Overlaps->All is there. Max@StringLength@StringCases[#,a___~~___~~a___:>a,Overlaps->All]& would be just fine.

@JungHwanMin Thanks, was confusing it with StringReplace :P

Clojure, 112 bytes
#(apply max(for[R[(range(count %))]j R i R](let[[b e](split-at i(drop j %))](if((set(partition i 1 e))b)i 0)))))

loops twice over numbers 0 to n - 1 (n being length of the string), drops j characters and splits the remainder into "beginning" and "end" parts. Creates a set of all substrings at e of length b and uses it as a function to check if b is found from there. Returns the length of b if found and 0 otherwise, returns the max of these values.
Would be interesting to see a shorter version.

Retina, 24 bytes
L$v`(.*).*\1
$.1
N`
G-1`

Try it online!
A warmup for me to learn the new features of Retina 1.
Explanation
L$v`(.*).*\1
$.1

A List stage, this returns all the matches for the regex (.*).*\1, wich matches any pattern of the form "ABA", where A and B are two arbitrary substrings (possibly empty). The additional options given to this stage are v, which considers overlapping matches, and $ which applies a substitution to each of the matches before returning it: the substitution is indicated in the second line, and corresponds to the length (.) of the first capturing group (which would be the substring "A" in the previous example).
N`

We now have all the lengths of repeated substrings, this stage simply sorts them in numerical order, from the shortest to the longest.
G-1`

Finally, this grep stage (G) keeps only the last (-1) result, which is the length of the longest repeated substring.

Javascript, 165 bytes
function a(s){var l=s.length/2,z=1,f='';while(z<=l){var t=s.substr(0,z),c=0;for(var i=0;i<s.length;i++){if(s.substr(i,z)===t){c++;if(c>1){f=t}}}z++}return f.length}

Test Cases
console.log(a('abcabcabcabc')) // Output 6
console.log(a('xyz'))          // Output 0
console.log(a('aaaaaaa'));     // Output 3
console.log(a('abcdefabc'));   // Output 3

Welcome to Programming Puzzles & Code Golf. Unfortunately, this returns 2 for input ababcabcabcabcab, but the string cabcab is repeated .


text:
Is this a number?
Prelude:
I wanted to train making test cases, so I'm gonna try them on something easy.
Challenge:
Take any given (string) input (within visible ASCII range) and deduce if it's a number and output something that could be used to evaluate.
Rules:

A number will only contain the characters -0123456789,.
Answers are only required to recognise numbers between -1000000000 and 1000000000 (exclusive), but may recognise arbitrarily large numbers.
You can write a full program or a function.
If a number, return anything that could be used to discern it and document the output in the description (ex. My program outputs T if a number, F if not.).
Input will be any amount of characters within ASCII range or empty (if empty return whatever you'd output if not a number).
Numbers could include a decimal point (ex. 3.14). If they do, they must have at least one digit before the decimal point and at least one after it.
Numbers could have leading or trailing zeros (ex. 000001.00000).
The integer part of a number could be divided for readability into chunks of three digits with commas (ex. 1,000.23456). In this case they must be divided every three digits from right to left (ex. 1,234,567, 10,000.202, 123,234.00, 0,123.293).
Negatives numbers are indicated by a leading - (ex. -1.23). A leading + to indicate a positive number is not permitted, and should result in the falsy output.
Exceptions are NOT counted as valid and discernible output (except when they can pass outputs to standard out stream (ex. Exception on line N [...] can be put in as output for a number/nonnumber if the string is put to standard out stream.

Test cases:
(assuming the My program outputs T if a number, F if not. version)
123 -> T [on integer]
-123 -> T [negative numbers need to be handled]
0 -> T [on zero]
123.456 -> T [on floating point]
123,456.789 -> T [on evenly divided by 3 digits with comas]
123456789 -> T [thousand separators are not required]
0000001.00000 -> T [on leading/trailing zeros]
00.00 -> T [on zero and leading/trailing zeros]
999999999.9999999999999999999999999999999999999999999999999999 -> T [on close to the maximum value]
-999999999.9999999999999999999999999999999999999999999999999999 -> T [on close to the minimum value]
 -> F [on empty]
lolz -> F [on non-number value]
n4melyh4xor -> F [on non-number with digits]
  1.2 -> F [on space-padded]
9.3 1.3 -> F [on anyhow separated multiple numbers]
1e5 -> F [no scientific notation]
50cl05e.buty3ts0f4r -> F [on input with letters obscuring the number]
1,2,3,4.5678 -> F [on badly readability-divided number]
1,234.5,678 -> F [on readability-divided floating point part]
.234 -> F [on no leading zero]
+1 -> F [no leading + sign]
1.234.3 -> F [only one decimal point]
12345,678 -> F [on separator stopping mid-way]

code-golf, least characters is the winner.

Can we assume the input is always ASCII?

@BradGilbertb2gills, yes.

If -123 is OK, what about +456 --> good or bad.  Or is + left out of the party?

@chux, the party train left before the + got there.
Better luck next time, +.

If the input is outside the range -1000000000 to 1000000000, should it return T or F?

@MitchellSpector, if you are able to parse numbers bigger than that, feel free to.

When people ask for clarifications in comments, you should edit the question. It should never be necessary to read the comments in order to know the spec. I've edited to include the answers and some test cases.

"If a number, return anything that could be used to discern it and document the output in the description" - that's rather vague / poorly worded. If I output the input, it can still be used to discern whether the input was a number.

A good test case would be one where the thousands separator stops mid-way. 12345,678 -> F

@JanDvorak, cool, included.

True ASCII is 7-bit, may I use PETSCII which is 8-bit ASCII-compatible character encoding ?

Retina, 28 29 31 40 34 bytes
^-?\d{1,3}((,\d{3})*|\d*)(\.\d+)?$

Outputs 1 if truthy, 0 otherwise. As far as I understand, in this case Retina outputs the number of matches the regex has on the input.
Try it online!
Test Suite
Edits

Fixed to comply with the "there should be digits after the decimal place" rule
Fixed to comply with the "handle negatives" rules
Fixed to comply with the optional comma separators
Fixed bug with thousands separators as noted by @MartinEnder
Golfed by removing conditional lookahead

RegExplanation
^-?\d{1,3}((,\d{3})*|\d*)(\.\d+)?$
^                                $  This marks the start and end of regex
 -?                                 Optional hyphen for negative number
   \d{1,3}                          Matches between 1 and 3 digits
          (             )           Capturing group
           (,\d{3})*                 Matches at least zero of comma and three numbers (in the case of separators)
                    |                OR
                     \d*             Matches at least zero digits (in the case of no separators)
                        (\.\d+)?    Matches an optional . and at least one digit (for decimal numbers)

@MartinEnder Fixed! Also, how do you specify the flags (say flags for m and g) in Retina?

Put a \`` in front of the regex, and then the modifiers go in front of that, e.g. m`^.$. g` does not exist in .NET, matches are global by default.

JavaScript, 46 49 bytes
This is a direct port of my Retina answer. The only reason I used JS is so that there is an easy way to test the regex using the Snack Snippet below
f=s=>/^-?\d{1,3}((,\d{3})*|\d*)(\.\d+)?$/.test(s)

f=s=>/^-?\d{1,3}((,\d{3})*|\d*)(\.\d+)?$/.test(s)
<input oninput=p.innerText=f(value)>

If it weren't for some of the rules (such as the comma rule), one could simply do isNaN(+prompt()) for 16 characters. Such is life, I suppose

Perl 6, 42 bytes
{?/^\-?[\d**1..3[\,\d**3]+|\d+][\.\d+]?$/}

Try it
Expanded:
{  # bare block lambda with implicit parameter ｢$_｣

  ? # turn the following into a Bool result

  /  # match implicitly against ｢$_｣

    ^                 # beginning of string

    \- ?              # optional leading ｢-｣

    [

      \d ** 1..3      # 1 to 3 digits
      [
        \,            # comma
        \d ** 3       # three digits
      ]+              # repeat at least once

    |                 # or

      \d+             # at least one digit

    ]

    [ \. \d+ ]?       # ｢.｣ followed by at least one digit optionally

    $  # end of string

  /
}

PHP, 62 bytes
<?=preg_match("#^-?(\d+|\d{1,3}(,\d{3})*)(\.\d+)?$",$argv[1]);

The builtin cannot handle commas and it accepts scientific notation; so I had to walk the regex way. <?=is_numeric($argv[1]); would have been 24 bytes.

Pyth, 25 characters
:zCiCM"૧祥쪤"^T6

Compresses Kritixi Lithos’ regex.
Try it online. Uses Unicode characters outside the Basic Multilingual Plane, which TIO apparently can’t handle? This little app reports the wrong size for the string, though. This character/byte counter gets it right.

bash/Unix tools, 64 bytes
egrep -c '^-?([0-9]+|[0-9]{1,3}(,[0-9]{3})+)(\.[0-9]+)?$'<<<"$1"

Save this as a file, and pass the string to be tested as the first argument to the command.
Output is 0 for a non-number, 1 for a number.
If you're willing to accept input from stdin and if you can guarantee that the input consists of just one line, then you can remove the <<<"$1" at the end, resulting in 57 bytes.
As for the code itself, the -c option to egrep counts the number of matching lines (which will be either 0 or 1).

C89, 195 bytes
b,d,c,i;f(char*s){b=*s;for(d=c=i=0;i++,*(s++),d+=*s=='.',c+=*s==',',b=c?i&(i%4!=3)&*s==','?0:b:b;)if(*s==45&!i);else if((*s==32)|(*s==46)|*s==43|!isdigit(*s)&*s!=46&*s!=44)||!(d-1))b=0;return b;}

Ungolfed:
bool is_base10_number (const char* const str) {

  if(!str[0])return false;

  size_t
    dpts = 0,
    cmas = 0;

  for (size_t i = 0; i < strlen(str); i++) {

    if ((str[i] == '-') && (!i)){
      continue;
    }

    if (
      (str[i] == ' ')
      || (str[0] == '.')
      || (str[0] == '+')
      ||
      (
        (!isdigit(str[i]))
        && (str[i] != '.')
        && (str[i] != ',')
      )
    ) {
      return false;
    }

    dpts += str[i] == '.';
    cmas += str[i] == ',';

    if (cmas) {
      if (i & ((i % 4) != 3) & str[i] == ',') {
        return false;
      }
    }

  }

  if (dpts > 1) { return false; }

  return true;
}

c#, 75 bytes
bool t(string n){double v;return double.TryParse(n.Replace(",",""),out v);}

Python 2, 79 bytes
Regex solution
import re
lambda s:[s]==re.findall('-?(?:\d{1,3}(?:,\d{3}\d+)(?:\.?\d+)?',s)

-?                                          | Starts with 0-1 dashes
  (?:\d{1,3}(?:,\d{3})+                     | Have 1-3 digits and 1+ (comma followed by 3 digits)
                       |\d+)                | or 1+ digits
                            (?:\.?\d+)?     | Ends with dot and 1+ digits or nothing

Try it online


text:
Pen Pineapple Apple Pen... with your own pens, pineapples and apples
Prelude:
This challenge is different from "another cat program".
There's literal tons of different twists, why can't I have my own, people?
Unique things:

It isn't reading direct input to output.
It is manipulating the string in a way that for sure isn't a straight-up cat.

Challenge:
Given 3 inputs (or one input, separated however you like) get three objects (words) that we're going to substitute for pens, pineapples and apples in the lyrics and output.
Output format (according to lyrics found on AZLyrics):
Assuming (replace values with brackets with these):

A, B, C with input words (ex. apple)
UA, UB, UC with input words with uppercase first letters (if not uppercase already) (ex. Apple)
FUA, FUB, FUC with respectively first uppercase letters: (ex. A)
a/an with article respective to first letter vowel/consonant (ex. an)

[FUA]-[FUB]-[FUC]-[FUA]

I have [a/an] [A], I have [a/an] [C].
Uh! [UC]-[UA]!

I have [a/an] [A], I have [a/an] [B].
Uh! [UB]-[UA]!

[UC]-[UA], [UB]-[UA].
Uh! [UA]-[UB]-[UC]-[UA].
[UA]-[UB]-[UC]-[UA]!
Test case:
Test with pen, pineapple and apple:
P-P-A-P

I have a pen, I have an apple.
Uh! Apple-Pen!

I have a pen, I have a pineapple.
Uh! Pineapple-Pen!

Apple-Pen, Pineapple-Pen.
Uh! Pen-Pineapple-Apple-Pen.
Pen-Pineapple-Apple-Pen!

Rules:

If input doesn't start with a letter, assume consonant (a) and first uppercase the first character (ex. 123 -> 1).
code-golf, lowest amount of characters wins!

Lets say we input pen, pineapple and 1pple;                                       should we assume consonant a only for the first line P-P-A-P OR the other instances of '1pple ' should be changed to 'apple' as well?

@officialaimm, will edit, assume first character (in your case 1).

I shouldn't have googled this. Now, it's stuck in my head -_-

The a/an rule treats consonants/vowels as sounds not letters. For example, you write a user, not an user. That will be difficult to get right, unless we should ignore the "real" rule for this challenge and just look at the first letter. In that case, you should specify which letters should be considered vowels.

@Dennis, gonna ignore for now.

Pen Pineapple Code golf

JavaScript (ES6), 217 ... 187 183 bytes
Takes input as an array of 3 strings, such as ['pen', 'pineapple', 'apple'].
a=>`0-1-2-0

6, 895-3!

6, 794-3!

5-3, 4-393-4-5-3.
3-4-5-3!`.replace(/\d/g,n=>[u=(w=a[n%3])[0].toUpperCase(),u+w.slice(1),`I have a${~'AEIOU'.search(u)?'n':''} `+w,`.
Uh! `][n/3|0])

Examples

let f =

a=>`0-1-2-0

6, 895-3!

6, 794-3!

5-3, 4-393-4-5-3.
3-4-5-3!`.replace(/\d/g,n=>[u=(w=a[n%3])[0].toUpperCase(),u+w.slice(1),`I have a${~'AEIOU'.search(u)?'n':''} `+w,`.
Uh! `][n/3|0])

console.log(f(['pen', 'pineapple', 'apple']));
console.log(f(['golf', 'puzzle', 'code']));

'golf', 'puzzle', 'code' IMHO

Perl 6, 165 bytes
{"0-3-6-0

2, 897-1!

2, 594-1!

7-1, 4-191-4-7-1.
1-4-7-1!".subst: /\d/,->$x {((.tc.comb[0],.tc,"I have a{'n' if /:i^<[aeiou]>/} $_" for $_),".
Uh! ").flat[$x]},:g}

Uses the same approach as Arnauld's JS answer.

Python 3.6 -  351 287 286 bytes
def x(a,b,c):t=(a,b,c);p,q,r=('a'+'n'*(i[0]in'aeiouAEIOU')for i in t);A,B,C=map(str.title,t);print(f"""{A[0]}-{B[0]}-{C[0]}-{A[0]}

I have {p} {a}, I have {r} {c}.
Uh! {C}-{A}!

I have {p} {a}, I have {q} {b}.
Uh! {B}-{A}!

{C}-{A}, {B}-{A}.
Uh! {A}-{B}-{C}-{A}.
{A}-{B}-{C}-{A}!""")

There is nothing fancy here except making use of the new feature of string literal formatting.

Input:
s('golf','puzzle','code')

Output:
G-P-C-G

I have a golf, I have a code.
Uh! Code-Golf!

I have a golf, I have a puzzle.
Uh! Puzzle-Golf!

Code-Golf, Puzzle-Golf.
Uh! Golf-Puzzle-Code-Golf.
Golf-Puzzle-Code-Golf!

Note - The version is 3.6 where string literal formatting was introduced. Hence, this won't work in earlier versions.

Not sure, but since you are already indenting in your long string, I think that you could use the actual characters \n and be able to skip the triple quotes.

@nedla2004 Using '\n' will actually be longer. Skipping " will save only 2 bytes, but \n will add 12 bytes.

Batch, 494 490 bytes
@echo off
set s=%1
set t=%2
set u=%3
call:u %s:~,1%- %t:~,1%- %u:~,1%- %s:~,1%
echo(
call:h %1 %3
call:u Uh! %3- %1!
echo(
call:h %1 %2
call:u Uh! %2- %1!
echo(
call:u %3- %1, %2- %1.
call:u Uh! %1- %2- %3- %1.
call:u %1- %2- %3- %1!
exit/b
:h
set s=I have a %1, I have a %2.
for %%v in (a e i o u)do call set s=%%s:a %%v=an %%v%%
echo %s%
exit/b
:u
set s= %*
for %%u in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)do call set s=%%s: %%u= %%u%%
echo%s:- =-%

Explanation: The :h subroutine handles the line I have a %, I have a %. The %s are substituted from the appropriate command-line arguments, and then the strings a a, a e, a i, a o and a u are replace with the equivalent an version. The :u subroutine handles the other lines; it takes the parameter words, and upper cases all the first letters. (An extra space is prefixed to allow the first word to be upper cased, but it is removed on output.) To handle words after -s, extra spaces are passed, but they are also deleted on output. The :u subroutine is also used for the first line, although extracting the initials is awkward.

Lua, 615 607 bytes
Saved 8 bytes thanks to [an anonymous user]
Whew, long one. Try it here.
w=io.read a,b,c=w(),w(),w()function d(u)if ("aeiouAEIOU"):find(z(u))~=nil then return "an" else return "a" end end function z(y)return y:sub(1,1):upper()end f=z(c)..c:sub(2).."-"..z(a)..a:sub(2).."-"..z(b)..b:sub(2).."-"..z(a)..a:sub(2)print(z(a).."-"..z(b).."-"..z(c).."-"..z(a).."\n\nI have "..d(a).." "..a..", I have "..d(c).." "..c..".\nUh! "..z(c)..c:sub(2).."-"..z(a)..a:sub(2).."!\n\nI have "..d(a).." "..a..", I have "..d(b).." "..b..".\nUh! "..z(b)..b:sub(2).."-"..z(a)..a:sub(2).."!\n\n"..z(c)..c:sub(2).."-"..z(a)..a:sub(2)..", "..z(b)..b:sub(2).."-"..z(a)..a:sub(2)..".\nUh! "..f..".\n"..f.."!")

I am 100% certain this can be shortened. I am just lazy..
Basically uses a lot of string manipulation.
There are 3 main functions and one variable:

d(string): returns an if string is vowel (AEIOUaeiou), else returns a
z(string): returns the first letter in uppercase
z(s) .. s:sub(2): returns whole word, but first letter uppercase
f: the end word (in a variable, to save some bytes). In your test case, it would be Pen-Pineapple-Apple-Pen.

Input: pen, pineapple, apple
Output:
P-P-A-P

I have a pen, I have an apple.
Uh! Apple-Pen!

I have a pen, I have a pineapple.
Uh! Pineapple-Pen!

Apple-Pen, Pineapple-Pen.
Uh! Pen-Pineapple-Apple-Pen.
Pen-Pineapple-Apple-Pen!

To whoever the anon user was: please don't make edits to golf people's code. (just in case they come back)

Python 2, 283 bytes
a=input()
r='0-1-2-0\n\n9 3, 9 5.\nUh! 8-6!\n\n9 3, 9 4.\nUh! 7-6!\n\n8-6, 7-6.\nUh! 6-7-8-6.\n6-7-8-6!'
for j in range(10):r=r.replace(str(j),([i[:1].upper()for i in a]+[['a ','an '][1+'aeiouAEIOU'.find(i[:1])/9]+i for i in a]+[i[:1].upper()+i[1:]for i in a]+['I have'])[j])
print r

Try it online!

TypeScript's Type System, 348 bytes
//@ts-nocheck
type P<S>=Capitalize<S>
type U<S>=P<S extends`${infer A}${any}`?A:S>
type N<S>=`I have a${U<S>extends"A"|"E"|"I"|"O"|"U"?"n":""} ${S}`
type F<A,B,C,D=P<A>,E=P<B>,F=P<C>,G=`${D}-${E}-${F}-${D}`>=`${U<A>}-${U<B>}-${U<C>}-${U<A>}

${N<A>}, ${N<C>}.
Uh! ${F}-${D}!

${N<A>}, ${N<B>}.
Uh! ${E}-${D}!

${F}-${D}, ${E}-${D}.
Uh! ${G}.
${G}!`

Try it at the TypeScript playground!
Composes helper types to avoid repeating as much code as possible, then uses them in a type F<A,B,C>.
Explanation:
type P<S>=Capitalize<S>   // alias the built-in to uppercase the first
                          // letter of a string type, since it is
                          // used a lot.

type U<S>=.               // to get the initial of the string, we
  P<S extends             // capitalize the result of matching against
    `${infer A}${any}`    // a string-type to match the first letter
      ?A                  // select that letter to capitalize
      :S>                 // unless the match failed somehow.

type N<S>=                // to get the "I have [a/an] [S]" bit, we
  `I have a${             // take "I have a" and
    U<S>extends           // check if the initial of the word matches
      "A"|"E"|"I"|"O"|"U" // an uppercase vowel
        ?"n":""           // if it does, insert "n", otherwise ""
  } ${S}`                 // finally, we append a space and the word.

type F<A,B,C,             // take the three words A, B, and C
  D=P<A>,E=P<B>,F=P<C>,   // assign D, E, F to A, B, C capitalized
  G=`${D}-${E}-${F}-${D}` // assign G to the "Pen-Pineapple-Apple-Pen"
>=
`${U<A>}-${U<B>}-${U<C>}-${U<D> /* the P-P-A-P bit */}

${N<A>}, ${N<C> /* I have a pen, I have an apple */}.
Uh! ${F}-${D /* Apple-Pen */}!

${N<A>}, ${N<B> /* I have a pen, I have a pineapple. */}.
Uh! ${E}-${D /* Pineapple-Pen */}!

${F}-${D /* Apple-Pen */}, ${E}-${D /* Pineapple-Pen */}.
Uh! ${G /* Pen-Pineapple-Apple-Pen */}.
${G /* Pen-Pineapple-Apple-Pen */}!`