text:
Divisibility test
Task
Given two strictly positive integers n and d as input, determine whether n is evenly divisible by d, i.e., if there exists an integer q such that n = qd.
You may write a program or a function and use any of the our standard methods of receiving input and providing output.
The output should be a truthy or a falsy value; truthy if n is divisible by d, and falsy otherwise.
Your code only has to handle integers it can represent natively, as long as it works for all signed 8-bit integers. However, your algorithm has to work for arbitrarily large integers.
You may use any programming language, but note that these loopholes are forbidden by default.
This is code-golf, so the shortest valid answer – measured in bytes – wins.
Test cases
 n,  d    output

 1,  1    truthy
 2,  1    truthy
 6,  3    truthy
17, 17    truthy
22,  2    truthy
 1,  2    falsy
 2,  3    falsy
 2,  4    falsy
 3,  9    falsy
15, 16    falsy

Leaderboard
The Stack Snippet at the bottom of this post generates the catalog from the answers a) as a list of shortest solution per language and b) as an overall leaderboard.
To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:
## Language Name, N bytes

where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:
## Ruby, <s>104</s> <s>101</s> 96 bytes

If there you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the last number in the header:
## Perl, 43 + 3 (-p flag) = 45 bytes

You can also make the language name a link which will then show up in the snippet:
## [><>](http://esolangs.org/wiki/Fish), 121 bytes

 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Shortest Solution by Language

Language	User	Score

Leaderboard

	Author	Language	Size

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

This conversation has been moved to chat.

Jelly, 1 byte
ḍ

This took me hours to golf.
Try it online!

wow that's very very complex!

@MatthewRoh Yep. Like I said, it took me hours to come up with. :P

Brain-Flak, 72 70 64 62 58 46 bytes
{({}[()]{(<()>)}{}<({}[()]<({}())>)>)}{}{{}}{}

Takes dividend and divisor (in that order) as input and prints the divisor (truthy) or nothing. Since each stack has an implicit, infinite amount of zeroes, empty output should be considered falsy.
While not stack-clean, this solution uses only a single stack.
Try it online!
Thanks to @WheatWizard for golfing off 2 bytes!
How it works
                INPUT: a (dividend), b (divisor)
                INITIAL STACK: n = a, d = b, r = 0
                               An infinite amount of zeroes follows.

{               While n is non-zero:
  (
    {}              Pop n from the stack.
    [()]            Yield -1.
    {               While the top of the stack (initially, d) is non-zero:
      (<()>)          Push 0.
    }
    {}              Pop 0. This will remove d from the stack if d = 0, leaving r
                    on top. We can think of this as performing the assignment
                    (d, r) = (r, d) if d = 0.
    <
      (
        {}              Pop d.
        [()]            Yield -1.
        <
          (
            {}              Pop r.
            ()              Yield 1.
          )               Push r + 1.
        >               Yield 0.
      )               Push d + (-1) + 0 = d - 1.
    >               Yield 0.
  )               Push n + (-1) + 0 + 0 + 0 = n - 1.
}               Each iteration decrements n, swaps d and r if d = 0, decrements d,
                and increments r.
                FINAL VALUES: n = 0
                              d = b - r
                              r = a % b if a % b > 0 else b
{}              Pop n.
{               While the top of the stack is non-zero:
  {}              Pop it.
}               This pops d and r if d > 0 (and, thus, a % b > 0) or noting at all.
{}              Pop d or a 0, leaving r if r = b and, thus, a % b = 0.

Modulus calculation, 42 bytes
The above full program can be modified in a trivial manner to calculate the modulus instead.
{({}[()]<({}[()]<({}())>)>{(<()>)}{})}{}{}

As before, this method is not stack-clean, but it uses only a single stack. A modulus of 0 will leave the stack empty, which is roughly equivalent to leaving 0; each stack contains infinite zeroes.
Try it online!
How it works
Compare the two loops of the divisibility tester and the modulus calculator.
{({}[()]{(<()>)}{}<({}[()]<({}())>)>)}
{({}[()]<({}[()]<({}())>)>{(<()>)}{})}

The only difference is the location of {(<()>)}{}, which swaps d and r if d = 0. To calculate the modulus, we perform this swap after decrementing d and incrementing r.
This change does not affect the outcome if a %b > 0, but if a % b = 0, it leaves (n, d, r) = (0, b, 0) – rather than (n, d, r) = (0, 0, b) – on the stack.
Thus, to obtain the modulus, we only have to pop n and d with {}{}.
Stack-clean modulus calculation, 64 bytes
The 42-byte modulus algorithm is not stack-clean, so it cannot be used as is in all programs. The following version pops dividend and divisor (in that order) from the active stack and pushes the modulus in return. It has no other side effects.
({}(<()>)){({}[()]<(({}()[({})])){{}(<({}({}))>)}{}>)}({}{}<{}>)

This solution is largely based on @WheatWizard's previous 72-byte record, but it saves 6 bytes by never switching stacks.
Try it online!
How it works
             INPUT: a (dividend), b (divisor)
             INITIAL STACK: n = a, b

(
  {}         Pop and yield n = a.
  (<()>)       Push d = 0.
)              Push n + 0 = n.
             STACK: n, d = 0, b
{(           While n in non-zero:
  {}           Pop and yield n.
  [()]         Yield -1.
  <
   ((
     {}         Pop and yield d.
     ()         Yield 1.
     [({})]     Pop b, push it back on the stack, and yield -b.
   ))         Push d + 1 + -b = d + 1 - b twice.
   {          While/if d + 1 - b is non-zero, i.e., if d < b - 1
     {}         Pop d + 1 - b (second copy).
     (<(
       {}         Pop d + 1 - b (first copy).
       ({})       Pop b and push it back on the stack.
     )>)        Push d + 1 - b + b = d + 1, then 0.
   }          If the loop wasn't skipped entirely, pushing 0 breaks out.
              If d          Yield 0.
)}        Push n + -1 + 0 = n - 1. Break if n - 1 = 0.
          STACK: n = 0, d = a % b, b
(
  {}        Pop and yield n = 0.
  {}        Pop and d = a % b.
  <{}>      Pop b, but yield 0.
)         Push 0 + a % b + 0 = a % b.

x86_32 machine code, 8 bytes
08048550 <div7>:
 8048550:   99                      cdq
 8048551:   f7 f9                   idiv   %ecx
 8048553:   85 d2                   test   %edx,%edx
 8048555:   0f 94 c0                sete   %al

This is my first code golf answer, so hopefully I'm following all the rules.
This first calls cdq to clear out the edx register, then performs signed division on the ecx register, which stores the remainder in edx. The test edx, edx line will set the zero flag if edx is zero, and sete puts a 0 for false if edx was not zero, and puts a 1 for true if edx was 0.
This is just the code snippet that contributes to the byte count, but for testing, here is the C code I wrote with the inline assembly because it's easier this way to handle I/O.

Welcome to PPCG, nice first answer!

Does it need to be a full program? I was formatting my response kinda off this answer.
And thank you! I'm hoping to get better at assembly/machine code for more code golfing!

Input and output in specified registers in assembly is allowed by default: input, output. This is a perfectly acceptable submission. Welcome to PPCG!

Fantastic! Thank you!

Brain-flak 102, 98, 96 bytes
(({}<>))<>{({}[()])<>(({}[()])){{}(<({}[({})])>)}{}({}({}))<>}{}<>([{}]{}){<>(([()])())}({}{}())

Eww. Gross. I might post an explanation, but I barely understand it myself. This language hurts my brain.
Try it online!
Thanks to github user @Wheatwizard for coming up with a modulus example. I probably could not have figured that out myself!
Also, the shorter answer is here.
Possibly incorrect explanation:
(({}<>))                    #Push this element onto the other stack
<>                          #Move back to stack one.
{                           #While the top element is non-zero:
 ({}[()])                   #  Decrement the number on top
 <>                         #  Move to the other stack
 (({}[()]))                 #  Push the top element minus one twice
 {                          #  While the top element is non-zero:
  {}                        #    Pop the top element
  (<          >)            #    Push a zero
        ({})                #    Push the second from top element
       [    ]               #    Evalue this second from top element as negative
    ({}      )              #    And push that negative plus the top element
 }
 {}                         #  Pop the top element
 ({}({}))                   #  Push the top element plus the second from the top, AND push the second from top
 <>                         #  Switch stacks
}

{}                          #Pop the stack
<>                          #Switch to the other stack
([{}]{})                    #And push the top element minus the second element.

The rest is pretty straightforward.
{              }            #While the top element is non-zero:
 <>                         #Move to the other stack
   (([()])  )               #Push a negative one
          ()                #AND push the previously pushed value + 1 (e.g. 0)

                 (      )   #Push:
                  {}{}      #The top two elements added together
                      ()    #Plus one

The rest is pretty straightforward. Yeah, it seems like it.

24 bytes if you count each brainflak instruction as a byte.

