Skip to main content
added 30 characters in body
Source Link

1. Triangular, 10 bytes, A000217

$\:_%i/2*< 

Try it online!

Next Sequence

How it works

The code formats into this triangle

 $ \ : _ % i / 2 * < 

with the IP starting at the $ and moving South East (SE, heh), works like this:

$ Take a numerical input (n); STACK = [n] : Duplicate it; STACK = [n, n] i Increment the ToS; STACK = [n, n+1] < Set IP to W; STACK = [n, n+1] * Multiply ToS and 2ndTos; STACK = [n(n+1)] 2 Push 2; STACK = [n(n+1), 2] / Set IP to NE; STACK = [n(n+1), 2] _ Divide ToS by 2ndToS; STACK = [n(n+1)/2] \ Set IP to SESE; (heh);  STACK = [n(n+1)/2] % Output ToS as number; STACK = [n(n+1)/2] * Multiply ToS by 2ndToS (no op); STACK = [n(n+1)/2] 

1. Triangular, 10 bytes, A000217

$\:_%i/2*< 

Try it online!

Next Sequence

How it works

The code formats into this triangle

 $ \ : _ % i / 2 * < 

with the IP starting at the $ and moving South East (SE, heh), works like this:

$ Take a numerical input (n); STACK = [n] : Duplicate it; STACK = [n, n] i Increment the ToS; STACK = [n, n+1] < Set IP to W; STACK = [n, n+1] * Multiply ToS and 2ndTos; STACK = [n(n+1)] 2 Push 2; STACK = [n(n+1), 2] / Set IP to NE; STACK = [n(n+1), 2] _ Divide ToS by 2ndToS; STACK = [n(n+1)/2] \ Set IP to SE (heh); STACK = [n(n+1)/2] % Output ToS as number; STACK = [n(n+1)/2] * Multiply ToS by 2ndToS (no op); STACK = [n(n+1)/2] 

1. Triangular, 10 bytes, A000217

$\:_%i/2*< 

Try it online!

Next Sequence

How it works

The code formats into this triangle

 $ \ : _ % i / 2 * < 

with the IP starting at the $ and moving South East (SE), works like this:

$ Take a numerical input (n); STACK = [n] : Duplicate it; STACK = [n, n] i Increment the ToS; STACK = [n, n+1] < Set IP to W; STACK = [n, n+1] * Multiply ToS and 2ndTos; STACK = [n(n+1)] 2 Push 2; STACK = [n(n+1), 2] / Set IP to NE; STACK = [n(n+1), 2] _ Divide ToS by 2ndToS; STACK = [n(n+1)/2] \ Set IP to SE;   STACK = [n(n+1)/2] % Output ToS as number; STACK = [n(n+1)/2] * Multiply ToS by 2ndToS (no op); STACK = [n(n+1)/2] 
Commonmark migration
Source Link

1. Triangular, 10 bytes, A000217

$\:_%i/2*< 

Try it online!

Next Sequence

How it works

The code formats into this triangle

 $ \ : _ % i / 2 * < 

with the IP starting at the $ and moving South East (SE, heh), works like this:

$ Take a numerical input (n); STACK = [n] : Duplicate it; STACK = [n, n] i Increment the ToS; STACK = [n, n+1] < Set IP to W; STACK = [n, n+1] * Multiply ToS and 2ndTos; STACK = [n(n+1)] 2 Push 2; STACK = [n(n+1), 2] / Set IP to NE; STACK = [n(n+1), 2] _ Divide ToS by 2ndToS; STACK = [n(n+1)/2] \ Set IP to SE (heh); STACK = [n(n+1)/2] % Output ToS as number; STACK = [n(n+1)/2] * Multiply ToS by 2ndToS (no op); STACK = [n(n+1)/2] 

1. Triangular, 10 bytes, A000217

$\:_%i/2*< 

Try it online!

Next Sequence

How it works

The code formats into this triangle

 $ \ : _ % i / 2 * < 

with the IP starting at the $ and moving South East (SE, heh), works like this:

$ Take a numerical input (n); STACK = [n] : Duplicate it; STACK = [n, n] i Increment the ToS; STACK = [n, n+1] < Set IP to W; STACK = [n, n+1] * Multiply ToS and 2ndTos; STACK = [n(n+1)] 2 Push 2; STACK = [n(n+1), 2] / Set IP to NE; STACK = [n(n+1), 2] _ Divide ToS by 2ndToS; STACK = [n(n+1)/2] \ Set IP to SE (heh); STACK = [n(n+1)/2] % Output ToS as number; STACK = [n(n+1)/2] * Multiply ToS by 2ndToS (no op); STACK = [n(n+1)/2] 

1. Triangular, 10 bytes, A000217

$\:_%i/2*< 

Try it online!

Next Sequence

How it works

The code formats into this triangle

 $ \ : _ % i / 2 * < 

with the IP starting at the $ and moving South East (SE, heh), works like this:

$ Take a numerical input (n); STACK = [n] : Duplicate it; STACK = [n, n] i Increment the ToS; STACK = [n, n+1] < Set IP to W; STACK = [n, n+1] * Multiply ToS and 2ndTos; STACK = [n(n+1)] 2 Push 2; STACK = [n(n+1), 2] / Set IP to NE; STACK = [n(n+1), 2] _ Divide ToS by 2ndToS; STACK = [n(n+1)/2] \ Set IP to SE (heh); STACK = [n(n+1)/2] % Output ToS as number; STACK = [n(n+1)/2] * Multiply ToS by 2ndToS (no op); STACK = [n(n+1)/2] 
added 937 characters in body
Source Link

1. Triangular, 10 bytes, A000217

$\:_%i/2*< 

Try it online!

Next Sequence

How it works

The code formats into this triangle

 $ \ : _ % i / 2 * < 

with the IP starting at the $ and moving South East (SE, heh), works like this:

$ Take a numerical input (n); STACK = [n] : Duplicate it; STACK = [n, n] i Increment the ToS; STACK = [n, n+1] < Set IP to W; STACK = [n, n+1] * Multiply ToS and 2ndTos; STACK = [n(n+1)] 2 Push 2; STACK = [n(n+1), 2] / Set IP to NE; STACK = [n(n+1), 2] _ Divide ToS by 2ndToS; STACK = [n(n+1)/2] \ Set IP to SE (heh); STACK = [n(n+1)/2] % Output ToS as number; STACK = [n(n+1)/2] * Multiply ToS by 2ndToS (no op); STACK = [n(n+1)/2] 

1. Triangular, 10 bytes, A000217

$\:_%i/2*< 

Try it online!

Next Sequence

1. Triangular, 10 bytes, A000217

$\:_%i/2*< 

Try it online!

Next Sequence

How it works

The code formats into this triangle

 $ \ : _ % i / 2 * < 

with the IP starting at the $ and moving South East (SE, heh), works like this:

$ Take a numerical input (n); STACK = [n] : Duplicate it; STACK = [n, n] i Increment the ToS; STACK = [n, n+1] < Set IP to W; STACK = [n, n+1] * Multiply ToS and 2ndTos; STACK = [n(n+1)] 2 Push 2; STACK = [n(n+1), 2] / Set IP to NE; STACK = [n(n+1), 2] _ Divide ToS by 2ndToS; STACK = [n(n+1)/2] \ Set IP to SE (heh); STACK = [n(n+1)/2] % Output ToS as number; STACK = [n(n+1)/2] * Multiply ToS by 2ndToS (no op); STACK = [n(n+1)/2] 
edited body
Source Link
Loading
Source Link
Loading