Hexagony, 15, 13, 12 10 bytes
Everybody's favorite hexagon-based language! :D
TL;DR works using magic, unformatted solutions in decreasing byte count:
?{?..>1'%<.@!'/
?{?!1\.'%<@.>
?{?\!1@'%\!(
?{?!1\@'%<

Saved 2 bytes thanks to @MartinEnder's layout wizardry.
@FryAmTheEggman saved 1 byte by using the corners more creatively
Both @MartinEnder and @FryAmTheEggman came up with a 10 byte solution that doesn't print anything for falsely values.
My solution (15):
Unformatted:
?{?..>1'%<.@!'/

Formatted:
  ? { ?
 . . > 1
' % < . @
 ! ' / .
  . . .

@Martin Ender's Solution (13):
Unformatted:
?{?!1\.'%<@.>

Formatted:
  ? { ?
 ! 1 \ .
' % < @ .
 > . . .
  . . .

Explanation:
First, we get the input and take the modulus.
  ? { ?
 . . . .
' % . . .
 . . . .
  . . .

Then, it checks if the modulus is 0 or not. If it is, the IP turns 60 degrees left, bounces off the mirror, sets the cell to 1 and prints.
Then, the IP continues onto the fourth row. When it reaches the >, it turns to the right instead (because the value of the cell is now 1). It goes oob, and comes back in the bottom right corner heading NW. The IP hits the <, goes along the top row, and comes back in the right corner to hit the @, stopping the program.
  . . .
 ! 1 \ .
. . < @ .
 > . . .
  . . .

If the modulus turns out to be positive, the IP turns 60 degrees to the right. Once it goes out the bottom right corner, it continues on the bottom left edge because of Hexagony's wrapping rules. The ' is reused to make the IP go to a cell with 0 in it. The IP then travels along the fourth row, wraps around to the second, hits print, and gets reflected into the <. The rest of the path to the @ is the same.
  . . .
 ! . \ .
' . < @ .
 > . . .
  . . .

That's some serious wizardry.
@FryAmTheEggman's Solution (12):
Unformatted:
?{?\!1@'%\!(

Formatted:
  ? { ?
 \ ! 1 @
' % \ ! (
 . . . .
  . . .

Explanation:
Like the other solutions, it gets the input and takes the modulus.
  ? { ?
 . . . .
' % . . .
 . . . .
  . . .

Then, the IP gets deflected into the bottom corner. If the modulus is positive, it goes on the top left edge. The ? has no more input, so it sets the cell to 0. The ! then prints the 0, and the @ terminates the program.
  ? . .
 \ ! . @
. . \ . .
 . . . .
  . . .

Things are much trickier for when the modulus is 0. First of all, it gets decremented, then reset to 0, then set to 1, then printed. Then, the 1 gets decremented to 0. After that, the program runs like it does at the beginning until it tries to do 0%0. That makes it throw a silent error and quit.
  ? { ?
 . . 1 .
' % \ ! (
 . . . .
  . . .

I really like the silent error trick, but a simpler way would be to replace the ( with / so that the IP passes through the first time, but gets reflected into @ the second.
Collaborative solution (10):
Unformatted:
?{?!1\@'%<

Formatted:
  ? { ?
 ! 1 \ @
' % < . .
 . . . .
  . . .

This program starts out the same as all the other programs, getting the input and modding it.
If the input is 0, the IP turns left when it hits <. It gets deflected into 1!@, which prints 1 and quits.
  . . .
 ! 1 \ @
. . < . .
 . . . .
  . . .

If the input is positive, the IP turns right when it hits <. It exits through the corner, and goes along the top right edge hitting the @ without printing.
  . . ?
 . . . @
. . < . .
 . . . .
  . . .

I think you should format your answer differently. Having four answers in a single code block makes it appear as if your byte count is wrong.

Javascript (ES6) 17 12 11 bytes
a=>b=>a%b<1

EDIT: Removed 5 bytes because 'a>0' is expected.
EDIT2: Removed 1 byte thanks to Downgoat.

Use currying to save one byte: a=>b=>

So how do I execute this? When I try d=a=>b=>a%b<1 followed by d(32,2) in the JS console... I simply get the response function b=>a%b<1

@WallyWest this uses currying, so you would type in d(32)(2). Because d(32) gives function b=>a%b<1, you then have to call that function with your b value

Mathematica - 17 13 3 bytes
∣

Thanks to @MartinEnder for saving a ton of bytes!

What character is that?

@Cyoce I don't know its Unicode-code (on the phone at the moment), but it's an short operator for Divisible[].

@Cyoce I think it's the pipe symbol, also known as shift+backslash.

@Pavel if it were the pipe symbol, it would not be three bytes.

@Cyoce it's the U+2223 character: http://www.fileformat.info/info/unicode/char/2223/index.htm

Retina, 12 bytes
^(1+)\1* \1$

Takes space-separated input in unary, like 111111111111 1111 to check if 12 if divisible by 4. Prints 1 (true) or 0 (false).
Try it online!
FryAmTheEggman saved two bytes. Oops, rewrote my answer to take the arguments in the right order. (Then Fry beat me to it in the comments. I’m slow at regex!)

To fix the order, if it becomes necessary, I think ^(1+)\1* \1$ will work.

I guess with the new spec, the opposite input order is fine again.

Batch, 20 bytes
@cmd/cset/a!(%1%%%2)

Outputs 1 on success, 0 on failure.

Vim, 11 keystrokes
C<C-r>=<C-r>"<C-Left>%<C-Right><1<cr>

Not bad for a language that only handles strings. :D

What does <C-Left> do? Can't test it because it switches windows on mac >_>

@Downgoat are you using ctrl or command? Either way, it's equivalent to "b", except that it works in insert mode too.

To be pedantic, it's the equivalent to B rather than b (and Ctrl+Right is the equivalent of W) - the difference is with non-word characters, but in this case it's doing the exact same thing :) http://vimdoc.sourceforge.net/htmldoc/motion.html#

C#, 27 13 12 Bytes
a=>b=>a%b<1;

Thanks to TuukkaX for pointing out anonymous lambdas are acceptable.
Thanks to David Conrad for pointing me on to currying which I wasn't even aware was a thing.
Short and sweet, since we're only dealing with integers we can use <1 rather than ==0 and save a whole byte.

I'm not sure, but I think that you can just use a lambda: (a,b)=>a%b<1;. +1.

@TuukkaX, thanks I wasn't sure, it just seems so cheaty.

The JS version of this used currying to reduce it by one byte, and that should work for C#, too: a=>b=>a%b<1; (note: you then must call it as f(a)(b) rather than f(a,b))

@DavidConrad oo that's neat, thank you.

brainfuck, 53 bytes
Takes input as bytes, output is a byte value of 0x00 or 0x01. It's the DivMod algorithm followed by Boolean negation.
,>,<[->-[>+>>]>[+[-<+>]>+>>]<<<<<]>,>[<+>,]+<[>-<-]>.

Try it online - Has a bunch of extra + near the end so you can see the output in ASCII.

Could you remove the "div" part of the thing to save bytes?

@LeakyNun This is the shortest known algorithm that gives the modulus. Removing part of it actually makes it longer, because you need more temporary cells. You cannot find a modulus without dividing.

@LeakyNun Just look at how long the Division algorithm is.

There are probably shorter ones, but if so, nobody has found or posted them.

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

This is a denser version of the original Brain-Flak divisibility test algorithm written by Dr Green Eggs and Iron Man DJMcMayhem and myself.
Here is a brief(ish) explanation of how it works:
  ({}<>)        #Move the top of the stack to the other stack #Start Mod
(<      >)      #Push zero
<>              #Switch stacks
{               #While the top of the stack is not zero
 ({}[()])       #Subtract one from the top of the stack
 <>             #Switch stacks
   {}()         #Pop the top, add one and ...
       [({})]   #Subtract the second element on the stack
 ((          )) #Push twice
 {              #If the top is not zero
  {}            #Pop the duplicate
    ({}({}))    #Add the second element to the first
  (<        >)  #Push zero
 }              #End if
 {}             #Pop the zero
 <>             #Switch back
}               #End While
<>              #Switch to the other stack
 ({}<{}>)       #Remove the second value on the stack         #End Mod
(        )      #Duplicate the result of modulation
{               #If the top is not zero
 {}{}           #Pop the top two elements
 (<(())>)       #Push a one and a zero
}               #End if
{}              #Pop the zero

Try it Online!

Nice work! Also welcome to the site! I hope you have fun here. (I certainly have)

Nice first answer, welcome to PPCG!

LOLCODE, 74 64 bytes
HOW IZ I f YR a AN YR b
BOTH SAEM MOD OF a AN b AN 0
IF U SAY SO

It is a full program, current implementations do not require HAI and KTHXBYE

OK, I'll try. One sec…

No, it's two bytes longer.

O RLY? I didn't know that! changing.

BTW here is golfing tips.

oh wow oops. Changing.

Do you need the ANs?

Yes in this case.

Java 8, 11 bytes
a->b->a%b<1

What the heck, there are JS and C# versions of this, why not a Java version, too?
Usage:
import java.util.function.Function;

public class Program {
    public static void main(String[] args) {
        System.out.printf("%d, %d %b%n", 9, 3, divides(9, 3, a->b->a%b<1));
        System.out.printf("%d, %d %b%n", 3, 9, divides(3, 9, a->b->a%b<1));
    }

    public static boolean divides(int a, int b,
            Function<Integer, Function<Integer, Boolean>> f) {
        return f.apply(a).apply(b);
    }
}

a->b->a%b<1 This raises a syntax error, doesn't it?

No, it's valid Java 8.

Sometimes even Java is looking like Perl...

Yeah, I'd add in that this is Java 8 only ;).

so with Java 8 we have to count only lambda expression bytes not the whole class and function boilerplate, cool !

@Sikorski When the challenge asks for a function or a "program or function." If it calls for a complete program, you still need it.

APL (Dyalog Unicode), 3 bytes
0=|

Try it online!
Is zero equal to the division remainder?

This works in J too.

If the expression 0=| is not directly application but requires parentheses i.e. (0=|) as in 2 (0=|) 10, should bytes of parentheses be counted?

@jimfan Parentheses are not needed. You can name the function f←0=| and then apply it with just 2 f 10

I see. Very much like the python solution below if used without parentheses lambda D,d:D%d<1   "hello,world" will generate syntax error. Having knowing this I could probably trim my future solutions further.

C, 60 Bytes
#include <stdio.h>
main(){int a,b;scanf("%d %d",&a,&b);a%b==0;}

Why -1? Explain me

It's possible that nobody downvoted. This is a short answer so it got auto-flagged as low-quality, and then you edited it. For some reason, this casts an automatic downvote. Sorry about that. +1 from me. Also, we allow functions, so you could easily shorten this to int f(a,b){return !(a%b);} or possible even shorter.

Mh, If I use #include<stdio.h> int f(a,b){return !(a%b);}; main(){int a,b;scanf("%d",&a, &b);a%b==0}, It's 72 Bytes. This code is 60 bytes :)

No, my point is that it does not have to be a full program. You may submit just a function instead. int f(a,b){return!(a%b);} is 25 bytes, and if you use the right compiler you could even do f(a,b){return!(a%b);} for 21 bytes.

I tried it, If I use gcc file.c, It returns me a lot of error. My question is ok too?

I've asked the same question before. As long as you can find at least one compiler that it builds and runs in (even with warnings), it counts.

Even shorter function submission: #define f(a,b)!(a%b) (ideone link)

Now my code is 15 Bytes

You need to define a function or a program, not just a snippet.

Do you mean with #include and main?

Code snippets are not allowed; You may define an eponymous or anonymous (i.e. named or unnamed) function, or write a full program.

I fixed it! It's 60 Bytes

@Ronronner The short one compiles files with gcc -std=c89 -c file.c (gcc 5.4.0) or with clang -std=c89 -c file.c (clang 3.7.1).

Do you mean this? int f(a,b){return!(a%b);}

@Ronronner Yes, that.

It doesn't return nothing../a.out
2
2

I think you can remove the space in #include <stdio.h>, and I believe instead of int a,b; you can do a;b;

Got it down to 16  http://codegolf.stackexchange.com/a/110084/16513

R, 22 20 bytes
a=scan();!a[1]%%a[2]

As usually, reads two numbers from the input that is terminated by an empty line.
Update: thanks to Jarko Dubbeldam for shaving off 2 bytes (despite the fact that his edit was rejected, it was very helpful!).

Python, 16 bytes
lambda D,d:D%d<1

Note that this wouldn't work if negative integers were allowed. Luckily, the inputs are strictly positive.

I did lambda a,b:1.*a/b==a/b, but was quite impressed. This is a so complex piece of code...

CJam, 6 4 bytes
Saved 2 bytes thanks to Dennis
q~%!

Try it online
q    e# Take in the input
 ~   e# Dump the individual values to the stack
  %  e# Modulus
   ! e# Boolean NOT

GolfScript, 3 bytes
~%!

Explanation:
~    # Evaluate the input
 %   # Take the first modulus the second
  !  # Boolean not

Try it online!

Brachylog, 2 bytes
%0

Try it online!

Tcl , 34 bytes
ge stdin a
ge stdin b
exp $a%$b<1

My first /*successful*/ attempt in codegolf !
This code must be executed in Tcl shell , otherwise it will not work.
One byte thanks to @Lynn .
Four bytes thanks to @Lynn and @LeakyNun (now I understand what he meant)!

Can you omit ?1:0?

@LeakyNun it's ternary operation . you mean just to return sth when it's devisible ?

What would $a%$b==0 return?

@LeakyNun truth value

@LeakyNun have look here

I mean, can your third line just be exp $a%$b==0?

Or exp $a%$b<1, maybe?

You can reduce it to 27: exp [ge stdin]%[ge stdin]<1. I tried on https://www.tutorialspoint.com/execute_tcl_online.php by typind tclsh on the green area to enter in the interactive shell.

Fortran 95, 78 bytes
function f(i,j)result(k)
integer::i,j,k
k=merge(1,0,MOD(i,j)<1)
end function f

Julia, 9 bytes
D\d=D%d<1

Try it online!

PowerShell v2+, 20 bytes
!($args-join'%'|iex)

Takes input as two command-line arguments $args, -joins them together into a string with % as the separator, pipes that to iex (short for Invoke-Expression and similar to eval). The result is either 0 or non-zero, so we take the Boolean not ! of that result, which means either $TRUE or $FALSE (non-zero integers in PowerShell are truthy). That Boolean is left on the pipeline and output is implicit.
Alternative versions, also 20 bytes each
param($a,$b)!($a%$b)
!($args[0]%$args[1])

Same concept, just slightly different ways of structuring the input. Thanks to @DarthTwon for providing these.
Examples
PS C:\Tools\Scripts\golfing> .\divisibility-test.ps1 24 12
True

PS C:\Tools\Scripts\golfing> .\divisibility-test.ps1 24 13
False

PS C:\Tools\Scripts\golfing> .\divisibility-test.ps1 12 24
False

In both of the other methods I tried golfing this question, I got them to 20 bytes also: param($a,$b)!($a%$b) and !($args[0]%$args[1])

@DarthTwon Indeed. When dealing with small amounts of operations, there's usually at most one or two bytes differences in the different ways of taking the input arguments.

I was hoping to come up with something shorter :P but yeah, there's always multiple ways to skin the cat, especially in PS.

Haskell, 13 11 bytes
((1>).).mod

This defines a new function (!) :: Integral n => n -> n -> Bool. Since mod n m returns only positive numbers if n and m are positive, we can save a byte by using 1> instead of 0==.
Usage:
ghci> let n!d=1>mod n d
ghci> 100 ! 2
True
ghci> 100 ! 3
False

You can go pointfree and save 2 bytes: ((1>).).mod.

PHP, 23 22 bytes
<?=$argv[1]%$argv[2]<1

prints 1 for true, empty string (=nothing) for false
call from cli with n and d as arguments

10 bytes for ancient PHP: <?=$n%$d<1

If you don't mind using PHP4.1: <?=!($A%$B). The values can be passed as part of your $_SESSION, $_COOKIE, $_POST, $_GET or (if I'm not mistaken) over $_ENV.

@Ismael Miguel: Actually I don´t, but I am tired of posting for ancient PHP versions and adding for PHP<5.4 with register_globals=On. But I´ll add it for reference.

Actually, you can't say "for PHP<5.4 with register_globals=On", since you have to count the bytes of your php.ini file containing register_globals=On. However, PHP4.1 is a special case. It is the last version where register_globals=On is the default value, and most functions are available from PHP4.1 and up. This version also allows the use of other functions, like ereg and split without warnings.

MarioLANG, 121 109 107 bytes
Saved 14 bytes thanks to Martin Ender
;>(-)-)+(([!)
)"=========#[
; +(![-)< )<!+
  ==#==="  "#:
>!< >(+ !![(<
=#"="===##=:"
  !      <
  #======"

Try it online!
Explanation
The algorithm is simply to keep subtracting d from n to see if you can do it an integer number of times and have no remainder.
;
)
;

>
=

First, the input is collected. n is in the first cell, d in the second.
 >(-)-)+(([!
 "=========#
          )<
           "
 !
 #"="===##=

This is essentially the main loop. It decrements the first and second cells, and increments the third.
           [!)
           =#[
             !+
             #:
            (<
            :"

This is the final output. If after the incrementing/decrementing, the first cell is 0, then we've eliminated n. If after this, the second cell (d) is 0, then d went into n evenly. We increment and print (1). Otherwise, move back to the first cell (which is 0) and print it.

  +(![-)<
  ==#==="
 !< >(+ !![
 #"="===##=
  !      <
  #======"

This loop happens if the second cell is 0 after incrementing and decrementing. It copies the third cell to the second cell. The part at the bottom is to bypass the loop if the cell is not 0.

J, 3 bytes
0=|

Usage:
2 (0=|) 10

Will return 1. And is equivalent to pseudocode 10 MOD 2 EQ 0
Note this is very similar to the APL answer, because J is heaviliy inspired by APL

Nice first answer, welcome to PPCG!

@LeakyNun  Thanks, I've always browsed around, nice to finally answer.

Forth (gforth), 13 12 bytes
: x mod 0= ;

:   - create new word
x   - word name
mod - modulus operator
0=  - compare value on stack with 0
;   - end word

Use like n d x .
Test cases (-1 is true, 0 is false) :
1 1 x . -1  ok
2 1 x . -1  ok
6 3 x . -1  ok
17 17 x . -1  ok
22 2 x . -1  ok
1 2 x . 0  ok
2 3 x . 0  ok
2 4 x . 0  ok
3 9 x . 0  ok
15 16 x . 0  ok

My first submission! :D

ArnoldC, 244 bytes
HEY CHRISTMAS TREE r
YOU SET US UP 0
GET TO THE CHOPPER r
HERE IS MY INVITATION a
I LET HIM GO b
ENOUGH TALK
BECAUSE I'M GOING TO SAY PLEASE r
TALK TO THE HAND 0
BULLSHIT
TALK TO THE HAND 1
YOU HAVE NO RESPECT FOR LOGIC
YOU HAVE BEEN TERMINATED

Try it online!
How it works
HEY CHRISTMAS TREE r               // Define Variable r
YOU SET US UP 0                    // Set r to 0

GET TO THE CHOPPER r               // Start declaration of r
HERE IS MY INVITATION a            // Use a for calculation
I LET HIM GO b                     // set r to a mod b
ENOUGH TALK                        // End declaration of r

BECAUSE I'M GOING TO SAY PLEASE r  // if r > 0
TALK TO THE HAND 0                 // print 0
BULLSHIT                           // else
TALK TO THE HAND 1                 // print 1
YOU HAVE NO RESPECT FOR LOGIC      // end if

YOU HAVE BEEN TERMINATED           //end main

Pyth, 6 4 3 bytes
%.*

Try It Online!
Input is passed as an array [n,d].
Output is zero for false and a positive integer for true.
Explanation follows:
 .*   Unwraps input (from [n,d] to n, d)
%     Takes n (mod d).

Welcome to PPCG!

Pyke, 2 bytes
%!

Try it here!
not (a mod b)

Actually, 3 2 bytes
%Y

Saved one byte thanks to @Mego.
Try it online!

%Y is shorter

MATL, 2 bytes
\~

Try it online!
\    % Take two inputs implicitly. Compute their modulo
~    % Logical negate. Implicit display

Befunge, 6 bytes
&&%!.@

Try it here! Input two numbers, separated by a space. Output is 0 or 1 for falsy or truthy.

&<@.!% also works

JavaScript (ES6), 12 Bytes
EDIT
This post was beaten here

d=>h=>d%h==0

Explanation:
d=>
   h=>
    d%h==0 // Is the remainder of d/h equal to 0 (i.e. is it divisible)

How is it different from this?

Sorry, I only checked the first page for answers! Didn't even know that existed. I'll delete it now.

Excel VBA, 62 bytes
Function q(b, c)
If b / c = Int(b / c) Then q = 1
End Function

VBA, 46 44 41 bytes
Function f(i,j)
f=i Mod j = 0
End Function

Thanks again. I also made a personal favorite f=InStr(i/j,".")=0. Doesn't work with decimal commas and isn't winning bytes.

Personal preference; when I'm testing values with Mod, I put the test constant first: 0=i Mod j And if you append the body line onto the function declaration, , you'll actually get the End Function line for the price of pressing Enter: Function f(i,j):f=0=i Mod j (28 bytes)

Bash, 23 bytes
expr `expr $N % $D` % 2

I'm sure it can be even shorter...
Output is 0 if N is divisible by D, 1 if it is not

Truthy and falsy don't mean literally the strings "truthy and "falsy", just whatever the natural true/false values are for the language. In the case of bash I'd say an exit code of 0 for truthy and an exit code of 1 for falsy would be appropriate here.

How does % 2 give 1 for 0 and 0 for everything else?

@Titus % 2 means modulo 2. It divides $N by $D, then returns the remainder

I know % ... but %2 will give you 0 for 0 and for every other even remainder, 1 for odd remainders, i.e. a falsy value (0) for remainder 0 (which should have a truthy result) and a truthy one (1) for half of the possible remainders (that should all return a falsy value).

This answer is incorrect. It gives 0 (divisible) for N=2 and D=4 for example.

C, 20 19 bytes
#define f(a,b)a%b<1

Defines a macro f(a,b), which gets preprocessed to !(a%b). I assure you you don't need parens here, because it's just a unary operator. Anyways, if you're a purist, then this will do it, at 25 bytes:
#define f(a,b)((a)%(b)<1)

For a real function, go check Albert's answer :)

+1 This is very clever I've never seen a pre-processor answer before but it saves so much hassle of using return and {, }, ; which are always killers for C on codegolf!

Think I got you beat at 16 bytes though  http://codegolf.stackexchange.com/a/110084/16513

Jellyfish, 5 bytes
pN/|i

Input is a list containing [d n].
Try it online!
The i is replaced with the input value when the program starts. /| folds modulo over the list, taking the second list element modulo the first. N is logical negation, giving 1 for input 0 and 0 for everything else.

R, 20 bytes
Small improvement on this answer.
a=scan();!a[1]%%a[2]

If the result of the modulo operation is 0, this is interpreted as a false, which is then inverted by the !. Any other number would be a truthy, which again is inverted by the ! into a false.

Forth, 6 bytes
mod 0=

example usage
10 2 mod 0=

This is the same code given by @therealfarfetchd, but without the definition (almost all other entries are not given in definition format)

Is this actually a full program then? All answers are required to be either full programs or callable functions, not just snippets.

@MartinEnder When I answer in Forth, I always use a function (word) declaration, because the standard method of taking input is having it already on the stack, and returning is leaving it on the stack or printing. Idk if there is a difference between a full program and a snippet, so I've always considered it a snippet.

@MartinEnder check  short answers above, (i.e. Befunge, Tcl,  J,  PowerShell,  Jellyfish,  Pyth,  Minkolang,  Perl 5,  05AB1E,  R ... etc).

@Ala'aMohammad I don't know Tcl but Befunge, Powershell, Jellyfish, Pyth, Minkolang, 05AB1E, R are all full programs. Perl and J are callable functions.

@MartinEnder for example in 'J' shouldn't functions(verbs) start at least with assignment '=:'? (which is not used in J here)

@Ala'aMohammad Unnamed functions are acceptable. http://meta.codegolf.stackexchange.com/questions/1501/should-function-literals-be-allowed-when-a-function-is-asked-for/1503#1503

@MartinEnder Thanks for the link. J example is an expression denoting a function. I failed to find any documentation/references. Also R example is an expression (or a program, but not a function), Any documentation/references for these two explaining unnamed function similar to what is provided above will help me. Thanks for your patience.

Chip, 356 bytes
*Z~v---v---v---v---v---v---v---.
e H/vZG/vZF/vZE/vZD/vZC/vZB/vZA/vZ
 f*z|)--x)--x)--x)--x)--x)--x)--x)~a
A~#Mxx--xx--xx--xx--xx--xx--xx--xx.
B~#Mxx--xx--xx--xx--xx--xx--xx. `@'
C~#Mxx--xx--xx--xx--xx--xx. `@@--'
D~#Mxx--xx--xx--xx--xx. `@@--('
E~#Mxx--xx--xx--xx. `@@--('
F~#Mxx--xx--xx. `@@--('
G~#Mxx--xx. `@@--('
H~#Mxx. `@@--('
 t~Z`@@--('
,^-{-('
`~Ss

Try it online!
The basic strategy here is to repeatedly subtract the divisor from the dividend until we hit zero, or we go negative. Since Chip only has adders, we negate the divisor and repeatedly add instead, looking for the first iteration that doesn't result in an overflow. Chip operates on eight bits at a time, so this solution only handles positive, signed, two's complement, one-byte integers; therefore input values are allowed to range from 1 to 127. Zero values are somewhat handled: 0/n and 0/0 are truthy; n/0 is falsy.
Each input value is read as a byte, which is why the TIO uses a bit of awk. The inputs saved in the TIO link are the test case 22/2==truthy.
Output is given as ASCII '0' or '1', because it required no extra bytes over code points 0x0 and 0x1.
How it works
This is rather complex (as you may have noticed), so I'll just cover the highlights.
On the first cycle, the dividend, n, is read in via the elements A through H in line 2, and stored for the next cycle in the Z elements to their right.
On the second tick, the divisor, d, is read in via A through H in the first column of lines 4 and onward. This is immediately bitwise-negated via the ~'s and incremented by one via the #'s. We can now store the inverse value, -d, in the column of M elements.
Starting on the second cycle, and every cycle thereafter, n is incremented by -d in the diagonal grouping of @ elements (each pair corresponds to a full-adder), and the new value is stored back in the Z's above.
If there is no overflow carry on the operation, the block with t, S, and s in the lower left will print out one byte and terminate execution. The a at top right will determine whether a '1' or a '0' is printed, based on whether n is currently zero or not.
The other Z and z elements are to provide initialization values for the first cycle, since we don't have d yet. The elements e and f in the top left perform the mapping to ASCII for output. Pretty much all the other elements are wires, to connect everything up.

C, 16 bytes
Believe it or not C (GCC) will return the last modified value if no return method is called.
That said,
f(a,b){a=a%b<1;}

Try it online

Special thanks to @Ahemone and @l4m2 for teaching me about this trick today

It's not first argument, but last modified value

@l4m2 I was wondering how correct that was, thank you; editing it in!

ECMAScript Regex, 10 bytes
^(x+),\1*$

Try it online!
Deciding to learn this after seeing some of Deadcode's amazing submissions. Clearly, I'm starting off with much easier problems. Takes input as d,n, with both number in unary, and matches if the n is divisible by d.
Explanation:
^           From the start of the string
 (x+)       Capture d xs in \1
     ,      Match the separator
      \1*^  In n, match d repeatedly until the end of the string

Pyt, 1 byte
|

Try it online!
Trivial built-in. Takes d then n

Pyth, 3 bytes
!%F

Test suite.

Alternatively: }iF

05AB1E, 6 bytes
II%0Q,

Uses CP-1252 encoding. Try it online!
You can also use the built in
Ö

which does exactly what the challenge asks. Just that the 2 inputs are swapped. Try it online!

Very nice! You can also use the built-in Ö which does exactly what the challenge asks. You only need to specify that the 2 inputs are swapped.

IIrÖ solves that problem, doesn't it?

Minkolang 0.15, 6 bytes
nn%,N.

Try it here!
Explanation
nn        Take two numbers from input
  %       Pop b, a and push a%b
   ,      NOT top of stack
    N.    Output as number and stop.

Clojure, 64 bytes
(fn[n d](nil?(some #((set %) \a)(partition d d "a" (range n)))))

Not a competitive solution but does not use any arithmetic operations. Partitions range 0 .. n into lists of length d and if there is not enough elements for the last list adds "a"s to it. And then try to find a list which contains \a character.
See it online: https://ideone.com/prK5Iq

Perl 5, 14 bytes
A subroutine:
{!((pop)%pop)}

See it in action thus:
perl -E"say sub{!((pop)%pop)}->(3,17)"

First argument is d, second is n.

Labyrinth, 8 bytes
??
@%
!1

Input is just the two numbers, using any non-numeric separator of your choice. Output is either 1 for truthy or nothing at all for falsy.
Try it online!
Alternative solution that prints 0 for falsy but terminates with an error (same byte count):
<1%??
!;

Explanation
There's only one branch in the execution and that's after the modulo (%). When the input is a truthy case, the following is executed:
?   Read integer and push onto stack.
?   Read integer and push onto stack.
%   Take the first modulo the second integer. The result is zero, so the
    instruction pointer keeps moving south.
1   Turn that zero into a one.
!   Print it.
@   Terminate the program.

Otherwise, the following code is executed:
?   Read integer and push onto stack.
?   Read integer and push onto stack.
%   Take the first modulo the second integer. The result is positive, so
    the instruction pointer turns west.
@   Terminate the program.

Excel, 31 13 bytes
=0=MOD(A1,A2)

Enter n in A1, d in A2.
For some reason I convinced myself that we had to handle all integers, so I had =IFERROR(A1/A2=INT(A1/A2),A1=0) to handle d=0.

F#, 18 bytes
let d a=(%)a>>(=)0

Usage:
d 6 3;;
> val it : bool = true

I can shave 1 byte if I define a lambda instead but then I can't use it later.
fun a->(%)a>>(=)0

C++, 36 bytes
bool d(int n, int d){return n%d==0;}
Explanation:
bool isDivisible(int dividend, int divisor) {
    return n % d == 0; // the modulo operator returns remainder,
    // if the number evenly divides, there will be no remainder
}

Usage:
#include <iostream>
#include <string>
int main(int argc, char *argv[]) {
    int div = std::stoi(argv[1]);
    int divis = std::stoi(argv[2]);
    if (isDivisible(div, divis)) {
        std::cout << "They're evenly divisible!" << std::endl;
    } else {
        std::cout << "They're not evenly divisible." << std::endl;
    }
    return 0;
}

Nice! Try this, though. It uses a int to take off 1 byte, uses the less than operator to take off another, and removes a whitespace. int d(int n,int d){return n%d<1;}

C, 33 bytes
int k(int n,int d){return 1>n%d;}

Returns a non-zero integer if the number n is divisible by d, zero otherwise.

Racket, 26 bytes
(λ(n m)(integer?(/ n m)))

C++11, 31 bytes
[](int n,int d){return n%d<1;}

Uses the fact that a%b is always non-negative for positive numbers, and therefore only n%d==0 fulfills n%d<1.
Usage:
int main(){
   const auto lambda = [](int n,int d){return n%d<1;};
   std::cout << lambda(100,2) << "\n";
             << lambda(100,3) << std::endl;
}

Result:
1
0

Element, 7 bytes
__%?!"`

Wow, I'm even more disappointed than expected.  It takes two numbers as input, performs the modulo operation, tests for truthiness, negates the result (so a modulo of 0 is converted to a "true" and other numbers are "false"), then moves this result to the main stack, and then outputs it.

Clojure, 15 bytes
#(=(mod % %2)0)

dc, 8 7 bytes
Input is delimited by a space: n d
?~/z1-n

If false, it outputs 0. If true, it outputs 1 and throws an error about division by zero.
Explanation:
?   # Take input from stdin.
~   # Pop two values from stack. Push quotient. Push remainder.
/   # Attempt to divide quotient by remainder.
    #   If input is divisible, then remainder is 0.
    #     Division fails, throwing an error and leaving both numbers on stack.
    #     (Stack depth is 2.)
    #   If input is not divisible, then remainder is not 0.
    #     Division succeeds, and result is pushed on stack. (Stack depth is 1.)
z   # Push stack depth on stack. (If divisible, push 2; if indivisible, push 1.)
1-  # Subtract 1 from top of stack. ToS is now 1 or 0.
n   # Pop top of stack and print it as a number.

Ironically, this reports that all numbers are divisible by 0.

I came back and re-read this answer and it totally confused me. "Why was I dividing the quotient? What was I thinking?" I just realized, it doesn't matter what the quotient is, or what the second quotient is. What matters is whether the division is possible—if the ~ gave remainder 0, then division is not possible again, which is what differentiates a true case from a false one.

Sesos, 16 bytes
Hexdump:
0000000: d6659c af71e7 a0fbf8 70cedc ae8de7 1e             .e..q....p......

Try it online!
Assembler:
set numin
set numout
get,fwd 1,get,rwd 1
jmp
  fwd 1,sub 1,fwd 1,add 1,rwd 1
  jmp
    fwd 2
  jnz
  fwd 1
  jmp
    sub 1,rwd 1,add 1,fwd 1
  jnz
  rwd 3
  jmp
    rwd 1
  jnz
  fwd 1
  sub 1
jnz
fwd 4,add 1,rwd 2
jmp
  fwd 1
jnz
fwd 2
put

Brainfuck: ,>,<[>->+<[>>]>[-<+>]<<<[<]>-]>>>>+<<[>]>>.

ROOP, 24 bytes
I
w
 w
R #H
 #
N
 #
W
O#

The I is the input object. When the object is on the operator w wait the entry of a number that puts it under. Then the I moves to the right and falls on the second w waiting for the second number. The operator R removes those two numbers, and make the remainder of divide them below. The N operator removes that number and creates a 1 if the number was 0, and 0 otherwise. Then the W operator puts that number in the O object representing the output. At the same time the I reached the operator H that ends execution.

Batch, 27 bytes
for /l %a IN (1,1,10)DO @%a
Does
' is not recognized as an internal or external command, operable program or batch file.'
count as a separator?

Java, 13 bytes
(a,b)->a%b<1;

This is a java.util.function.BiPredicate<Integer, Integer>.
As something that makes more sense to those who are new to Java, it takes up 37 bytes:
boolean A(int b,int B){return b%B<1;}

As something that compiles, it takes up 46 bytes:
class a{boolean A(int b,int B){return b%B<1;}}

As something that runs, it takes up 104 bytes:
interface a{static void main(String[]A){System.out.print(Integer.decode(A[0])%Integer.decode(A[1])<1);}}

For the sake of completeness, here's a 50-byte lambda that checks if an arbitrarily large integer a is divisible by another arbitrarily large integer b. It's a BiPredicate<BigInteger, BigInteger>.
(a,b)->a.mod(b).equals(java.math.BigInteger.ZERO);

I'm quite sure that there's this exact answer somwhere here...

@LeakyNun Well, in fact this is semantically different than the answer you're looking for - David's answer nests two lambdas, while mine uses a single lambda with two parameters. They just exploit the identical rule which states that if a is divisible by b then a mod b is 0.

Logicode, 289 262 bytes
Presenting the language that's more verbose than Java!
circ d(n)->cond n<->0+n/d(n>)
circ e(n)->[
cond n->var a=~((~(d(n)))>)/var a=0
cond (~n)<->var b=a+0/var b=e(a)+1
b
]
circ f(a,b)->cond *a&*b->f(e(a),e(b))/a
circ g(a,b)->!(*(f(b,a)))
circ h(a,b)->cond b->h(e(a),e(b))/a
circ i(a,b)->cond g(a,b)->i(h(a,b),b)/c(a)

I'll post an explanation later, but it's basically a shortened version of my prime checker.
Added a new feature: * (boolean)!

05AB1E, 2 1 byte
Ö

Try it online!
Was sÖ (Test here) but arguments switched (suggested by @Mego). This allowed me to golf down to 1 byte.
Explanation (old):
s    Reverses input e.g. 6, 3 -> 3,6 so that input is in correct order
 Ö   Checks if (top of stack % second top of stack) == 0 e.g. 6 % 3 == 0
     Implicitly prints (1 because 6 % 3 = 0)

Reversing the stack isn't necessary - you can just take the input in the opposite order.

Are you sure the inputs can be taken in that order according to the rules? If they can, I will switch to just Ö. @Mego

Raku, 4 bytes
*%%*

Anonymous function that takes 2 arguments, here represented with *, using the infix "is divisable by" operator %%, which returns a Bool value

Bash, 13 bytes
echo $[$1%$2]

The positive integers n and d are given as command line arguments in that order. The script outputs 0 (success) if n is evenly divisible by d, or a positive integer otherwise (failure).

Emotinomicon, 16

Explanation:

        pushes integer input
        pushes integer input
        pops n,m; pushes n mod m
        pops n; outputs as number

Returns zero for truthy if first integer is divisible by second, returns non-zero for falsy.

Vitsy, 1 Byte
This is a function that leaves 0 on the stack if true and a non-zero integer on the stack if false.
M

(This is the modulo function.)
Try it Online!
(N has been added for output).

Is 0 truthy in Vitsy?

@Dennis: Technically -1 < x < 1 is truthy because of how I've set up the ( (if) command.

Huh. A bit unconventional, but certainly interesting.

Elixir, 14 bytes
&rem(&1,&2)==0

Anonymous function defined using the capture operator.
Full program with test cases (yes, the . in the function call is mandatory!):
s=&rem(&1,&2)==0
# test cases
IO.puts s.(1,1) # true
IO.puts s.(2,1) # true
IO.puts s.(6,3) # true
IO.puts s.(17,17)   # true
IO.puts s.(22,2)    # true
IO.puts s.(1,2) # false
IO.puts s.(2,3) # false
IO.puts s.(2,4) # false
IO.puts s.(3,9) # false
IO.puts s.(15,16)   # false

Try it online on ElixirPlayground !

Python 2, 24 bytes
print input()%input()==0

Only works with Python 2 not 3

Sorry, I mistyped on the title, it was meant to say python 2

Groovy, 12 chars/bytes
Adding a Groovy version just for the sake of completeness, and for a comparison with the Java 8 snippet above.
Groovy is a Java-based language compiled to JVM bytecode, and was designed with a very concise syntax in mind, allowing less boilerplate code than pure Java. But if failed this time! The actual code is one byte shorter than Java, but needs the curly braces in order to compile as an anonymous closure, making it 1 byte longer at 12 bytes:
{n,d->n%d<1}

To run with n=9, d=3, just do this:
println ({n,d->n%d<1}(9,3))

You can try it online on http://groovyconsole.appspot.com

ASMD, 3 bytes (non-competing)
%0=

Keg, 2 bytes
%;

Try it online!
Takes 2 integers, modulos them. A zero value is falsy, and a non-zero value is truthy; therefor the decrement instruction ; reverses those values.

2 bytes

Factor, 8 bytes
divisor?

Try it online!

Vyxal, 1 byte
Ḋ

Try it Online!

Piet + ascii-piet, 8 bytes (6×2=12 codels)
TAJAlEee

Try Piet online!

Go, 37 bytes
func f(n int,d int)bool{return n%d<1}

Attempt This Online!
Simple solution but requires a pretty big boilerplate around it.

you could remove the first int, making it -
func f(n, d int)bool{return n%d<1}
link

Desmos, 19 bytes
f(n,d)=0^{mod(n,d)}

Try it on Desmos!

Trilangle, 7 bytes
??~%!@(

Try it on the online interpreter!
Outputs '0' for true and a negative number for false, in accordance with how the language's branching constructs work.
In C-family syntax, this would be:
print(-(input() % input()));

The choice to treat negative numbers as falsey is arbitrary, but consistent with my answers to other questions. If negative numbers are instead truthy (with positive numbers and zero being falsey), this could be done in just six bytes:
??(%!@

i.e:
print(input() % input() - 1);

Thunno, 2 bytes
(Actually \$ 2\log_{256}(96)\approx \$ 1.65 bytes but the leaderboard doesn't take decimals)
$!

Attempt This Online!
Takes \$n\$ then \$d\$.
$ is swapped modulo, and ! is logical not.

Scratch, 31 29 bytes
define(n)(d
say<(0)=((n)mod(d

Try it on Scratch
-2 thanks to @lyxal
This is my first time golfing in Scratch, so if I've scored it wrong, let me know.

-2 with an empty function name: define(n)(d say<(0)=((n)mod(d

Comments don't markdown very well, so there's a newline before say

@lyxal thanks, updated

QBIC (Non-competing), 8 bytes
::?a%b=0

For this challenge, I've improved QBIC's user input of numeric values. : now takes a command line argument and casts this to num.

q - 9 bytes
An anonymous lambda, returns boolean true/false
not(mod).

Example
q)not(mod). 18 4
0b
q)not(mod). 18 3
1b

What is the use of .?

. applys a function, passing a list as the parameters (e.g. as opposed to writing f[18;3] you can write f . 18 3)

3d, 15 bytes
>::%v
;!T'_'F!;

Takes 2 numbers a and b as input, proceed a mod b, prints T if result is 0, F else. Simple and efficient.
Can be golfable, but since I'm still working on the aforelinked interpreter, I might not come back on it for improvement.
I'm just making a little advertising for my esolang ;)

><>, 3 bytes
%n;

Input numbers are assumed to be on the stack. ><> does not have any default truthy or falsy values, so I use 0 as truthy and everything else as falsy. That seems to be allowed. (If not, 1-truthy, 0-falsy, can be done like this in 5 bytes: %0=n;).

<> does have the conditional ?, so in this sense zero should be falsy and everything else should be truthy I think, since the next instruction is only executed if nonzero. Also, I'm not quite sure about assuming input is on the stack for full programs, but I can't seem to find a relevant meta post... (usually for ><> the -v flag is used for +3 bytes)

@Sp3000 It takes some time getting used to what things you are allowed to exploit. A low byte count is almost impossible without.

In my opinion, since the questions asks for a program or function, I would allow getting parameters from the stack. However, if going that way, I would also have avoided the use of n and ; : once my function run, I would expect it to "return" to any other piece of code it would be included in, leaving its result on the stack. However, I agree that 0 in ><> is the boolean false, while every other number is a valid representation of the boolean true. Personally, I would have answered with %0=

Magma, 13 bytes
IsDivisibleBy

Pretty readable, I think. Try it at the online calculator, e.g.
IsDivisibleBy(100, 50);
IsDivisibleBy(100, 54);

gives
true
false

MIXAL, 105 bytes
Not counting bytes for 17 and 8 in the first two lines, which are used for input. Replace with any desired n and d.
Outputs 0 for true and 1 for false.
N       EQU     17
D       EQU     8
S       LDX     =N=
        DIV     =D=
        ENTA    30
        JXZ     T
        INCA    1
T       STA     9
        OUT     9(19)
        HLT
        END     S

Commented version:
N       EQU     17      Constants used for input
D       EQU     8
START   LDX     =N=     Put value 'n' into rX
        DIV     =D=     Divide rAX by value 'd'; rA <= quotient; rX <= remainder
        ENTA    30      Replace rA value with character code for '0'
        JXZ     T       If rX == 0, then d is a divisor of n, go to 'T'
        INCA    1       Else (there is a remainder), add 1 to rA charcode for '1'
T       STA     9       Store rA charcode at address 9 (after end of program)
        OUT     9(19)   Send contents starting at address 9 to TTY output device
        HLT
        END     START

RProgN, 3 Bytes
% !

Explination
%   # Take the Modulus of the value under the top of the stack compared to the top of the stack. (The Inputs in order, conveniently enough)
!   # Push the Boolean not of it. In this case, 0 is falsey, and all numbers !=0 are truthy, so false correctly inverts it.

Yay, RProgN is a competitive language!

tinylisp (REPL), 38 bytes
(d |(q((N D)(i(l N D)(e N 0)(|(s N D)D

Defines a function | that takes N and D and returns 1 if divisible, 0 otherwise. The REPL infers closing parentheses as necessary at the end of the code. Call the function like (| 22 2).
Ungolfed/explanation:
(d |                  Define | to be...
 (q (                 a function, i.e. a list containing...
  (N D)               list of params N and D, and function body:
  (i (l N D)           If N is less than D, then return:
   (e N 0)              1 if N equals 0, 0 otherwise;
   (| (s N D) D)))))    Else, recurse with arguments N - D and D

Gets kinda slow for N around D * 10^5 and larger.

PHP, 53 Bytes
Trying to get the boutny for an exemplary answer
$r=range($d=$argv[2],$n=$argv[1],$d);echo$n==end($r);

My answer based on Set Theory
In the set from d to n where all items are multiple from d
if n is the last member of the set it is divisible by d
Expressed differently you could say that the count of the items multiplied with d must be n
$r=range($d=$argv[2],$n=$argv[1],$d);echo$n==count($r)*$d;

bc, 19 bytes
!read()%read()
quit

The positive integers n and d are read from STDIN in that order, separated by any whitespace. The script prints 1 if n is evenly divisible by d, or 0 otherwise.
Run examples:
me@LCARS:/PPCG$ bc --quiet divisibility_test.bc
12 4
1
me@LCARS:/PPCG$ bc --quiet divisibility_test.bc
12 5
0

AWK, 14 bytes
{$0=!($1%$2)}1

Usage:
awk '{$0=!($1%$2)}1' <<< "N D"

Output will be 1 for true and 0 for false.
N and D can be integers or floating point numbers.

Racket 26 bytes
(λ(n m)(= 0(modulo n m)))

Usage:
(define f
  (λ(n m)
    (= 0
       (modulo n m))))

Testing:
(f 1 1)
(f 2 1)
(f 6 3)
(f 17 17)
(f 22 2)
(f 1 2)
(f 2 3)
(f 2 4)
(f 3 9)
(f 15 16)

Output:
#t
#t
#t
#t
#t
#f
#f
#f
#f
#f

TI-Basic, 10 bytes
Prompt N,D:not(fPart(N,D

Returns 1 for true or 0 for false

GameMaker Language, 32 bytes
return 1>argument0 mod argument1

Excel VBA, 14 Bytes
Anonymous VBE immediates window function that takes input of expected type variant\integer from cells [A1] and [A2] and outputs as a boolean variable to the VBE immedates window
?[A1]mod[A2]=0

REXX, 18 bytes
arg n d
say n//d=0

Functoid, 21 bytes
Y(yg(KZ)(BBC+C-))$$;@

Full program expecting two arguments d and n, try it online!
Explanation
Y(              )      # fix point of the following function
  y                    # define recursive function with 2 arguments
   g                   #   - base case: x > y
    (KZ)               #   - in base case: check y == 0
        (BBC+C-)       #   - else: call f recursively with x and (y-x)
                 $$    # apply two command-line arguments
                   ;   # print as a boolean
                    @  # terminate program

T-SQL, 27 bytes
Per our input standards, input is provided via pre-existing table t, with integer fields n and d:
SELECT IIF(n%d=0,1,0)FROM t

'%' is the remainder/modulo operator in SQL.
Note that the original list of test values could be improved: the 5 failing cases all fail trivially because n < d. Some better test values (5 succeeding, 5 failing):
(200,50),(91,7),(999,3),(45,5),(10000,2),(45,10),(99,2),(100,98),(100,24),(100,51)

Japt, 2 bytes
vV

Returns 1 for true, 0 for false.
Try it online!
Test cases

Common Lisp, 27 Bytes
(lambda(n d)(= 0(mod n d)))

Pretty basic.
Explanation:
(lambda(n d)(            ))     | Function of two arguments
             = 0(mod n d)       | Test if n mod d == 0

W , 3 bytes
Sm!

Explanation
Sm!

With implicit input:
baSm!

baS   % Produce a,b
   m  % Produce a%b
    ! % Negate the value

Thunno 2, 1 byte
Ḋ

Attempt This Online!
Built-in.

Rockstar, 58 bytes
listen to N
listen to D
let M be N/D
turn M up
say M's N/D

Try it (Code will need to be pasted in)

Pascal, 54 B
d divides n if division with remainder (Pascal’s div and mod operators) yields no remainder (the result of the mod operation), i. e. a value of zero.
function f(n,d:integer):Boolean;begin f:=n mod d=0 end

The second (right‑hand) operand to mod must be positive.
The value of n mod d is n − (kd) where k is an integer so that n mod d ≥ 0 and n mod d < d.

Swift, 15 bytes
let f={$0%$1<1}

Self-explanatory.

Ruby, 12 bytes
I was surprised there's no Ruby solution yet. Ergo:
->n,d{n%d<1}

Attempt This Online!

J-uby, 7 bytes
:%|:>&1

Attempt This Online!

TCC, 1 byte
v

Input is 2 numbers seperated by a space
Try it online!

C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication181
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Enter the Maximum Range of the Array:");
            int N = Convert.ToInt32(Console.ReadLine());
            int[] div = new int[N];
            int[] num = new int[N];
            int[] quo = new int[N];
            int d = 0, n = 0, q = 0;
            Console.WriteLine("\n");
            Console.WriteLine("Enter the numbers:");
            for (n = 0; n < N; n++)
            {
                num[n] = Convert.ToInt32(Console.ReadLine());
            }
            Console.WriteLine("\n");
            Console.WriteLine("Enter the Divident values:");
            for (d = 0; d < N; d++)
            {
                div[d] = Convert.ToInt32(Console.ReadLine());
            }
            Console.WriteLine("\n");
            for (d = 0; d < N; d++)
            {
                for (n = 0; n < N; n++)
                {
                    if (d == n)
                    {
                        quo[q] = (num[n] / div[d]);
                        q++;
                    }
                }
            }
            Console.WriteLine("\n");
            Console.WriteLine("The Quotient values are:");
            for (q = 0; q < N; q++)
            {
                Console.Write("{0} ", quo[q]);
            }
            Console.WriteLine("\n");
            Console.WriteLine("d      n    output");
            for (d = 0; d < N; d++)
            {
                for (n = 0; n < N; n++)
                {
                    for (q = 0; q < N; q++)
                    {
                        if ((d == n)&&(n == q)&&(q==d))
                        {
                            if ((quo[d] * div[d]) == num[n])
                            {
                                Console.WriteLine("{0}      {1}    truthy", div[d], num[n]);
                            }
                            else
                            {
                                Console.WriteLine("{0}      {1}    False ",div[d],num[n]);
                            }
                        }
                    }
                }
            }
            Console.WriteLine("\n");
            Console.ReadLine();
        }
    }
}

This is a code golf challenge you know? Where you're trying to get the lowest amount of bytes possible?

Answers must attempt to lower their byte count to be considered a serious answer for code-golf. Essentially, make your code as small as possible, while still having it be able to run.

source: Stack Exchange

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

sort: votes


text:
Generate Pascal's Braid
This is Pascal's Braid:
 1 4  15  56   209   780    2911    10864     40545      151316      564719
1 3 11  41  153   571   2131    7953     29681     110771      413403      1542841
 1 4  15  56   209   780    2911    10864     40545      151316      564719

I totally made that up. Blaise Pascal didn't have a braid as far as I can tell, and if he did it was probably made of hair instead of numbers.
It's defined like this:

The first column has a single 1 in the middle.
The second column has a 1 at the top and at the bottom.
Now we alternate between putting a number in the middle or two copies of a number at the top and bottom.
If the number goes on the top or the bottom, it will be the sum of the two adjacent numbers (e.g. 56 = 15 + 41). If you tilt your head a little, this is like a step in Pascal's triangle.
If the number goes in the middle, it will be the sum of all three adjacent numbers (e.g. 41 = 15 + 11 + 15).

Your task will be to print (some part of) this braid.
Input
You should write a program or function, which receives a single integer n, giving the index of the last column to be output.
You may choose whether the first column (printing only a single 1 on the middle line) corresponds to n = 0 or n = 1. This has to be a consistent choice across all possible inputs.
Output
Output Pascal's Braid up to the nth column. The whitespace has to match exactly the example layout above, except that you may pad the shorter line(s) to the length of the longer line(s) with spaces and you may optionally output a single trailing linefeed.
In other words, every column should be exactly as wide as the number (or pair of equal numbers) in that column, numbers in successive columns should not overlap and there should be no spaces between columns.
You may either print the result to STDOUT (or the closest alternative), or if you write a function you may return either a string with the same contents or a list of three strings (one for each line).
Further Details
You may assume that n won't be less than the index of the first column (so not less than 0 or 1 depending on your indexing). You may also assume that the last number in the braid is less than 256 or the largest number representable by your language's native integer type, whichever is greater. So if your native integer type can only store bytes, you can assume that the largest n is 9 or 10 (depending on whether you use 0- or 1-based n) and if it can store signed 32-bit integers, n will be at most 33 or 34.
Standard code-golf rules apply. The shortest code wins.
OEIS
Here are a few relevant OEIS links. Of course, these contain spoilers for different ways to generate the numbers in the braid:

Top/bottom: A001353 or A010905 or A106707 or A195503
Middle: A001835 or A079935
Both: A002530

Test Cases
These test cases use 1-base indexing. Each test case is four lines, with the first being the input and the remaining three being the output.
1

1

---
2
 1
1
 1
---
3
 1
1 3
 1
---
5
 1 4
1 3 11
 1 4
---
10
 1 4  15  56   209
1 3 11  41  153
 1 4  15  56   209
---
15
 1 4  15  56   209   780    2911
1 3 11  41  153   571   2131    7953
 1 4  15  56   209   780    2911
---
24
 1 4  15  56   209   780    2911    10864     40545      151316      564719       2107560
1 3 11  41  153   571   2131    7953     29681     110771      413403      1542841
 1 4  15  56   209   780    2911    10864     40545      151316      564719       2107560

The format seems like a bit chameleon to me.

@LeakyNun I tried this challenge while it was in the sandbox, and I spent about half as many bytes on calculating the braid as printing it. This seems like an excellent balance to me for an [tag:ascii-art] challenge.

@LeakyNun I was hoping that both the sequence generation and the ASCII art are important components of the challenge, because most languages will probably be better at one of those two, so I figured it would be interesting to mix them up. And it introduces an additional component where it's not obvious whether it's better to generate top/bottom and middle separately or to generate the entire thing and then separate out the bisections.

The Numeric Pascal Braid?

Nobody has written a solution in Pascal yet.  This makes me sad.

Jelly, 31 30 29 bytes
Q;S⁹o_
3ḶḂç@⁸Ð¡Iµa"Ṿ€o⁶z⁶Zµ€Z

This is a monadic link; it accepts a 0-based column index as argument and returns a list of strings.
Try it online!
How it works
Q;S⁹o_                  Helper link.
                        Arguments: [k, 0, k] and [0, m, 0] (any order)

Q                       Unique; deduplicate the left argument.
 ;                      Concatenate the result with the right argument.
  S                     Take the sum of the resulting array.
   ⁹o                   Logical OR with the right argument; replaces zeroes in the
                        right argument with the sum.
     _                  Subtract; take the difference with the right argument to
                        remove its values.
                        This maps [k, 0, k], [0, m, 0] to [0, k + m, 0] and
                        [0, m, 0], [k, 0, k] to [m + 2k, 0, m + 2k].

3ḶḂç@⁸Ð¡Iµa"Ṿ€o⁶z⁶Zµ€Z  Monadic link. Argument: A (array of column indices)

3Ḷ                      Yield [0, 1, 2].
  Ḃ                     Bit; yield [0, 1, 0].
        I               Increments of n; yield [].
      Ð¡                Apply...
   ç@                       the helper link with swapped arguments...
     ⁸                      n times, updating the left argument with the return
                            value, and the right argument with the previous value
                            of the left one. Collect all intermediate values of
                            the left argument in an array.
         µ         µ€   Map the chain in between over the intermediate values.
            Ṿ€          Uneval each; turn all integers into strings.
          a"            Vectorized logical AND; replace non-zero integers with
                        their string representation.
              o⁶        Logical OR with space; replace zeroes with spaces.
                z⁶      Zip with fill value space; transpose the resulting 2D
                        array after inserting spaces to make it rectangular.
                  Z     Zip; transpose the result to restore the original shape.
                     Z  Zip; transpose the resulting 3D array.

Pyth, 44 bytes
The number generation took 20 bytes, and the formatting took 24 bytes.
jsMC+Led.e.<bkC,J<s.u+B+hNyeNeNQ,1 1Qm*;l`dJ

Try it online!
jsMC+Led.e.<bkC,J<s.u+B+hNyeNeNQ,1 1Qm*;l`dJ   input as Q
                   .u          Q,1 1           repeat Q times, starting with [1,1],
                                               collecting all intermediate results,
                                               current value as N:
                                               (this will generate
                                                more than enough terms)
                       +hNyeN                  temp <- N[0] + 2*N[-1]
                     +B      eN                temp <- [temp+N[-1], temp]

now, we would have generated [[1, 1], [3, 4], [11, 15], [41, 56], ...]

jsMC+Led.e.<bkC,J<s                 Qm*;l`dJ
                  s                            flatten
                 <                  Q          first Q items
                J                              store in J
                                     m    dJ   for each item in J:
                                         `     convert to string
                                        l      length
                                      *;       repeat " " that many times

jsMC+Led.e.<bkC,
              C,     transpose, yielding:
[[1, ' '], [1, ' '], [3, ' '], [4, ' '], [11, '  '], ...]
(each element with as many spaces as its length.)
        .e            for each sub-array (index as k, sub-array as b):
          .<bk            rotate b as many times as k

[[1, ' '], [' ', 1], [3, ' '], [' ', 4], [11, '  '], ...]

jsMC+Led
    +Led              add to each sub-array on the left, the end of each sub-array
   C                  transpose
 sM                   sum of each sub-array (reduced concatenation)
j                     join by new-lines

That is the largest Pyth program I've ever seen.

Python 2, 120 bytes
a=1,1,3,4
n=input()
y=0
exec"y+=1;t='';x=0;%sprint t;"%(n*"a+=a[-2]*4-a[-4],;v=`a[x]`;t+=[v,len(v)*' '][x+y&1];x+=1;")*3

Try it on Ideone.

MATL, 38 bytes
1ti:"yy@oQ*+]vG:)!"@Vt~oX@o?w]&v]&hZ}y

Try it online!
Computing an array with the (unique) numbers takes the first 17 bytes. Formatting takes the remaining 21 bytes.
Explanation
Part 1: generate the numbers
This generates an array with the numbers from the first and second rows in increasing order: [1; 1; 3; 4; 11; 15; ...]. It starts with 1, 1. Each new number is iteratively obtained from the preceding two. Of those, the second is multiplied by 1 or 2 depending on the iteration index, and then summed to the first to produce the new number.
The number of iterations is equal to the input n. This means that n+2 numbers are generated. Once generated, the array needs to be trimmed so only the first n entries are kept.
1t      % Push 1 twice
i:      % Take input n. Generage array [1 2 ... n]
"       % For each
  yy    %   Duplicate the two most recent numbers
  @o    %   Parity of the iteration index (0 or 1)
  Q     %   Add 1: gives 1 for even iteration index, 2 for odd
  *+    %   Multiply this 1 or 2 by the most recent number in the sequence, and add
       %    to the second most recent. This produces a new number in the sequence
]       % End for each
v       % Concatenate all numbers in a vertical array
G:)     % Keep only the first n entries

Part 2: format the output
For each number in the obtained array, this generates two strings: string representation of the number, and a string of the same length consisting of character 0 repeated (character 0 is displayed as a space in MATL). For even iterations, these two strings are swapped.
The two strings are then concatenated vertically. So n 2D char arrays are produced as follows (using · to represent character 0):
·
1

1
·

·
3

4
·

··
11

15
··

These arrays are then concatenated horizontally to produce
·1·4··15
1·3·11··

Finally, this 2D char array is split into its two rows, and the first is duplicated onto the top of the stack. The three strings are displayed in order, each on a different line, producing the desired output
!       % Transpose into a horizontal array [1 1 3 4 11 15 ...]
"       % For each
  @V    %   Push current number and convert to string
  t~o   %   Duplicate, negate, convert to double: string of the same length consisting
        %   of character 0 repeated
  X@o   %   Parity of the iteration index (1 or 0)
  ?     %   If index is odd
    w   %     Swap
  ]     %   End if
  &v    %   Concatenate the two strings vertically. Gives a 2D char array representing
        %   a "numeric column" of the output (actually several columns of characters)
]       % End for
&h      % Concatenate all 2D char arrays horizontally. Gives a 2D char array with the
        % top two rows of the output
Z}      % Split this array into its two rows
y       % Push a copy of the first row. Implicitly display

Haskell, 101 bytes
a=1:1:t
t=3:4:zipWith((-).(4*))t a
g(i,x)=min(cycle" 9"!!i)<$>show x
f n=[zip[y..y+n]a>>=g|y<-[0..2]]

Defines a function f :: Int → [String].

Michael Klein reminded me I didn’t need to call unlines on the result, saving 7 bytes. Thanks!
I saved a byte by replacing " 9"!!mod i 2 with cycle" 9"!!i.
Three more bytes by writing two corecursive lists instead of using drop.
My girlfriend pointed out I can save two more bytes by starting my answers at 0 instead of 1.

C, 183 177 176 bytes
#define F for(i=0;i<c;i++)
int i,c,a[35],t[9];p(r){F printf("%*s",sprintf(t,"%d",a[i]),r-i&1?t:" ");putchar(10);}b(n){c=n;F a[i]=i<2?1:a[i-2]+a[i-1]*(i&1?1:2);p(0);p(1);p(0);}

Explanation
C is never going to win any prizes for brevity against a higher level language, but the exercise is interesting and good practice.
The macro F shaves off six bytes at the cost of readability. Variables are declared globally to avoid multiple declarations. I needed a character buffer for sprintf, but since K&R is loose with type checking, sprintf and printf can interpret t[9] as a pointer to a 36-byte buffer. This saves a separate declaration.
#define F for(i=0;i<c;i++)
int i,c,a[35],t[9];

Pretty printing function, where r is the row number. Sprintf formats the number and computes the column width. To save space we just call this three times, one for each row of output; the expression r-i&1 filters what gets printed.
p(r) {
    F
        printf("%*s", sprintf(t, "%d", a[i]), r-i&1 ? t
                                                    : " ");
    putchar(10);
}

Entry point function, argument is number of columns. Computes array a of column values a[], then calls printing function p once for each row of output.
b(n) {
    c=n;
    F
        a[i] = i<2 ? 1
                   : a[i-2] + a[i-1]*(i&1 ? 1
                                          : 2);
    p(0);
    p(1);
    p(0);
}

Sample invocation (not included in answer and byte count):
main(c,v) char**v;
{
    b(atoi(v[1]));
}

Updated
Incorporated the inline sprintf suggestion from tomsmeding. That reduced the count from 183 to 177 characters. This also allows removing the the braces around the printf(sprintf()) block since it's only one statement now, but that only saved one character because it still needs a space as a delimiter. So down to 176.

Can't you inline the definition of w where it's used? You seem to only use it once.

You can't use itoa instead of sprintf?

I considered itoa, but it doesn't exist on my system, and I am using the return value of sprintf to set the field width.

PowerShell v2+, 133 bytes
param($n)$a=1,1;1..$n|%{$a+=$a[$_-1]+$a[$_]*($_%2+1)};$a[0..$n]|%{$z=" "*$l+$_;if($i++%2){$x+=$z}else{$y+=$z}$l="$_".Length};$x;$y;$x

44 bytes to calculate the values, 70 bytes to formulate the ASCII
Takes input $n as the zero-indexed column. Sets the start of our sequence array $a=1,1. We then loop up to $n with 1..$n|%{...} to construct the array. Each iteration, we concatenate on the sum of (two elements ago) + (the previous element)*(whether we're odd or even index). This will generate $a=1,1,3,4,11... up to $n+2.
So, we need to slice $a to only take the first 0..$n elements, and pipe those through another loop |%{...}. Each iteration we set helper $z equal to a number of spaces plus the current element as a string. Then, we're splitting out whether that gets concatenated onto $x (the top and bottom rows) or $y (the middle row) by a simple odd-even if/else. Then, we calculate the number of spaces for $l by taking the current number, stringifying it, and taking its .Length.
Finally, we put $x, $y, and $x again on the pipeline, and output is implicit. Since the default .ToString() separator for an array when printing to STDOUT is a newline, we get that for free.
Example
PS C:\Tools\Scripts\golfing> .\pascal-braid.ps1 27
 1 4  15  56   209   780    2911    10864     40545      151316      564719       2107560       7865521        29354524
1 3 11  41  153   571   2131    7953     29681     110771      413403      1542841       5757961       21489003
 1 4  15  56   209   780    2911    10864     40545      151316      564719       2107560       7865521        29354524

PHP 265 bytes
<?php $i=$argv[1];$i=$i?$i:1;$a=[[],[]];$s=['',''];$p='';for($j=0;$j<$i;$j++){$y=($j+1)%2;$x=floor($j/2);$v=$x?$y?2*$a[0][$x-1]+$a[1][$x-1]:$a[0][$x-1]+$a[1][$x]:1;$s[$y].=$p.$v;$a[$y][$x]=$v;$p=str_pad('',strlen($v),' ');}printf("%s\n%s\n%s\n",$s[0],$s[1],$s[0]);

Un-golfed:
$a = [[],[]];
$s = ['',''];

$p = '';

$i=$argv[1];
$i=$i?$i:1;
for($j=0; $j<$i; $j++) {
    $y = ($j+1) % 2;
    $x = floor($j/2);

    if( $x == 0 ) {
        $v = 1;
    } else {
        if( $y ) {
            $v = 2 * $a[0][$x-1] + $a[1][$x-1];
        } else {
            $v = $a[0][$x-1] + $a[1][$x];
        }
    }
    $s[$y] .= $p . $v;
    $a[$y][$x] = $v;
    $p = str_pad('', strlen($v), ' ');
}

printf("%s\n%s\n%s\n", $s[0], $s[1], $s[0]);

Python 278 bytes
import sys,math;a=[[],[]];s=['',''];p='';i=int(sys.argv[1]);i=1 if i<1 else i;j=0
while j<i:y=(j+1)%2;x=int(math.floor(j/2));v=(2*a[0][x-1]+a[1][x-1] if y else a[0][x-1]+a[1][x]) if x else 1;s[y]+=p+str(v);a[y].append(v);p=' '*len(str(v));j+=1
print ("%s\n"*3)%(s[0],s[1],s[0])

Batch, 250 bytes
@echo off
set s=
set d=
set/ai=n=0,j=m=1
:l
set/ai+=1,j^^=3,l=m+n*j,m=n,n=l
set t=%s%%l%
for /l %%j in (0,1,9)do call set l=%%l:%%j= %%
set s=%d%%l%
set d=%t%
if not %i%==%1 goto l
if %j%==1 echo %d%
echo %s%
echo %d%
if %j%==2 echo %s%

Since the first and third lines are the same, we just have to build two strings. Here d represents the string that ends with the last entry and s represents the string that ends with spaces; the last four lines ensure that they are printed in the appropriate order. i is just the loop counter (it's slightly cheaper than counting down from %1). j is the toggle between doubling the previous number before adding it to the current number to get the next number. m and n contain those numbers. l, as well as being used as a temporary to calculate the next number, also gets its digits replaced with spaces to pad out s; s and d are exchanged each time via the intermediate variable t.

Ruby, 120 bytes
Returns a multiline string.
Try it online!
->n{a=[1,1];(n-2).times{|i|a<<(2-i%2)*a[-1]+a[-2]}
z=->c{a.map{|e|c+=1;c%2>0?' '*e.to_s.size: e}*''}
[s=z[0],z[1],s]*$/}

Matlab, 223 characters, 226 bytes
function[]=p(n)
r=[1;1];e={(' 1 ')',('1 1')'}
for i=3:n;r(i)=sum((mod(i,2)+1)*r(i-1)+r(i-2));s=num2str(r(i));b=blanks(floor(log10(r(i)))+1);if mod(i,2);e{i}=[b;s;b];else e{i}=[s;b;s];end;end
reshape(sprintf('%s',e{:}),3,[])

Ungolfed and commented:
function[]=p(n)
r=[1;1];                                    % start with first two
e={(' 1 ')',('1 1')'}                       % initialize string output as columns of blank, 1, blank and 1, blank, 1.
for i=3:n;                                  % for n=3 and up!
    r(i)=sum((mod(i,2)+1)*r(i-1)+r(i-2));   % get the next number by 1 if even, 2 if odd times previous plus two steps back
    s=num2str(r(i));                        % define that number as a string
    b=blanks(floor(log10(r(i)))+1);         % get a number of space characters for that number of digits
    if mod(i,2);                            % for odds
        e{i}=[b;s;b];                       % spaces, number, spaces
    else                                    % for evens
        e{i}=[s;b;s];                       % number, spaces, number
    end;
end
reshape(sprintf('%s',e{:}),3,[])            % print the cell array of strings and reshape it so it's 3 lines high

PHP, 135 124 123 120 bytes
<?while($i<$argv[1]){${s.$x=!$x}.=${v.$x}=$a=$i++<2?:$v1+$v+$x*$v;${s.!$x}.=str_repeat(' ',strlen($a));}echo"$s
$s1
$s";

taking advantage of implicit typecasts and variable variables
a third of the code (37 bytes) goes into the spaces, 64 bytes altogether used for output
breakdown
$i=0; $x=false; $v=$v1=1; $s=$s1='';    // unnecessary variable initializations
for($i=0;$i<$argv[1];$i++)  // $i is column number -1
{
    $x=!$x; // $x = current row: true (1) for inner, false (empty string or 0) for outer
    // calculate value
    $a=
        $i<2?               // first or second column: value 1
        :$v1+(1+$x)*$v      // inner-val + (inner row: 1+1=2, outer row: 1+0=1)*outer-val
    ;
    ${s.$x}.=${v.$x}=$a;    // replace target value, append to current row
    ${s.!$x}.=str_repeat(' ',strlen($a));    // append spaces to other row
}
// output
echo "$s\n$s1\n$s";

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


text:
Validating a CPR number
Validating a CPR number
A Danish CPR number (Person Identification Number) is date of birth followed by 4 digits (the last one being a control digit): DDMMYY-XXXX
The final digit validates the CPR number using Modulo 11 by satisfying the following equation:

where the  are the ten digits of the complete ID number, and the coefficients (4, 3, 2, 7, …) are all nonzero in the finite field of order 11.
Input
A CPR number formatted like this DDMMYY-XXXX where YY indicates a year within the last 100 years (between 1917 and 2016).
Output
Indication whether CPR number is valid (1 or true) or invalid (0 or false)
Examples
  290215-2353 --> false
  140585-2981 --> true
  311217-6852 --> true
  121200-0004 --> false
  140322-5166 --> false
  111111-1118 --> true

Scoring
This is code-golf - fewest bytes win!
Date validation
All years refer to a period within the last 100 years. A valid date is a date that exists within it's calendar year.
290215 is not a valid date because 29/2 wasn't a date in 2015.
301216 is a valid date because 30/12 is a date in 2016.

Can I receive the input as an array of the ten digits?

Could you show how the first one evaluates to be false?

Traditionally a CPR number includes the hyphen so I'm gonna say no - it's a string :)

@LeakyNun: Look at the date :)

What kind of date validation needs to be done?  Do we have to check for leap years?  Calendar changes?  Check if the birthday is more recent than today?

@NathanMerrill All years (YY) will refer to dates within the last 100 years (from 1917 to 2016) and never newer than today. Thus date validation (including checking for leap years) will be neccesary for this 100-year period of time

I've updated the post again. @NathanMerrill does this answer your question?

@Daniel  within the last 100 years includes certain dates in 1916 (like 12/31/2015).  Are those valid?

@NathanMerrill 311215 refers the 31'st of december 2015 - remember you don't have all the 4 year digits (YYYY) only the last two (YY) and they always represent the latest year that ends with these two digits

Oh sorry, I meant 12/31/1915

Let us continue this discussion in chat.

Actually, as of 1 Oct '07, the last digit isn't a control digit anymore, so no validation is possible. You should update the text, and change the test cases from the last ten years.

@Adám I am aware of this change, but I decided it shouldn't stand in the way of a codegolf challenge :)

I'm guessing that the symbol 0 represents the digit with decimal value 10, but that could be clearer.

@PeterTaylor Actually, no: "If the division remainder [is] 1, the designated serial number (digits 7-9) [is] not used, because the check digit thus would be two-digit (10), which is not possible."  (source) (sorry for google translate, but it seems to be correct if I use my knowledge of German to read the danish text)

Python (2), 167 156 155 142 141 bytes
from time import*
def f(s):
 try:return 1>sum(int(i)*(ord(j)-48)for i,j in zip("43276504321",s))%11;strptime(s[:6],"%d%m%y")
 except:return 0

tried to do the date validation without the library, but it's 168 bytes:
lambda s:sum(int(i)*(ord(j)-48)for i,j in zip("43276504321",s))%11==0 and int(s[0:2])<([0,32,(29,30)[int(s[4:6])%4==0],32]+[31,32]*2+[32,31]*2+[32]+[0]*99)[int(s[2:4])]

-12 bytes thanks to @GáborFekete
-14 bytes thanks to @RootTwo

You can golf some bytes by using s[:6] instead of s.split("-")[0] and also by removing the space before the for.

thank you, now i just gotta save 1 byte somewhere to beat the php solution despite the horrendous date validation in Python.

Move the last line after the line starting with try using a semicolon.

Does that save characters? (you lose a " " but add a ";"). However, I had a similar idea before I read your comment (see above)

Great answer! When golfing, it is a good idea to keep your old byte counts by surrounding them with <s> and <\s> in the markdown editor, which adds a strikethrough.

Thank you, i was wondering how to do that and the markdown standard ~~ didn't work.

Sorry, I meant </s>, which you noticed anyway.

It saved you a newline!

you are correct (missed that -.-), so my 'one return instead of two' shenanigans did exactly nothing to the bytecount

Can save 12 bytes by using time.strptime() instead of datetime.datetime.strptime().

@RootTwo Thank you! Have have looked for some shorter time function but didn't find this one.

You can save another byte using r=1>sum instead of r=0==sum.

Ruby, 145 113 112 103 + 8 (-nrdate flags) = 111 bytes
Returns a date object (truthy) if it's a valid CPR, false if it fails the modulo test, and nil (falsy) if it fails the date test. Input is STDIN.
-33 bytes from @Jordan
s=0
$_.size.times{|i|s+=12340567234/10**i%10*$_[i].to_i}
p s%11<1&&Date.strptime($_,"%d%m%y")rescue p p

Version that returns literal true on valid CPR for +1 byte:
s=0
$_.size.times{|i|s+=12340567234/10**i%10*$_[i].to_i}
p Date.strptime($_,"%d%m%y")&&s%11<1 rescue p p

Version that returns an error on invalid date instead of nil, for -10 bytes but probably invalid:
s=0
$_.size.times{|i|s+=12340567234/10**i%10*$_[i].to_i}
p Date.strptime($_,"%d%m%y")&&s%11<1

Might I suggest Date.strptime("%d%m%y", $_)?

@Jordan I was about to say that it would cause errors for "121118" giving the year as 2018, but then I remembered that the leap years are all the same (except for 1900 which is out of the year scope anyways). Also, the arguments are in the reverse order so I fixed that.

Mathematica, 130 bytes
DateObject[a={10#5+#6+4,10#3+#4,10#+#2}][[1]]==a&&11∣Tr[{4,3,2,7,6,5,4,3,2,1}{##}]&@@IntegerDigits@FromDigits[#~StringDrop~{7}]&

Anonymous function. Takes a string as input and returns True or False as output. The Unicode character is U+2223 DIVIDES, representing \[Divides].

Ruby + GNU date, 112 111 103 bytes
-8 bytes from Kevin Lau.
->n{s=0
n.size.times{|i|s+=12340567234/10**i%10*n[i].to_i}
n=~/#{"(..)"*3}/
s%11<1&&`date -d#$3#$2#$1`>""}

Note that this prints e.g. "date: invalid date ‘150229’" to stderr if the date portion is invalid, but it still returns true or false (it doesn't raise an exception). If that's a disqualifier, though, I can add ⎵2>/dev/null for a 12-byte penalty.
Ungolfed
v = ->(cpr) {
  sum = 0

  cpr.size.times do |idx|
    sum += 12340567234 / 10**idx % 10 * cpr[idx].to_i
  end

  cpr =~ /#{"(..)" * 3}/
  sum % 11 < 1 && `date -d#$3#$2#$1` > ""
}

Errors are allowed? If so that cuts a lot of bytes off of my own Ruby solution :o

@KevinLau-notKenny I think that's up to Daniel, hence the note.

FWIW this still returns true or false, even when the date is invalid. It doesn't raise an exception.

Hmm, that's true. I'm tempted to use your zip trick with the block but it feels like cheating and I'd probably outpace yours by using it...

You would indeed. A quandary!

It's OK, I managed to tie you with an alternate solution (turns out the zip trick wasn't enough bytes saved). And now you can use my technique and make yours even shorter!