text:
Stars Make Stars
Introduction
The idea is to use the asterisk character (star) * to display an ascii-art star at a specified dimension. The dimension is an input number greater than or equal to \$1\$ that specifies the height in lines of the upper point of the star. The stars here are intended to be six pointed stars with larger sizes looking better from a picture perspective.
In all cases the ascii-art representation of the stars are to appear as two triangles that overlap as shown in the following examples.
Parametrics
The following picture and table of data describes attributes for the first seven sizes of the star. Each of the parameters grows in an arithmetic progression as \$N\$ increases, except \$N=1\$ is different.

Examples
For an input of 1 (the degenerate case) the program output should be as follows:
  *
*****
*****
  *

Input of 2:
    *
   ***
*********
 *******
*********
   ***
    *

(3)
       *
      ***
     *****
***************
 *************
  ***********
 *************
***************
     *****
      ***
       *

(5)
             *
            ***
           *****
          *******
         *********
***************************
 *************************
  ***********************
   *********************
    *******************
   *********************
  ***********************
 *************************
***************************
         *********
          *******
           *****
            ***
             *

Challenge
Your task is to create a function or program that will accept the number N as input and then output the appropriately sized star using just  characters and the * character.

You may assume that the input value is always a positive integer.
Trailing whitespace on the output lines is OK.
The program algorithm should be general enough for any \$N\$ input to produce the star art
output. Practical limitations exist of course due to display output
size.
Output should print to STDOUT.
Standard loopholes are forbidden.
This is code-golf so all usual golfing rules apply.

Scoring
This is code-golf so the code with the shortest number of bytes wins!

You also say it can be a function but it must "print to STDOUT".  Is this intentional?

@SriotchilismO'Zaic - Output to STDOUT is intentional. I added text to the challenge to indicate that the algorithm to produce the images is part of the programming exercise.

Yep, a general construction rule would be great... for instance I'm not sure about even inputs, like N = 4...

Please don't say "The algorithm to produce the stars is part of the programming challenge." This is not something most golfers enjoy when doing an ASCII art challenge, and sounds like an attempt to pawn off something that's the specifiers responsibility. That said, I'm surprised people are unclear on the construction here; it's two triangles overlapped like the challenge says. Would it help to explicitly say the size and offset of the triangles?

The construction is regular except for n=1. All others have a height of 4n−1.

I have added parametric information for the first seven sizes of the star. Hopefully that will eliminate any confusion or edge case concerns.

@TimPederick Good catch about N=1 being different. I put in a note so solvers don't miss this. I think the challenge would be better without this special case though.

@xnor: since n=1 was different, I could't infer a general rule...and IMO the rule should always be specified for ASCII art, otherwise I'm well allowed to print whatever I want outside the range of the defined examples ;)

While I agree with @xnor that eliminating n=1 makes a better challenge, the rule afaict is: "The height of one full triangle (which is then flipped, shifted up n, and overlayed to make the full picture is: 3n - (signum of (n-1))"

Haskell, 114 bytes
Builds a function g which takes an number and produces a IO monad that prints the star to STDOUT.  I think this is ok.
f=replicate
a%b=mapM_(\n->putStrLn$f(a-n)' '++f(2*n-3)'*')$zipWith max<*>reverse$[2..a]++f b 0
g 1=4%1
g a=(3*a)%a

Try it online!
Explanation
First lets talk about the lambda.
\n->putStrLn$f(a-n)' '++f(2*n-1)'*'

This takes a number, n, to be drawn as stars.  We print twice that many stars and then 1 more and pad it on the right to the size of the image. We pad this on the right by a spaces to center the line of stars.  We can use this lambda to draw each line.
From this lambda we create (%). (%) starts with doing mapM_ with our lambda to turn a profile into the shape.
Now all we need to do is make a list of the profile for the star.  We can do this by making a triangle first with [1..a], then padding it with some zeros ++replicate b 0.  If we take the profile of the triangle and reverse it we get the other half of the star.  To super impose them we just make a new profile where each entry is the max of the two triangles. This is zipWith max.
We then call this in one of two ways: as 3%1 for input of 1 and with (3*a-1)%a otherwise.
From here we do a little bit of fiddling with some of the values to shave some bytes.  Since 3*a-1 is rather long we offset some of our other values by 1 so that everything cancels and we get the intended behavior with 3*a instead.  Namely we start our list at 2 instead of 1 and do 2*n-3 instead of 2*n-1 to make up for the change.
Alternative version, 114 bytes
This one builds a point-free function (%)<*>min 2
f=replicate
a%b=mapM_(\n->putStrLn$f(3*a-n)' '++f(2*(n-b)+1)'*')$zipWith max<*>reverse$[b..3*a]++f a 0
(%)<*>min 2

Try it online!
Handles all \$N>1\$, 98 bytes
f=replicate
g a=mapM_(\n->putStrLn$f(3*a-n)' '++f(2*n-3)'*')$zipWith max<*>reverse$[2..3*a]++f a 0

Try it online!
Handles all cases like the \$N=1\$ case, 98 bytes
f=replicate
g a=mapM_(\n->putStrLn$f(3*a-n)' '++f(2*n-1)'*')$zipWith max<*>reverse$[1..3*a]++f a 0

Try it online!

Your output looks nice now.

05AB1E, 21 bytes
3*s≠-L·<sÅ0«Âø€à'*×.C

Try it online!
or as a Test Suite
Explanation
3*                     # multiply input by 3
  s≠-                  # subtract 1 if the input isn't 1
     L                 # push range [1 ... (3*n-(n!=1))]
      ·<               # multiply by 2 and subtract 1 to get odd numbers
        sÅ0«           # append n zeroes
            Âø         # zip with a reversed copy
              €à       # get the largest number in each pair
                '*×    # repeat "*" for each number in the list
                   .C  # format centered

Your output stars look correct.

I can find loads of alternatives for 3*s≠-L·< like 6*s≠·-ÅÉ or ≠3/-6*ÅÉ, but unfortunately none are shorter.. Nice answer, as always! :)

xs3*<ŸRsLì'*×.º.C.∊ for 19 :). I lied, it doesn't work for 1. Leaving it for inspiration.

R, 125 107 101 bytes
function(n,S=3*n+!n-1,P=pmax(I<-c(2:S*2-3,!1:n),rev(I)),`~`=strrep)write(paste0(' '~S-1-P/2,'*'~P),1)

Try it online!

-24 thanks to @Giuseppe

Previous (different) approach :
R, 150 148 136 135 130 128 bytes
function(n,G=n<2,K=4*n-1+G)for(i in 1:K-1)cat(`[<-`(rep(' ',W<-3*n-2+G),1+W+c(-i:i*(i<K-n),-(j=K-i-1):j*(i>=n)),'*'),sep='','
')

Try it online!

-14 thanks to @Kirill L.
-1 thanks to @t-clausen.dk
-7 thanks to @Giuseppe

Yeah, I also don't like those repeated S[]= assignments, and looks like this works

Great ! I was thinking to something like that... but I was having dinner :P

Seems you can save a byte: i>n-1 can be rewritten to i>=n

132 bytes; I stumbled upon that by trying to exploit the symmetry, abandoning that approach, and then trying to make the output match up again. I think we can get to less than 130.

130 bytes using [<- instead of saving S.

128 bytes; set G=n<2 and W<-3*n-2+G.

117 bytes on the newer version

Of course! i forgot the G... and great idea the use of '~', I knew there was a better operator... maybe even > could work, I always forget them :D

Python 2, 101 99 97 bytes
n=input()
x=2*(n>1)
for i in range(1,8*n,2):print('*'*[i,8*n-i-x][i+x>n*6or i/n/2%2]).center(6*n)

Try it online!
-2 bytes, thanks to Lynn

I'm reasonably sure you don't need the parens in the selector expression, so i+x>n*6or saves two bytes.

You can even go i+x>~i/n/2%2*6*n or something like i+x>3*n*(~i/n&2) (both 96 bytes.)

JavaScript (V8),  101  108 bytes
EDIT: +7 bytes to print to STDOUT
n=>print((k=3*n+!~-n,g=y=>++y<k+n?`
`.padEnd(w=k-Math.max(y>n&&n-y+k,y<k&&y)).padEnd(2*k+~w,'*')+g(y):'')``)

Try it online!
Commented (without print)
n => (                    // n = input
  k =                     // k is half the maximum width of the star + 1.5
    3 * n + !~-n,         // k = 3n if n > 1 or 4 if n = 1
  g = y =>                // g = recursive function taking y
    ++y < k + n ?         //   increment y; if y is less than k + n:
      `\n`                //     append a line feed
      .padEnd(            //     append w - 1 leading spaces:
        w =               //       where w is defined as
          k -             //       k minus
          Math.max(       //       the maximum of:
            y > n         //         - true (coerced to 1) if y > n
            && n - y + k, //           or n - y + k otherwise (bottom triangle)
            y < k &&      //         - true (coerced to 1) if y < k
            y             //           or y otherwise (top triangle)
          )               //       end of Math.max()
      )                   //     end of padEnd()
      .padEnd(            //     append 2 * (k - w) - 1 stars
        2 * k + ~w,       //       by padding to 2 * k - w - 1
        '*'               //
      ) +                 //     end of padEnd()
      g(y)                //     append the result of a recursive call
    :                     //   else:
      ''                  //     stop recursion
)``                       // initial call to g with y = [''] (zero-ish)

Just a heads up the challenge seems to require that your output be printed to the console directly.  This doesn't technically meet that requirement.

@SriotchilismO'Zaic Thanks for letting me know. This is now 'fixed'.

Jelly, 21 bytes
×3’+ỊR;Ṭ»Ṛ$”*ẋz⁶ṚZŒBY

A full program accepting a positive integer which prints to STDOUT.
Try it online! Or see a test-suite.
How?
×3’+ỊR;Ṭ»Ṛ$”*ẋz⁶ṚZŒBY - Main Link: integer, n   e.g. 3
 3                    - three                        3
×                     - multiply (n by)              9
  ’                   - decrement                    8
    Ị                 - insignificant (abs(n)<=1)?   0
   +                  - add                          8
     R                - range                        [1,2,3,4,5,6,7,8]
       Ṭ              - un-truth (n)                 [0,0,1]
      ;               - concatenate                  [1,2,3,4,5,6,7,8,0,0,1]
          $           - last two links as a monad:
         Ṛ            -   reverse                    [1,0,0,8,7,6,5,4,3,2,1]
        »             -   maximum (vectorises)       [1,2,3,8,7,6,7,8,3,2,1]
           ”*         - an asterisk character        '*'
             ẋ        - repeat (vectorises)          ["*","**",...]
               ⁶      - a space character            ' '
              z       - transpose with filler        ["***********"," ********* ",...]
                Ṛ     - reverse                      ["   *   *   ","   ** **   ",...]
                 Z    - transpose                    ["       *","      **",...]
                  ŒB  - bounce (vectorises)          ["       *       ","      ***      ",...]
                    Y - join with newline characters "       *       \n      ***      \n..."
                      - implicit print

Canvas, 25 23 bytes
Ｒ：｛⁸３×４Ｍ∔］∔｛*×］↔⁸１≡？╪］┼

Try it here!
15 bytes without handling 1

Makes nice stars.

Jelly, 21 bytes
×’»ɗ3”*xⱮz⁶ɓ⁶x;»Ṛ$ŒBY

Try it online!
A monadic link accepting a single integer as its left argument and returning a newline-separated Jelly string with the star as its output. When run as a full program implicitly prints the star to STDOUT.
Explanation
   ɗ3                 | Last three links as a dyad with 3 as right argument:
×                     |   Multiply (by 3)
 ’                    |   Decrease by 1
  »                   |   Maximum of this (and 3)
     ”*xⱮ             | An implicit range from 1 to this many asterisks
         z⁶           | Zip with space as filler
           ɓ          | Start a new dyadic chain with the input as left argument and the list of asterisks as right argument
            ⁶x        | Input many spaces
              ;       | Concatenated to the asterisk list
                 $    | Last two links as a monad:
               »Ṛ     |   Maximum of this list and its reverse
                  ŒB  | Bounce each list (i.e. mirror it without duplicating the middle entry)
                    Y | Join with newlines

I appreciate you writing the start the stylish way even though ×3’»3 is the same length ^_^

@Lynn at the point I did that I thought I was going to be using another quick to merge multiple links, and it meant that I could do so within the maximum 4 allowed. However, once I decided to use ɓ it didn’t matter but I kept it because I still liked it!

Charcoal, 25 bytes
Ｇ↙θ←⁺⊗θ¬⊖θ↑⊗θ↘⊕θ*‖Ｏ¬Ｃ⁰¬⊖θ

Try it online! Link is to verbose version of code. Explanation:
Ｇ↙θ←⁺⊗θ¬⊖θ↑⊗θ↘⊕θ*

Draw an irregular pentagon representing the top right quarter of the star, but special-casing 1 to make the row an extra column wider.
‖Ｏ¬

Reflect to complete the star.
Ｃ⁰¬⊖θ

More special-casing to make the star for 1 an extra row taller.
Alternative solution, also 25 bytes:
∧¬⊖θ*Ｇ↗↓⊖×³Ｎ*‖Ｏ‖ＯＯ↓∧⊖θ⊖⊗θ

Try it online! Link is to verbose version of code. Explanation:
∧¬⊖θ*

Print an extra * for the case of 1.
Ｇ↗↓⊖×³Ｎ*

Draw the left half of a triangle of the appropriate size.
‖Ｏ

Reflect to complete the triangle.
‖ＯＯ↓∧⊖θ⊖⊗θ

Overlap it with its reflection, except in the case of 1, in which case just reflect it.
14 bytes without special-casing for 1:
Ｇ<⊖×³Ｎ*‖ＯＯ↑⊖⊗θ

Try it online! Link is to verbose version of code. Explanation:
Ｇ<⊖×³Ｎ*

Draw a triangle of the appropriate size.
‖ＯＯ↑⊖⊗θ

Overlap it with its reflection.

Japt -R, 25 bytes
+5 bytes for n=1 :\
õ cUon3*U-´UÎ)®ç* êÃê!U û

Try it
õ cUon3*U-´UÎ)®ç* êÃê!U û     :Implicit input of integer U
õ                             :Range [1,U]
  c                           :Concatenate
   Uo                         :  Range [0,U)
     n                        :  Subtract each from
      3*U-                    :    Multiply U by 3 and subtract
          ´U                  :      Decrement U
            Î                 :      Get sign
             )                :End concat
              ®               :Map each Z
               ç*             :  Repeat "*" Z times
                  ê           :  Palindromise
                   Ã          :End map
                    ê!U       :If decremented U is 0, append reverse, else, palindromise
                        û     :Centre pad each line with spaces to the length of the longest
                              :Implicitly join with newlines and output

T-SQL, 194 bytes
@ is the input value
@c handles the width of the top triangle
@d handles the width bottom triangle
@e contains the output either @c or @d - this saves a few bytes
@f handles the special case of 1 as input. @c*@=3 determines when to use @f. 5 bytes cheaper than writing @c=3and @=1
DECLARE @ INT=8

,@c INT=1,@e INT=1,@d INT,@f INT=0SET @d=@*8-3r:PRINT
space(@*3-@e/2+@f/2)+replicate('*',@e-@f)SELECT
@c=nullif(@c,@*6-3)+2,@f=iif(@c*@=3,2,0),@d-=2-@f,@e=iif(@c>@d
or @c/2<@,@c,@d)IF @d>0goto r

Try it online

Perl 6, 74 bytes
{$_ Z~|[R,] $_}o{.&{|((' 'x--$+$_*3~'*'x$++*2+1)xx$_*3-($_>1)),|($ xx$_)}}

Try it online!
Literally creates a triangle with the right proportions and overlaps it with a upside-down copy using the string or operator (~|). Outputs as a list of lines with a leading and trailing line whitespace.
Explanation:
                {.&{                                                     }  # Anonymous code block
                      (                        )xx$_*3-($_>1)   # Repeat n*3-(n!=1) times
                       ' 'x--$+$_*3      # With a decreasing indentation
                                   ~'*'x$++*2+1  # Append an increasing triangle
                                       # This creates the triangle
                                                            ,|($ xx$_)  # And add some padding lines
{             }o   # Pass the triangle to the combining function
    Z~|            # Zip string bitwise or
 $_                # The list
       [R,] $_     # With its reverse

J, 53 50 bytes
' *'{~[:(+.|.),.@#&0,~[:(|.,}.)"1*@<:>:/~@i.@-~3*]

Try it online!
ungolfed
' *' {~ [: (+. |.) ,.@#&0 ,~ [: (|. , }.)"1 *@<: >:/~@i.@-~ 3 * ]

how
Use a function table (like a 3rd grade times table) to construct half the triangle by using >: (greater than or equal) as the function.  Then reverse each row, chop of the last column, and stitch the two sides together to get the full triangle (but made of 1 and 0).  Add n rows of zeros at the bottom.  Finally reverse the whole thing, and overlay it on the original, using boolean or +. to get the result.  Then turn the 1 to * and 0 to spaces.

Nice! Here's my solution - same length, different approach: Try it online!

Thanks.  It sure feels like it could be golfed more, but I tried a handful of other approaches and wasn't able to do it.

Vyxal j, 53 bytes
1=[ðd×+:,×5*:,,,|(⁰3*⇩n-ð*nd›×*+)⁰(nð*6⁰*3-nd-×*+)Wøm

Try it Online!

Haskell, 105 bytes
f n|h<-3*n-min 2n=mapM putStrLn[([x+1..h]>>" ")++do[-x..x];"*"|x<-zipWith max<*>reverse$[0..h]++[1-n..0]]

Try it online!


text:
New Order #5: where Fibonacci and Beatty meet at Wythoff
Introduction (may be ignored)
Putting all positive numbers in its regular order (1, 2, 3, ...) is a bit boring, isn't it? So here is a series of challenges around permutations (reshuffelings) of all positive numbers. This is the fifth challenge in this series (links to the first, second, third and fourth challenge).
In this challenge, we will meet the Wythoff array, which is a intertwined avalanche of Fibonacci sequences and Beatty sequences!
The Fibonacci numbers are probably for most of you a well known sequence. Given two starting numbers \$F_0\$ and \$F_1\$, the following \$F_n\$ are given by: \$F_n = F_{(n-1)} + F_{(n-2)}\$ for \$n>2\$.
The Beatty sequence, given a parameter \$r\$ is: \$B^r_n = \lfloor rn \rfloor\$ for \$n \ge 1\$. One of the properties of the Beatty sequence is that for every parameter \$r\$, there is exactly one parameter \$s=r/(r-1)\$, such that the Beatty sequences for those parameters are disjunct and joined together, they span all natural numbers excluding 0 (e.g.: \$B^r \cup B^{r/(r-1)} = \Bbb{N} \setminus \{0\}\$).
Now here comes the mindblowing part: you can create an array, where each row is a Fibonacci sequence and each column is a Beatty sequence. This array is the Wythoff array. The best part is: every positive number appears exactly once in this array! The array looks like this:
   1    2    3    5    8   13   21   34   55   89  144 ...
   4    7   11   18   29   47   76  123  199  322  521 ...
   6   10   16   26   42   68  110  178  288  466  754 ...
   9   15   24   39   63  102  165  267  432  699 1131 ...
  12   20   32   52   84  136  220  356  576  932 1508 ...
  14   23   37   60   97  157  254  411  665 1076 1741 ...
  17   28   45   73  118  191  309  500  809 1309 2118 ...
  19   31   50   81  131  212  343  555  898 1453 2351 ...
  22   36   58   94  152  246  398  644 1042 1686 2728 ...
  25   41   66  107  173  280  453  733 1186 1919 3105 ...
  27   44   71  115  186  301  487  788 1275 2063 3338 ...
  ...

An element at row \$m\$ and column \$n\$ is defined as:
\$A_{m,n} = \begin{cases}
\left\lfloor \lfloor m\varphi \rfloor \varphi \right\rfloor & \text{ if } n=1\\
\left\lfloor \lfloor m\varphi \rfloor \varphi^2 \right\rfloor & \text{ if } n=2\\
A_{m,n-2}+A_{m,n-1} & \text{ if }n > 2
\end{cases}\$
where \$\varphi\$ is the golden ratio: \$\varphi=\frac{1+\sqrt{5}}{2}\$.
If we follow the anti-diagonals of this array, we get A035513, which is the target sequence for this challenge (note that this sequence is added to the OEIS by Neil Sloane himself!). Since this is a "pure sequence" challenge, the task is to output \$a(n)\$ for a given \$n\$ as input, where \$a(n)\$ is A035513.
There are different strategies you can follow to get to \$a(n)\$, which makes this challenge (in my opinion) really interesting.
Task
Given an integer input \$n\$, output \$a(n)\$ in integer format, where \$a(n)\$ is A035513.
Note: 1-based indexing is assumed here; you may use 0-based indexing, so \$a(0) = 1; a(1) = 2\$, etc. Please mention this in your answer if you choose to use this.
Test cases
Input | Output
---------------
1     |  1
5     |  7
20    |  20
50    |  136
78    |  30
123   |  3194
1234  |  8212236486
3000  |  814
9999  |  108240
29890 |  637

It might be fun to know that the largest \$a(n)\$ for \$1\le n\le32767\$ is \$a(32642) = 512653048485188394162163283930413917147479973138989971 = F(256) \lfloor 2 \varphi\rfloor + F(255).\$
Rules

Input and output are integers
Your program should at least support input in the range of 1 up to 32767). Note that \$a(n)\$ goes up to 30 digit numbers in this range...
Invalid input (0, floats, strings, negative values, etc.) may lead to unpredicted output, errors or (un)defined behaviour.
Default I/O rules apply.
Default loopholes are forbidden.
This is code-golf, so the shortest answers in bytes wins

So what's the New Order reference here?

@LuisMendo: the avalanche of Fibonacci and Beatty sequences, which form the Wythoff array...

Ah, I completely missed that! Now I feel regret...

Is a floating point representation of phi (or rt(5)) and application of the recurrence going to satisfy the range requirement?

@JonathanAllan : good point... I'll look into that later. For now: let's pose that if some code passes the test cases, then it works sufficiently.

$ A_{m,1} $ is also the list of positions of odd numbers in the sequence of integers whose binary representation contains no adjacent 1s, so it can be calculated without phi... I don't know about $ A_{m,2} $ though.

Is the example for 9999 definitely correct? - I match all the others but get 108240 for 9999.

Please fix the 9th test case : it is 999 not9999

The output for test case 1234 does not fit into a 32 bit integer. Does a program have to work for this case in order to be considered a working solution?

@J42161217: I corrected the testcase for 9999. The previous value was indeed for 999 and not for 9999. Sorry for that.

@NeilA.: I clarified the rules. Your program should support an input range of 1...32767. This requires big number support for calculation and for output (up to 30 digits). I'll check the answers for compliance somewhere in the next days.

@JonathanAllan: although the results get large very quickly, if you use the Fibonacci function, you won't need to multiply $\varphi$ with very large numbers. The testcase for $n=1234$ can be calculated as: $F(43) * \lfloor9 \varphi\rfloor + 8F(42)$, where $F(n)$ is the $n^{th}$ Fibonacci number (in it's regular sequence, where $F_0=F_1=1$.

Jelly, 27 24 bytes
p`SÞ⁸ịð’;×ØpḞ¥×⁹r‘ÆḞ¤Sð/

Try it online!
Monadic link using 1-based indexing.
Thanks to @JonathanAllan for a better way of getting the row and columns from n and saving 3 bytes. In its shortest form it’s too slow for larger n on TIO, so the following Try it online! reduces the size of the initial list of rows and columns at the cost of three bytes.
Explanation
p`                       | Cartesian product of the range from 1..input with itself
  SÞ                     | Sort by sum
    ⁸ị                   | Find the tuple at the position indicated by the input - this is the row and column
      ð               ð/ | Start a new dyadic chain using the row as the left and column as the right argument
       ’                 | Increase the row by 1
        ;    ¥           | Concatenate to:
         ×Øp             |   row × φ
            Ḟ            |   rounded down
              ×     ¤    | Multiply this pair by
                  ÆḞ     |   the Fibonacci numbers at positions
               ⁹         |   column index and
                r‘       |   column index plus one
                     S   | sum

Note this is based on the description of the Python code on the OEIS page.

...×⁹r‘ÆḞ¤Sð/ saves one in your amalgamation version (TIO)

R, 143 130 124 123 bytes
function(n){k=0:n+1
`~`=rbind
m=k-1~(k*(1+5^.5)/2)%/%1
for(i in k)m=m~m[i,]+m[i+1,]
m=m[-1:-2,]
m[order(row(m)+col(m))][n]}

Try it online!
Uses the formula \$T(n,-1)=n-1; T(n,0)=\lfloor n\cdot\phi\rfloor;T(n,k)=T(n,k-1)+T(n,k-2)\$ to construct the array (transposed), then splits the array along antidiagonals. k merely exists to prevent forcing a drop=F argument in m[-1:-2,] for the case n=1.
Thanks to Neil for pointing out a 1 byte golf.
R, 150 138 132 bytes
function(n){T[2]=1
for(j in 2:n-1)T=c(T,T[j]+T[j+1])
m=T[-1]%o%((1:n*(.5+5^.5/2))%/%1)+T[-1-n]%o%(1:n-1)
m[order(row(m)+col(m))][n]}

Try it online!
Implements the formula \$T(n,k)=Fib(k+1)\cdot\lfloor n\cdot\phi\rfloor+Fib(k)\cdot(n-1)\$ to get generate the array, then splits along the antidiagonals and extracts the nth element.
Thanks to Robin Ryder for the T[2]=1 trick for generating the Fibonacci sequence.

Both solutions are highly inefficient, creating an nxn matrix of (most likely) doubles, as R promotes integer (32-bit signed) to double automatically when overflowing, but the second one should be quite a lot faster. Taking n as a bignum should work automatically, using the call gmp::as.bigz(n), should loss of precision under doubles be worrisome, and then the language would be R + gmp.

Can you use (1+5^.5)/2 instead of (.5+5^.5/2)?

@Neil ...yes, I can. Thank you! Only going to edit it into the top one unless I can find a way to golf down the second one quite a lot more.

Wolfram Language (Mathematica), 90 bytes
Flatten[Table[(F=Fibonacci)[a+1]⌊(b-a+1)GoldenRatio⌋+(b-a)F@a,{b,#},{a,b,1,-1}]][[#]]&

Try it online!

Charcoal, 54 bytes
Ｎθ≔⁰ηＷ‹ηθ«≦⊕η≧⁻ηθ»⊞υ¹Ｆθ⊞υ⁻⁺³ι§υ⊖§υι⊞υθＦ⁺²⁻θη⊞υΣ…⮌υ²Ｉ⊟υ

Try it online! Link is to verbose version of code. 0-indexed. Uses only integer arithmetic so works for arbitrary large values. Explanation:
Ｎθ

Input q.
≔⁰ηＷ‹ηθ«≦⊕η≧⁻ηθ»

Calculate the antidiagonal by subtracting ever increasing numbers from q, which ends up with the target row number m.
⊞υ¹Ｆθ⊞υ⁻⁺³ι§υ⊖§υι

Calculate the first m+1 terms of A019446, although we're only interested in the mth.
⊞υθＦ⁺²⁻θη⊞υΣ…⮌υ²

Calculate the first n+4 terms of the generalised Fibonacci series that starts with [a(m), m]. The terms of this sequence are the mth terms of A019446, A001477, A000201, A003622, A035336; these last two are the first two columns of the Wythoff array, and so this sequence continues with the rest of the mth row of the array.
Ｉ⊟υ

Output the desired term.

Jelly, 30 bytes
p`SÞ⁸ịð;Øp,²;\¤×Ḟ¥/;+ƝQƊ⁹¡ị@ð/

Try it online!
This is a little slow, but a huge improvement is made with a prefix of Ḥ½Ċ (double, square-root, ceiling) like in this test-suite.

you are right! 740496902 is the result for 999

Combining the first part of yours and second part of mine gives 25 bytes. Not sure which of us should have the combined version!

@NickKennedy - nice, go for it!

source: Stack Exchange

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

sort: votes


text:
Area of a 2D convex hull
You are given an array/list/vector of pairs of integers representing cartesian coordinates \$(x, y)\$ of points on a 2D Euclidean plane; all coordinates are between \$−10^4\$ and \$10^4\$, duplicates are allowed. Find the area of the convex hull of those points, rounded to the nearest integer; an exact midpoint should be rounded to the closest even integer. You may use floating-point numbers in intermediate computations, but only if you can guarantee that the final result will be always correct. This is code-golf, so the shortest correct program wins.
The convex hull of a set of points \$P\$ is the smallest convex set that contains \$P\$. On the Euclidean plane, for any single point \$(x,y)\$, it is the point itself; for two distinct points, it is the line containing them, for three non-collinear points, it is the triangle that they form, and so forth.
A good visual explanation of what a convex hulls, is best described as imagining all points as nails in a wooden board, and then stretching a rubber band around them to enclose all the points:

Some test cases:
Input: [[50, -13]]
Result: 0

Input: [[-25, -26], [34, -27]]
Result: 0

Input: [[-6, -14], [-48, -45], [21, 25]]
Result: 400

Input: [[4, 30], [5, 37], [-18, 49], [-9, -2]]
Result: 562

Input: [[0, 16], [24, 18], [-43, 36], [39, -29], [3, -38]]
Result: 2978

Input: [[19, -19], [15, 5], [-16, -41], [6, -25], [-42, 1], [12, 19]]
Result: 2118

Input: [[-23, 13], [-13, 13], [-6, -7], [22, 41], [-26, 50], [12, -12], [-23, -7]]
Result: 2307

Input: [[31, -19], [-41, -41], [25, 34], [29, -1], [42, -42], [-34, 32], [19, 33], [40, 39]]
Result: 6037

Input: [[47, 1], [-22, 24], [36, 38], [-17, 4], [41, -3], [-13, 15], [-36, -40], [-13, 35], [-25, 22]]
Result: 3908

Input: [[29, -19], [18, 9], [30, -46], [15, 20], [24, -4], [5, 19], [-44, 4], [-20, -8], [-16, 34], [17, -36]]
Result: 2905

Do you have any test cases?

Not counting whitespace in code golf is a bad idea, it leads to submissions with massive strings of whitespace plus generic code to convert the string to code and execute it.

So if someone can just make a whitespace solution...

Related

an exact midpoint should be rounded to the closest even integer: just wondering what's the reasoning behind that?

@Arnauld Round-to-even is the default rounding mode on IEEE 754 systems. Java and JavaScript mandate rounding towards positive infinity, though.

@nwellnhof True. But enforcing this rule is just an annoyance for languages that don't do it that way (and I think Python 2 doesn't round-to-even either). I don't think we should round at all anyway. The triangle [[0, 0], [1, 1], [0, 1]] really should yield $1/2$ rather than $0$.

Usually challenges are self-contained, but this one isn't. Could you explain what a convex hull is, and how to compute it? Or point to some reference online resource?

I've VTCed as unclear until @OlivierGrégoire's comment is addressed. Ping me when it is and I'll retract my vote or vote to reopen.

SQL Server 2012+, 84 bytes
SELECT Round(Geometry::ConvexHullAggregate(Geometry::Point(x,y,0)).STArea(),0)FROM A

Makes use of the geometry functions and aggregates in SQL Server.
Coordindates are from table A with columns x and y.

Java 10, 405 ...didn't fit anymore; see edit history.. 317 316 bytes
P->{int n=P.length,l=0,i=0,p,q,t[],h[][]=P.clone(),s=0;for(;++i<n;)l=P[i][0]<P[l][0]?i:l;p=l;do for(h[s++]=P[p],q=-~p%n,i=-1;++i<n;q=(t[1]-P[p][1])*(P[q][0]-t[0])<(t[0]-P[p][0])*(P[q][1]-t[1])?i:q)t=P[i];while((p=q)!=l);for(p=i=0;i<s;p-=(t[0]+h[++i%s][0])*(t[1]-h[i%s][1]))t=h[i];return Math.round(.5*p/~(p%=2))*~p;}

-52 bytes thanks to @OlivierGrégoire
-3 bytes thanks to @PeterTaylor
-7 bytes thanks to @ceilingcat
Try it online.
Or 299 bytes without rounding...
Explanation:
There are three steps to do:

Calculate the points for the Convex Hull based on the input-coordinates (using Jarvis' Algorithm/Wrapping)
Calculate the area of this Convex Hull
Banker's rounding..

To calculate the coordinates that are part of the Convex Hull, we use the following approach:
Set point \$l\$ and \$p\$ to the left-most coordinate. Then calculate the next point \$p\$ in a counterclockwise rotation; and continue doing so until we've reached back at the initial point \$l\$. Here a visual for this:

As for the code:
P->{                      // Method with 2D integer array as parameter & long return-type
  int n=P.length,         //  Integer `n`, the amount of points in the input
      l=0,                //  Integer `l`, to calculate the left-most point
      i=0,                //  Index-integer `i`
      p,                  //  Integer `p`, which will be every next counterclockwise point
      q,                  //  Temp integer `q`
      t[],                //  Temp integer-array/point
      h[][]=P.clone(),    //  Initialize an array of points `h` for the Convex Hull
      s=0;                //  And a size-integer for this Convex Hull array, starting at 0
  for(;++i<n;)            //  Loop `i` in the range [1, `n`):
    l=                    //   Change `l` to:
      P[i][0]<P[l][0]?    //   If i.x is smaller than l.x:
       i                  //    Replace `l` with the current `i`
      :l;                 //   Else: leave `l` unchanged
  p=l;                    //  Now set `p` to this left-most coordinate `l`
  do                      //  Do:
    for(h[s++]=P[p],      //   Add the `p`'th point to the 2D-array `h`
        q=-~p%n,          //   Set `q` to `(p+1)` modulo-`n`
        i=-1;++i<n;       //    Loop `i` in the range [0, `n`):
        ;q=               //      After every iteration: change `q` to:
                          //       We calculate: (i.y-p.y)*(q.x-i.x)-(i.x-p.x)*(q.y-i.y),
                          //       which results in 0 if the three points are collinear;
                          //       a positive value if they are clockwise;
                          //       or a negative value if they are counterclockwise
           (t[1]-P[p][1])*(P[q][0]-t[0])<(t[0]-P[p][0])*(P[q][1]-t[1])?
                          //       So if the three points are counterclockwise:
            i             //        Replace `q` with `i`
           :q)            //       Else: leave `q` unchanged
      t=P[i];             //     Set `t` to the `i`'th Point (to save bytes)
  while((p=q)             //  And after every while-iteration: replace `p` with `q`
             !=l);        //  Continue the do-while as long as `p` is not back at the
                          //  left-most point `l` yet
  // Now step 1 is complete, and we have our Convex Hull points in the List `h`

  for(p=i=0;              //  Set `p` (the area) to 0
      i<s                 //  Loop `i` in the range [0, `s`):
      ;p-=                //    After every iteration: Decrease the area `p` by:
        (t[0]+h[++i%s][0])//     i.x+(i+1).x
        *(t[1]-h[i%s][1]))//     Multiplied by i.y-(i+1).y
    t=h[i];               //   Set `t` to the `i`'th point (to save bytes)
 return Math.round(.5*p/~(p%=2))*~p;}
                          //  And return `p/2` rounded to integer with half-even

Let us continue this discussion in chat.

Wolfram Language (Mathematica), 27 bytes
Round@*Area@*ConvexHullMesh

Try it online!

JavaScript (ES6),  191  189 bytes
Implements the Jarvis march (aka gift wrapping algorithm).
P=>(r=(g=p=>([X,Y]=P[p],Y*h-X*v)+(P.map(([x,y],i)=>q=(y-Y)*(P[q][0]-x)<(x-X)*(P[q][1]-y)?i:q,q=P[++p]?p:0,h=X,v=Y)|q?g(q):V*h-H*v))(v=h=0,([[H,V]]=P.sort(([x],[X])=>x-X)))/2)+(r%1&&r&1)/2|0

Try it online!
Or 170 bytes without the cumbersome rounding scheme.

Rounding was just a red herring because twice the area is always exactly integer.

@VladimirReshetnikov Out of curiosity: if you knew rounding was a red herring, then why add it to distract from the otherwise good challenge?.. Not all languages have builtin Banker's rounding, not even well-known languages like JS and Java apparently. I like the challenge in general and enjoyed writing my Java answer, but the rounding and lack of explanation what Convex Hull is to make the challenge self-contained refrained me from upvoting it, tbh.. PS: Sorry @Arnauld to do this as a comment in your answer..

R, 85 81 78 bytes
function(i,h=chull(i),j=c(h,h[1]))round((i[h,1]+i[j[-1],1])%*%diff(-i[j,2])/2)

Try it online!
Takes input as a 2-column matrix - first for x, second for y. R's round actually uses banker's rounding method, so we are quite lucky here.
The code uses a built-in function to determine, which points form the convex hull, and then applies the standard formula \$\sum_{i}{(x_{i-1}+x)\cdot(y_{i-1}-y_i)}/2\$ to get the polygon surface area.
Thanks to Giuseppe for -3 bytes.

[R + sp package], 55 bytes
function(x)round(sp::Polygon(x[chull(x),,drop=F])@area)

Try it at RDRR
A function which takes a n x 2 matrix and returns the rounded area. This uses the sp package. The drop=F is needed to handle the one co-ordinate case. RDRR used for demo since TIO lacks the sp package.

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


text:
Letter Boxed validator
The New York Times has a daily online game called Letter Boxed (the link is behind a paywall; the game is also described here), presented on a square as follows:

You are given 4 groups of 3 letters (each group corresponds to one side on the picture); no letter appears twice. The aim of the game is to find words made of those 12 letters (and those letters only) such that:

Each word is at least 3 letters long;
Consecutive letters cannot be from the same side;
The last letter of a word becomes the first letter of the next word;
All letters are used at least once (letters can be reused).

In this challenge, you are given the letters and a list of words. The goal is to check whether the list of words is a valid Letter Boxed solution.
Input
Input consists of (1) 4 groups of 3 letters and (2) a list of words. It can be in any suitable format.
Output
A truthy value if the list of words is a valid solution to the Letter Boxed challenge for those 4×3 letters, and a falsey value otherwise.
Test cases
Groups of letters={{I,C,O},  {M,R,E}, {G,N,S}, {A,P,L}}.
Truthy values

PILGRIMAGE, ENCLOSE
CROPS, SAIL, LEAN, NOPE, ENIGMA

Falsey values

PILGRIMAGE, ECONOMIES (can't have CO since they are on the same side)
CROPS, SAIL, LEAN, NOPE (G and M have not been used)
PILGRIMAGE, ENCLOSURE (U is not one of the 12 letters)
ENCLOSE, PILGRIMAGE (last letter of 1st word is not first letter of 2nd word)
SCAMS, SO, ORGANISE, ELOPE (all words must be at least 3 letters long).

Note that in this challenge, we do not care whether the words are valid (part of a dictionary).
Scoring:
This code-golf, lowest score in bytes wins!

@TFeld no letter appears twice

A truthy value if the list of words is a valid solution to the Letter Boxed challenge for those 4×3 letters, and a falsey value otherwise. For Python (and most other languages, I expect), both [] and 0 are falsey. Can we output either, or must our output be consistent?

@ArtemisFowl Either is fine.

I thought so, but my question was: can we mix them?

@ArtemisFowl Yes, you can mix them.

05AB1E, 37 35 33 32 31 29 28 bytes
εk3÷üÊ}DO2@¹ü«εüQO}²{¹˜êQ)˜P

-2 bytes by taking inspiration of the ê approach @Emigna used in his 05AB1E answer.
-3 bytes thanks to @Grimy.
Takes a list of list of characters for the words as first input, and the flattened list of twelve letters as second input.
Try it online or verify all test cases.
Explanation:
ε         # Map over the character-lists `y` of the (implicit) input-list of words:
 k        #  Get the index of each character in the (implicit) input-list of letters
  3÷      #  Integer-divide each index by 3
    üÊ    #  Check for each overlapping pair of integers that they are NOT equal
}D        # After the map: duplicate the resulting list
  O       #  Get the sum of each inner list of truthy/falsey values
   2@     #  And check that each is larger than 2 (so all words had at least 3 letters)
¹ü        # Get all overlapping pairs of character-lists from the input-list of words:
  «       #  And merge them together to a flattened list of characters
   ε   }  # Map over those merged character lists:
    üQ    #  Check for each overlapping pair of characters in the list that they are equal
      O   #  And take the sum of this (where we'd expect 1/truthy if the last character of
          #  the first word and the first character of the second word are equal)
          #  (NOTE: This could fail for inputs with identical adjacent characters,
          #   but the earlier check of `εk3÷üÊ}` already covers for this)
²{        # Push the input-list of letters, and sort them
  ¹˜      # Push the input-list of list of word-letters, flattened,
    ê     # and then uniquified and sorted as well
     Q    # And check if both lists of characters are the same
)˜        # Then wrap everything on the stack into a list, and deep flatten it
  P       # And check if everything is truthy by taking the product
          # (which is output implicitly as result)

@Grimy Ah, that first comment is indeed an obvious one. I've just changed it to a character array, so now that indeed works where it wouldn't before when the words were still strings. That second approach of merge, check pair equality, sum is quite brilliant, though! :D Thanks (as always).

Another -1: ¹€g3@ -> DO2@ after the first check (TIO)

@Grimy Another nice one, thanks. We're now below the Jelly answer of 29. :)

JavaScript (ES6),  130  126 bytes
Takes input as (letters)(words). Returns \$0\$ or \$1\$.
L=>W=>L.every(a=>a.every(x=>(W+'').match(x,a.map(y=>s+='|'+x+y))),p=s=1)&W.every(w=>w[2]&&p|w[0]==p&!w.match(s,p=w.slice(-1)))

Try it online!
Step 1
We first iterate over \$L\$ to build a pipe-separated string \$s\$ consisting of all invalid pairs of letters. While doing so, we also make sure that each letter appears at least once in some word.
L.every(a =>              // for each group of letter a[] in L[]:
  a.every(x =>            //   for each letter x in a[]:
    (W + '')              //     coerce W[] to a string
    .match(               //     and test whether ...
      x,                  //       ... x can be found in it
      a.map(y =>          //       for each letter y in a[]:
        s += '|' + x + y  //         append '|' + x + y to s
      )                   //       end of map()
    )                     //     end of match()
  ),                      //   end of inner every()
  p = s = 1               //   start with p = s = 1
)                         // end of outer every()

Step 2
We now iterate over \$W\$ to test each word.
W.every(w =>              // for each word w in W[]:
  w[2] &&                 //   is this word at least 3 characters long?
  p |                     //   is it the first word? (p = 1)
  w[0] == p &             //   or does it start with the last letter of the previous word?
  !w.match(               //   and finally make sure that ...
    s,                    //     ... it doesn't contain any invalid pair of letters
    p = w.slice(-1)       //     and update p to the last letter of w
  )                       //   end of match()
)                         // end of every()

Jelly, 30 29 bytes
FQṢ=Ṣ},i@€€’:3Iʋ,Ẉ>2ɗ,U=ḢɗƝ{Ȧ

Try it online!
A dyadic link that takes the list of words as left argument and the flattened list of letters in the box as the right argument. It returns 1 for true and 0 for false.
Explanation
F                               | Flatten the word list
 Q                              | Unique
  Ṣ                             | Sort
   =                            | Is equal to
    Ṣ}                          |   The sorted letterbox letters
      ,        ʋ                | Pair this with the following:
       i@€€                     |   The index of each letter of each word in the letterbox
           ’                    |   Decrease by 1
            :3                  |   Integer divide by 3
              I                 |   Differences between consecutive ones (will be zero if any two consecutive letters in a word from same side of box)
                ,   ɗ           | Pair everything so far with the following:
                 Ẉ>2            |   Whether length of each input word is greater than 2
                     ,   ɗƝ{    | Pair everything so far with the following, applied to each neighbouring pair of the input word list
                      U         |   Upend (reverse) first word
                       =        | Compare characters to second
                        Ḣ       |   Take first (i.e. last character of first word equals first character of second)
                            Ȧ   | Flatten all of the above and check there are no false values

05AB1E, 42 bytes
εg2›}P¹εεUIεXå}ƶO}üÊP}P¹ü‚ε`нsθQ}P¹Jê²JêQP

Try it online!

It's not much, but a byte can be saved by removing all P after the maps, and use )˜P at the end. 41 bytes Nice approach with ê however! Saved 2 bytes in my 05AB1E answer.

Python 2, 171 bytes
lambda l,w:(set(sum(l,[]))==set(''.join(w)))*all(a[-1]==b[0]for a,b in zip(w,w[1:]))*all((a in g)+(b in g)<2for x in w for a,b in zip(x,x[1:])for g in l)*min(map(len,w))>2

Try it online!

Jelly, 34 bytes
Ṫ=¥/ƝḢ€Ạȧ⁸Fe€ⱮZḄ;IẠƊȧF}fƑF{
ẈṂ>2ȧç

A dyadic Link accepting the words on the left and the letter groups on the right which yields 1 if valid and 0 if not.
Try it online! Or see the test-suite.

Haskell, 231 bytes
import Data.List
l&w=all((>2).length)w&&c w&&all(l!)w&&(h l)%(h w)
h=concat
l%w=null[x|x<-l,x`notElem`w]
l!(a:b:c)=a#l?(b#l)&&l!(b:c)
l!_=1>0
Just a?Just b=a/=b
_?_=1<0
c#l=findIndex(elem c)l
c(a:b:t)=last a==head b&&c(b:t)
c _=1>0

Try it online!
Not the best score. Some Haskell guru will probably be able to get this under 100 bytes.
Usage
["ICO","MRE","GNS","APL"]&["CROPS", "SAIL", "LEAN", "NOPE", "ENIGMA"]

Explanation
import Data.List
l&w = all((>2).length)w &&      -- Every word has length > 2
      c w &&                    -- Every word ends with the same letter as the next one starts with
      all(l!)w &&               -- For every word: Consecutive letters are on different sides (and must exist on a side)
      (h l)%(h w)               -- All letters are used

h=concat                        -- Just a shorthand

l%w=null[x|x<-l,x`notElem`w]    -- The letters of l, with all letters of w removed, is empty

l!(a:b:c)=a#l?(b#l)&&l!(b:c)    -- Sides of the first two letters are different, recurse from second letter
l!_=1>0                         -- Until fewer than 2 letters remain

Just a?Just b=a/=b              -- Both sides must be different
_?_=1<0                         -- And must exist

c#l=findIndex(elem c)l          -- Find the side of letter c

c(a:b:t)=last a==head b&&c(b:t) -- Last letter of the first word must be same as first letter of second word, recurse starting from second word
c _=1>0                         -- Until there are fewer than 2 words

Haskell, 231 bytes
A different Haskell variation, exactly the same size as @Paul Mutser's :)
import Data.List
f x=filter(\a->length a>1)$concatMap subsequences x
g=nub.concat.f
p l(x:y)=foldl(\(m,n)c->(c,n&&length c>2&&(not$any(`isInfixOf`c)(f l))&&last m==head c))(x,True)y
z l w=null(g l\\g w)&&null(g w\\g l)&&(snd$p l w)

Try it online!
Ungolfed
-- generate all invalid substrings
f :: [String] -> [String]
f xs = filter (\x -> length x > 1) $ concatMap subsequences xs

-- utility function to flatten and remove duplicates
g :: [String] -> String
g  = nub $ concat $ f

-- verify that all conditions are satisfied along the list
p :: [String] -> [String] -> (String, Bool)
p l (x:xs) = foldl (\(m,n) c -> (c , n && length c > 2 && (not $ any (`isInfixOf` c)(f l)) && last m == head c)) (x, True) xs

-- put all the pieces together and consume input
z :: [String] -> [String] -> Bool
z l w = null (g l \\ g w) && null (g w \\ g l) && (snd $ p l w)

Ruby, 126 bytes
->l,w{(/(_|^)..(_|$)/!~s=w*?_)&&!!s.chars.uniq[12]&&/__|^_|_$|(_.*)\1/!~s.gsub(/(.)_\1/,'\1').chars.map{|x|l.grep(/#{x}/)}*?_}

Try it online!

Nice, when I first saw the challenge I tried to do something similar, but gave up with a score somewhere in 140-ies. BTW, save a byte by dropping parentheses after grep.

This doesn't work when the last word is 1 or 2 letters long, e.g. puts f[l,['PILGRIMAGE','ENCLOSE','EG']] returns true instead of false.

You are right, fixed.

Java (JDK), 188 bytes
g->w->{var v=0<1;int x=0,l,i=0,j,p,z,y=w[0][0];for(;i<w.length;i++)for(l=w[i].length,v&=y==w[i][0]&l>2,j=0,p=-9;j<l;v&=z>=0&z/3!=p/3,x|=2<<(p=z))z=g.indexOf(y=w[i][j++]);return v&x==8190;}

Try it online!
Explanations
g->w->{     // Lambda accepting letter groups as a string and a list of words, in the form of an array of char arrays.
 var v=0<1;     // Validity variable
 int x=0,       // The letter coverage (rule 4)
     l,         // The length of w[i]
     i=0,       // The w iterator
     j,         // The w[i] iterator
     p,         // The previous group
     z,         // The current group
     y=w[0][0]; // The previous character
 for(;i<w.length;i++) // For each word...
  for(
     l=w[i].length,     // make a shortcut for the length
     v&=y==w[i][0]&l>2, // check if the last character of the previous word is the same as the first of the current.
                        // Also, check if the length is at least 3
     j=0,               // Reset the iteration
     p=-9               // Set p to an impossible value.
    ;
     j<l                //
    ;
     v&=z>=0&z/3!=p/3,  // Check that each letter of the word is in the letter pool,
                        //  and that the current letter group isn't the same as the previous one.
     x|=2<<(p=z)      // After the checks, assign z to p,
                        //  and mark the letter of the pool as used.
   )
   z=g.indexOf(y=w[i][j++]); // Assign the current letter to y so that it contains the last at the end of the loop.
                             //  and fetch the position of the letter in the pool.
 return v&x==8190; // Return true if all matched
                   //  and if the rule 4 is enforced.
}

Credits

-2 bytes thanks to ceilingcat

Suggest v&=y==w[i][j=0]&l>2 instead of v&=y==w[i][0]&l>2,j=0

Charcoal, 63 bytes
⌊⁺⁺⁺⭆η›Ｌι²⭆⪫ηω№⪫θωι⭆⪫θω№⪫ηωι⭆η⭆ι⎇μ¬⁼Φθ№νλΦθ№ν§ι⊖μ∨¬κ⁼§ι⁰§§η⊖κ±¹

Try it online! Link is to verbose version of code. Explanation:
⌊⁺⁺⁺

Concatenate the below expressions and output 0 if any of them includes a 0 otherwise 1.
⭆η›Ｌι²

For each word in the solution output whether its length is at least 3.
⭆⪫ηω№⪫θωι

For each letter in the solution output whether it appears in the puzzle.
⭆⪫θω№⪫ηωι

For each letter in the puzzle output whether it appears in the solution.
⭆η⭆ι⎇μ¬⁼Φθ№νλΦθ№ν§ι⊖μ∨¬κ⁼§ι⁰§§η⊖κ±¹

For each letter in the solution check that the previous letter is not in the same group, unless it is the first letter of a word, in which case check that it is equal to the last letter of the previous word, unless it is the first letter of the solution, in which case just ignore it.

Python 2, 168 156 bytes
lambda l,w,J=''.join:(set(J(w))==set(J(l)))*all((v<1or u[-1]==v[0])*u[2:]*(2>(x in p)+(y in p))for u,v in zip(w,w[1:]+[0])for x,y in zip(u,u[1:])for p in l)

Try it online!
Returns 1 for truthy, 0 for falsey.


text:
List *all* the tuples!
Write a program, given an input n, will generate all possible n-tuples using natural numbers.
n=1
(1),(2),(3),(4),(5),(6)...

n=2
(1,1),(1,2),(2,1),(2,2),(1,3),(3,1),(2,3),(3,2),(3,3)...

n=6
(1,1,1,1,1,1) (1,1,1,1,2,1) (1,1,1,2,1,1)...

The output may be in any order that does not break any other rules.
The program must be written to run forever and list all applicable tuples exactly once, in theory.

In reality, your program will reach your integer type's limit and crash. This is acceptable as long the program would run infinitely long if only your integer type was unlimited.
Each valid tuple must be listed within finite time, if only the program were allowed to run that long.

The output may, at your option, include zeroes in addition to the natural numbers.
You may choose your program's output format for your convenience, as long as the separation between tuples and numbers inside each tuple is clear and consistent. (For example, one tuple per line.)
The input (n) is an integer from one to six. Required behavior is undefined for inputs outside of this range.
Code-golf rules apply, shortest program wins.

Thanks to "Artemis Fowl" for feedback during the sandbox phase.

I assume it is valid if when the program crashes it produces some extraneous output in addition to the tuples printed so far, right?

Must we output as we go or would a function which yields an infinite list at the end of time sufficient?

"You may choose your program's output format for your convenience, as long as the separation between tuples and numbers inside each tuple is clear and consistent" - may we output differing (albeit consistently differing) separation (e.g. like this)?

@JonathanAllan I would have to include the output of that object's infinite contents as part of the program.

Outputting a JSON array is fine. Basically don't get hung up about the output format, just be reasonable.

Related (integers instead of natural numbers)

Does "The program must be written to run forever" imply an assumption that $n > 0$?

C#, why do you not have pretty-printing for arrays...oh, wait, we can output an infinite array at the end of time?  Okay.

@Stackstuck No, it must print each tuple within finite time.

@Ørjan Johansen "I would have to include the output of that object's infinite contents as part of the program" sounds like we can defer the print step.  Just not the bit where we generate the tuples.

Husk, 2 bytes
πN

Try it online!
Explanation
N is the infinite list of natural numbers [1,2,3,4,...
π is Cartesian power.
Result is an infinite list of lists.
Each list of the desired length occurs exactly once because π is cool like that.
Input and output are implicit.

Wow, and this doesn't do [1,1,n] either. Is there a pattern to the order it outputs?

@billpg It builds the tuples recursively: n- tuples are obtained by taking the Cartesian product of the original list and the list of n-1-tuples, in ascending order of sum of indices.

"ascending order of sum of indices" -- Can you clarify this?  I'm having trouble seeing why, eg, 2,2,2 comes after 4,1,2 and 5,1,1.

@Jonah The recursion works like this. You start with 1-tuples over N. For 2-tuples you take Cartesian product with N ordered by sum of indices. In both lists, each number n is at index n so for length 2 the result happens to be ordered by sum. To get 3-tuples you take Cartesian product of N and the list of 2-tuples, ordered by sum of the elements' indices in these lists. It doesn't look at the tuple's sum, it looks at its position in the list of tuples.

"Figure out the different dimensions of infinity in this task and find a pattern that reduces it to countable infinity, then write a program that iterates over this pattern." - "Hey, I have a builtin for that!"

Haskell, 62 bytes
([1..]>>=).(!)
0!s=[[]|s<1]
n!s=[a:p|a<-[1..s],p<-(n-1)!(s-a)]

Try it online!
n!s generates all the n-tuples that sum to s.
Then the answer is ([1..]>>=).(!), i.e. \n -> [t | s<-[1..], t<-n!s].
This is a function mapping an integer n to an infinite lazy list of tuples (lists of integers).

Haskell, 50 bytes
f n=[l|k<-[0..],l<-mapM([0..k]<$f)[0..n],sum l==k]

Try it online!
Lists n-tuples sorted by sum. mapM does the heavy lifting to generate all n-tuples of numbers from 0 to k. The <$f trick is explained here.
Haskell, 51 bytes
f 1=pure<$>[0..]
f n=[a-k:k:t|a:t<-f$n-1,k<-[0..a]]

Try it online!
Recursively stretches all n-1-tuples into all n-tuples by splitting the first number a of each n-1-tuple into two numbers a-k,k that sum to it, in every possible way.

Pyth - 9 bytes
Thanks to @FryAmTheEggman for the golf
Loops through all x, and takes [1..x]^n. This makes duplicates, so only keeps ones that are new to that x, aka contain x in them. The formatting is a little weird, but it can be made standard with one more byte, .V1j}#b^Sb
.V1}#b^Sb

Try it online.

f}bT -> }#b Also, your byte count seems to be incorrect at the moment?

@FryAmTheEggman wait, why is it incorrect? If you're talking about the TIO link, that includes formatting with j(b). Also, thanks for the golf.

Ah, that's what confused me, sorry!

Brachylog (v2), 9 bytes
~l.ℕᵐ+≜∧≜

Try it online!
This is an infinite generator that generates all possible tuples. The TIO link has a header that uses the generator to generate 1000 elements and prints them (but the generator could continue indefinitely if I asked for that instead; Brachylog's integers are unbounded).
It feels like there should be a terser way, but there are a lot of constraints and this is the tersest I can fit them into a single program.
Explanation
~l.ℕᵐ+≜∧≜
  .        Generate
        ≜  all explicit
~l         lists whose length is {the input}
    ᵐ      for which every element
   ℕ       is non-negative
     +     and whose sum
      ≜    is used to order the lists (closest to zero first)
       ∧   [remove unwanted implicit constraint]

Incidentally, it strikes me as interesting just how different my explanations of the two ≜ are, despite them doing the exact same thing from Brachylog's point of view. The first ≜ is the first nondeterministic predicate in the program, so it sets the order of results; in this case, it calculates all possible explicit values for the sum of the list in the order 0, 1, 2, 3…, and is being used to ensure that the lists are output in order of their sum (this ensures that each possible list appears after a finite amount of output). The second ≜ is used to calculate all the explicit possibilities for the list (rather than outputting a formula specifying how the elements of the list relate to each other).

↰₁ẉ⊥ is also a good header, for printing infinitely.

Although I do feel like this may not actually be a full answer, since any single independent invocation of this predicate will just generate zeroes, with the "generate all" part being done by the ᶠ or the ⊥ in the header.

@UnrelatedString Your code doesn't use the predicate as a generator, though. We have explicit rules allowing list output using a generator. What you're doing in your TIO link is calling the predicate in a loop to get 1000 different generators, then taking the first output from each of them; that's a really unnatural operation to do on generators, and it won't let you see the other elements that they can generate.

Ah, so I've just been misinterpreting the semantics of what a Brachylog predicate is this whole time--my idea of "generator" is stuck on Python. Now that that's straight in my head I guess I'll go shave three bytes off of some of my old answers.

C# (Visual C# Interactive Compiler), 148 bytes
n=>{var a=new int[n];int j=0;void g(int k){if(k<n)for(int i=0;i++<j;g(k+1))a[k]=i;else if(a.Sum()==j)WriteLine(string.Join(' ',a));}for(;;j++)g(0);}

Try it online!
-3 bytes thanks to @ASCIIOnly!
// n: size of tuples to generate
n=>{
  // a: current tuple workspace
  var a=new int[n];
  // j: target sum value
  int j=0;
  // recursive function that works on slot k
  void g(int k){

    // tuple is not fully generated,
    if(k<n)

      // try all values from (0,j]
      for(int i=0;i++<j;
        // recursive call - generates all
        // values from (0,j] in the next slot
        g(k+1)
      )
        // update the kth slot
        a[k]=i;

    // tuple is fully generated, however
    // we should only display if the sum
    // is equal to the target sum. tuples
    // are generated many times, this
    // let's us enforce that they are only
    // displayed once.
    else if(a.Sum()==j)
      WriteLine(string.Join(' ',a));
  }
  // increment the high value forever
  // while continually starting the
  // recursive function at slot 0
  for(;;j++)
    g(0);
}

how even did you do this

straight-up porting this to .NET Core would probably still save me a lot of bytes.

The biggest trick here is recursion. Most of the techniques I've seen to generate "permutations" use it. I plan on adding an explanation.

Write with e.g. '<literal tab>' or | is the same length, and takes up a lot fewer lines :P

aw, 151

@ASCIIOnly - Nice :) I was hoping to use Print but for whatever reason, you can't in a nested function.

@ASCIIOnly - this might be ok as well? Ordering is different. Try it online!

Wolfram Language (Mathematica), 62 52 bytes
Do[Print/@(1+1~Table~#~FrobeniusSolve~--n),{n,∞}]&

Try it online!

-2 bytes with inconsistent separation: Try it online!

C# (.NET Core), 608 570 567 bytes
using C=System.Console;using L=System.Collections.Generic.List<int[]>;class A{static void Main(){L x=new L(),y=new L(),z=new L();int i=int.Parse(C.ReadLine()),j=0,k,l,m;x.Add(new int[i]);while(i>0){j++;for(m=0;m++<i;){foreach(var a in y)x.Add(a);y=new L();foreach(var a in x){for(k=0;k<i;){int[] t=new int[i];System.Array.Copy(a,t,i);t[k++]=j;var b=true;z.AddRange(x);z.AddRange(y);foreach(var c in z){for(l=0;l<i;l++)if(c[l]!=t[l])break;if(l==i)b=false;}if(b)y.Add(t);}}}}for(k=0;k<x.Count;k++){C.Write("[ ");for(l=0;l<i;l++)C.Write(x[k][l]+" ");C.WriteLine("]");}}}

Try it online!
my god what have I done
(so many loops, that's what I've done)
It should work, though!
If you move the print loop back one bracket, it will show you the list as it's built, every time it loops.  (I recommend adding a newline or something to distinguish each loop if you do.)
Honestly, a lot of my time was spent fighting with the language...no pretty-printing arrays, assorted behaviors of ==...
Hopefully this version is easier to read.
using C=System.Console;
using L=System.Collections.Generic.List<int[]>;
class A{
    static void Main(){
        L x=new L(),y=new L(),z=new L();
        int i=int.Parse(C.ReadLine()),j=0,k,l,m;
        x.Add(new int[i]);
        while(i>0){
            j++;
            for(m=0;m++<i;){
                foreach(var a in y) x.Add(a);
                y=new L();
                foreach(var a in x){
                    for(k=0;k<i;){
                        int[] t=new int[i];
                        System.Array.Copy(a,t,i);
                        t[k++]=j;
                        var b=true;
                        z.AddRange(x);
                        z.AddRange(y);
                        foreach(var c in z){
                            for(l=0;l<i;l++) if(c[l]!=t[l])break;
                            if(l==i)b=false;
                        }
                        if(b)y.Add(t);
                    }
                }
            }
        }
        for(k=0;k<x.Count;k++){
            C.Write("[ ");
            for(l=0;l<i;l++)C.Write(x[k][l]+" ");
            C.WriteLine("]");
        }
    }
}

I just realized I can stick the print loop in the if statement so it prints as it goes.  facepalm one moment.

wait nope can't do that

...oh dear, I'm not sure this code works anymore.

aaaaand it doesn't.

now it does.  yay.

lost a lot of bytes to that, though.

Saved 38 bytes with a horrible space-eating monstrosity of a list.

Saved 3 bytes.  I just remembered != exists.

Good luck with this :) I started coding a solution in C# and realized it was quite a bit trickier than I was hoping. Why not use the "Visual C# Interactive" interpreter? That would save a bunch by simply not having to include the class definition. Anyways, +1 from me :)

@dana I'm a purist ;P  Thanks for the upvote!  Should be working, at least, though I feel like I could do something with these loops.

Perl 6, 50 bytes
{grep $_,{S/.//.split(0)>>.chars}($++.base(2))xx*}

Try it online!
Anonymous code block that returns a lazy infinite list. This uses the same strategy as Chas Brown's answer.
Explanation:
{grep $_,{S/.//.split(0)>>.chars}($++.base(2))xx*}
{                                                } # Anonymous code block
                                              xx*  # Repeat indefinitely
                                 ($++        )     # From the current index
                                     .base(2)      # Get the binary form
         {S/.//                 }   # Remove the first digit
               .split(0)            # And split by zeroes
                        >>.chars    # And get the length of each section
 grep   ,   # From this infinite list, filter:
      $_      # The groups with length the same as the input

05AB1E, 15 11 bytes
[¼¾LIãvy¾å—

-4 bytes by creating a port of @Maltysen's Pyth answer.
Try it online.
Explanation:
[             # Start an infinite loop:
 ¼            #  Increase the counter_variable by 1 (0 by default)
  ¾L          #  Create a list in the range [1, counter_variable]
    Iã        #  Take the cartesian power of this list with the input
      v       #  Loop over each list `y` in this list of lists:
       y¾å    #   If list `y` contains the counter_variable:
          —   #    Print list `y` with trailing newline

When will the program get to [1,2,1]? Remember it has to be within finite time.

@billpg Should be fixed now.

MATL, 16 bytes
`@:GZ^t!Xs@=Y)DT

Tuples are ordered by increasing sum, and within a given sum they are ordered lexicographically.
Try it online!

Jelly, 10 (9?) bytes
9 if we may output using non-consistent separation (which I have enquired about) -- removal of the €.
‘ɼṗ³ċƇ®Ṅ€ß

Try it online!
How?
‘ɼṗ³ċƇ®Ṅ€ß - Main Link: some argument, x (initially equal to n, but unused)
 ɼ         - recall v from the register (initially 0), then set register to, and yield, f(v)
‘          -   f = increment
           - (i.e. v=v+1)
   ³       - program's third command line argument (1st program argument) = n
  ṗ        - (implicit range of [1..v]) Cartesian power (n)
           - (i.e. all tuples of length n with items in [1..v])
     Ƈ     - filter keep those for which:
    ċ      -   count
      ®    -   recall from register
           - (i.e. keep only those containing v)
       Ṅ€  - print €ach
         ß - call this Link with the same arity
           - (i.e. call Main(theFilteredList), again the argument is not actually used)

Based on "as long as the separation between tuples and numbers inside each tuple is clear and consistent. (For example, one tuple per line.)" I assumed it wasn't allowed and the € is required, but let's wait what OP has to say.

Python 2, 126 112 106 101 100 83 bytes
n=input()
i=1
while 1:
 b=map(len,bin(i)[3:].split('0'));i+=1
 if len(b)==n:print b

Try it online!
5 bytes thx to mypetlion; 1 byte from the eagle eye of ArBo; 17 bytes from xnor!
Construct the ordered partitions of m into n bins, for m = 0,1,2,3,... by selecting for binary numbers with n-1 0s and m 1s.

if i==p:i=0;p*=2 can become i%=p;p<<=i<1 to save 5 bytes.

I'm pretty sure the space after print b is not needed :D

It looks like the i+p is just counting up 1, 2, 3... in a convoluted way and so can just be a single variable.

@xnor: D'oh! Got so wrapped up in the concept, couldn't see the forest for the trees.

JavaScript (V8), 98 bytes
n=>{for(a=[],b=[j=1];;b.push(++j))(g=k=>k<n?b.map(i=>(a[k]=i)|g(k+1)):a.includes(j)&&print(a))(0)}

Try it online!
Hooray! Finally got it under 100 :) Basically a port of my C# answer.
// n: length of tuples to generate
n=>{
  // a: workspace for current tuple
  // b: range of numbers that grows
  //     - iteration 1: [1]
  //     - iteration 2: [1,2]
  //     - iteration 3: [1,2,3]
  // j: largest number in b
  for(a=[],b=[j=1];;b.push(++j))
    // g: recursive function to build tuples
    // k: index of slot for current recursive call
    (g=k=>
       // current slot less than the tuple size?
       k<n?
         // tuple generation not complete
         // try all values in current slot and
         // recurse to the next slot
         b.map(i=>(a[k]=i)|g(k+1)):
         // tuple generation complete
         // print tuple if it contains the
         // current high value
         a.includes(j)&&print(a)
    // start recursive function at slot 0
    )(0)
}

Stax, 6 bytes
£ƒ$↔┬ï

Run and debug it
For input n the procedure is roughly
for i in [0..infinity]:
    get all the distinct n length arrays of positive integers that sum to i
    for each
        join with spaces
        implicitly output

VDM-SL, 51 bytes
g(i)==if i=0then{}else{[x]^y|x:nat,y in set g(i-1)}

Recursive set comprehension with sequence concatenation..
Not on TIO, you could run in a program (if you turn on limits for nat type or it wont terminate):
functions
g:nat->set of ?
g(i)==if i=0then{}else{[x]^y|x:nat,y in set g(i-1)}

Includes the optional 0s in answer otherwise it would be 52 bytes binding on nat1

Wolfram Language (Mathematica), 131 bytes
While[0<1,If[a~FreeQ~#,Print@#]&/@(b=Table[Select[Range@t~Tuples~{s},Tr@#==k&],{k,t,t(s=#)}]~Flatten~1);a={a}~Join~b;t++]&
t=1
a={}

Try it online!

perl -M5.010 122 bytes
$n=shift;
$s.="for\$x$_(1..\$m){"for 1..$n;
$t.="\$x$_ "for 1..$n;
$u.='}'x$n;
eval"{\$m++;$s\$_=qq' $t';/ \$m /&&say$u;redo}"

Added some newlines for readabilities sake (not counted in the byte count)

Python 2, 120 bytes
from random import*
m=n=input()
a=()
while 1:
 m+=len(a)==m**n;t=[randint(1,m)for _ in[1]*n]
 if(t in a)<1:a+=t,;print t

Try it online!
A bit longer than most other answers, but I liked the idea behind it.

JavaScript (Node.js), 96 90 bytes
n=>{for(i=0n;z=[];z.length-n||console.log(z))for(j=++i,w=0;j;j/=2n)w=j%2n?+!z.push(w):w+1}

Try it online!
V8 on TIO don't support BigInt


text:
Output the ŋarâþ crîþ alphabet song without using (m)any letters
Your goal is to write a program that takes no input and outputs the following text:
ca e na ŋa va o sa;
þa ša ra la ła.
ma a pa fa ga ta ča;
în ja i da ða.
ar ħo ên ôn ân uħo;
carþ taŋ neŋ es nem.
elo cenvos.

But there's a catch: for each letter (any character whose general category in Unicode starts with L) in your source, you get a penalty of 20 characters! (For reference, the text to be printed has 81 letters.)
The Perl 6 code below has 145 bytes and 84 letters, so it gets a score of 1,845:
say "ca e na ŋa va o sa;
þa ša ra la ła.
ma a pa fa ga ta ča;
în ja i da ða.
ar ħo ên ôn ân uħo;
carþ taŋ neŋ es nem.
elo cenvos."

The code below has 152 bytes and 70 letters, so it gets a score of 1,552:
$_="C e N ŋa V o S;
Þ Š R L Ł.
M a P F G T Č;
în J i D Ð.
ar ħo ên ôn ân uħo;
Crþ Tŋ neŋ es nem.
elo cenvos.";s:g/<:Lu>/{$/.lc~'a'}/;.say

Standard loopholes are forbidden.
Originally, I thought of forbidding letters altogether, but I don't think there are many languages that make this possible. You're more than welcome to try.
(ŋarâþ crîþ [ˈŋaɹa̰θ kɹḭθ] is one of my conlangs. I wanted to capitalise its name here, but I get the ugly big eng here. Oh well, the language doesn't use capital letters in its romanisation anyway.)
Edit: realised that one of the lines is wrong, but I'll keep it since there are already answers. The correct version of the third line is ma a fa ga pa ta ča; at your choice, you may choose to produce the corrected text instead.

[tag:kolmogorov-complexity], [tag:restricted-source], and special scoring are all sorts of things that benefit greatly from careful consideration in the sandbox. Currently, it seems like the best approach to this challenge would be to just write out all of the codepoints in decimal then turn them into text with a builtin, with some shortcut to encode all of the as--or not, depending on how many letters it would take, because 20 characters is a really big penalty (although when everything else is scored by bytes, it's not quite well defined...)!

And considering the invocation of Unicode, some explicit rules governing special codepages as used by most golflangs are probably called for (alongside maybe a link to a script to validate scoring).

7, 410 characters, 154 bytes in 7's encoding, 0 letters = score 154
55104010504200144434451510201304004220120504005434473340353241135014335450302052254241052253052244241052335452241114014241310052340435303052335442302052335500302052335430302052313340435303135014243241310335514052312241341351052302245341351525755102440304030434030421030442030424030455733413512410523142410523030523112411350143355142410523414252410523102410523002410523413342411145257551220304010420030455741403

Try it online!
In a challenge that dislikes using letters, what better language to use than one consisting only of digits?
This is a full program that exits via crashing, so there's extraneous output to stderr, but stdout is correct.
Explanation
A 7 program, on its first iteration, simply pushes a number of elements to the stack (because out of the 12 commands that exist in 7, only 8 of them can be represented in a source program, and those 8 are specialised for writing code to push particular data structures to the stack). This program does not use the 6 command (which is the simplest way to create nested structures, but otherwise tends not to appear literally in a source program), so it's only the 7 commands that determine the structure; 7 pushes a new empty element to the top of stack (whereas the 0…5 commands just append to the top of stack). We can thus add whitespace to the program to show its structure:
551040105042001444344515102013040042201205040054344 7

33403532411350143354503020522542410522530522442410523354522411140142413100523
40435303052335442302052335500302052335430302052313340435303135014243241310335
514052312241341351052302245341351525 7

55102440304030434030421030442030424030455 7

33413512410523142410523030523112411350143355142410523414252410523102410523002
41052341334241114525 7

551220304010420030455 7

41403
The elements near the end of the program are pushed last, so are on top of the stack at the start of the second iteration. On this iteration, and all future iterations, the 7 interpreter automatically makes a copy of the top of the stack and interprets it as a program. The literal 41403 pushes the (non-literal, live code) 47463 (7 has 12 commands but only 8 of them have names; as such, I use bold to show the code, and non-bold to show the literal that generates that code, meaning that, e.g. 4 is the command that appends 4 to the top stack element). So the program that runs on the second iteration is 47463. Here's what that does:
47463
4       Swap top two stack elements, add an empty element in between
 7      Add an empty stack element to the top of stack
  4     Swap top two stack elements, add an empty element in between
   6    Work out which commands would generate the top stack element;
        append that to the element below (and pop the old top of stack)
    3   Output the top stack element, pop the element below

This is easier to understand if we look at what happens to the stack:

… d c b a 47463 (code to run: 47463)
… d c b 47463 empty a (code to run: 7463)
… d c b 47463 empty a empty (code to run: 463)
… d c b 47463 empty empty empty a (code to run: 63)
… d c b 47463 empty empty "a" (code to run: 3)
… d c b 47463 empty (code to run: empty)

In other words, we take the top of stack a, work out what code is most likely to have produced it, and output that code. The 7 interpreter automatically pops empty elements from the top of stack at the end of an iteration, so we end up with the 47463 back on top of the stack, just as in the original program. It should be easy to see what happens next: we end up churning through every stack element one after another, outputting them all, until the stack underflows and the program crashes. So we've basically created a simple output loop that looks at the program's source code to determine what to output (we're not outputting the data structures that were pushes to the stack by our 0…5 commands, we're instead recreating what commands were used by looking at what structures were created, and outputting those). Thus, the first piece of data output is 551220304010420030455 (the source code that generates the second-from-top stack element), the second is 3341351…114525 (the source code that generates the third-from-top stack element), and so on.
Obviously, though, these pieces of source code aren't being output unencoded. 7 contains several different domain-specific languages for encoding output; once a domain-specific language is chosen, it remains in use until explicitly cleared, but if none of the languages have been chosen yet, the first digit of the code being output determines which of the languages to use. In this program, only two languages are used: 551 and 3.
551 is pretty simple: it's basically the old Baudot/teletype code used to transmit letters over teletypes, as a 5-bit character set, but modified to make all the letters lowercase. So the first chunk of code to be output decodes like this:
551  22 03 04 01 04 20 03 04  55
     c  a  SP e  SP n  a  SP  reset output format

As can be seen, we're fitting each character into two octal digits, which is a pretty decent compression ratio. Pairs of digits in the 0-5 range give us 36 possibilities, as opposed to the 32 possibilities that Baudot needs, so the remaining four are used for special commands; in this case, the 55 at the end clears the remembered output format, letting us use a different format for the next piece of output we produce.
3 is conceptually even simpler, but with a twist. The basic idea is to take groups of three digits (again, in the 0-5 range, as those are the digits for which we can guarantee that we can recreate the original source code from its output), interpret them as a three-digit number in base 6, and just output it as a byte in binary (thus letting us output the multibyte characters in the desired output simply by outputting multiple bytes). The twist, though, comes from the fact that there are only 216 three-digit numbers (with possible leading zeroes) in base 6, but 256 possible bytes. 7 gets round this by linking numbers from 332₆ = 128₁₀ upwards to two different bytes; 332 can output either byte 128 or 192, 333 either byte 129 or 193, and so on, up to 515 which outputs either byte 191 or 255.
How does the program know which of the two possibilities to output? It's possible to use triplets of digits from 520 upwards to control this explicitly, but in this program we don't have to: 7's default is to pick all the ambiguous bytes in such a way that the output is valid UTF-8! It turns out that there's always at most one way to do this, so as long as it's UTF-8 we want (and we do in this case), we can just leave it ambiguous and the program works anyway.
The end of each of the 3… sections is 525, which resets the output format, letting us go back to 551 for the next section.

This is either 410 bytes + 0 letters in the unpacked representation, or 154 bytes + lots of letters in the packed representation. Counting the bytes in one and the letters in the other one seems cheaty.

@Grimy: You're confusing bytes with characters. The packed representation consists of 154 bytes in 7's encoding that encode 410 octal digits, each of which is a digit not a letter. Your reasoning implies that, say, ɓ in Jelly is not a letter (because its encoding in Jelly's encoding corresponds to the control code "CSI" if interpreted in a typical 8-bit character set, rather than a letter). Just like Jelly, 7 also uses a custom encoding; but because 7 uses no letters, the encoding has no need to encode letters and thus can't.

Haskell, 0 letters, 423 bytes = score 423
(['\10'..]!!)<$>[89,87,22,91,22,100,87,22,321,87,22,108,87,22,101,22,105,87,49,0,244,87,22,343,87,22,104,87,22,98,87,22,312,87,36,0,99,87,22,87,22,102,87,22,92,87,22,93,87,22,106,87,22,259,87,49,0,228,100,22,96,87,22,95,22,90,87,22,230,87,36,0,87,104,22,285,101,22,224,100,22,234,100,22,216,100,22,107,285,101,49,0,89,87,104,244,22,106,87,321,22,100,91,321,22,91,105,22,100,91,99,36,0,91,98,101,22,89,91,100,108,101,105,36]

Try it online!

Jelly,  274 260  212 bytes + 2 letters =  314 300  252
-48 bytes thanks to Nick Kennedy
“19×‘+49;7883,8220,8216,7884Ọ“19937801,1169680277365253“38“68112“;107¤+1+\“@“&%"("/%"@%"6%"0"3%$!<%" %"2%"-%"?%#!.%"%"1%")%"*%"4%"=%$!9/",%"+"'%":%#!%2">0"8/";/"7/"5>0$!&%2<"4%@"/(@"(3"/(.#!(-0"&(/603#“_32¤”;";/V

(Uses !"#$%&'()*+,-./0123456789:;<=>?@V\_¤×Ọ‘“” of which V and Ọ are Unicode letters and are used once each)
Try it online!

212 bytes plus two letters

Verification

@NickKennedy I'd played around with golfing the number, but didn't step back and look to just offset the ordinals, good stuff - thanks!

PowerShell, scores 601 546
-join(67,65,0,69,0,78,65,0,299,65,0,86,65,0,79,0,83,65,27,-22,222,65,0,321,65,0,82,65,0,76,65,0,290,65,14,-22,77,65,0,65,0,80,65,0,70,65,0,71,65,0,84,65,0,237,65,27,-22,206,78,0,74,65,0,73,0,68,65,0,208,65,14,-22,65,82,0,263,79,0,202,78,0,212,78,0,194,78,0,85,263,79,27,-22,67,65,82,222,0,84,65,299,0,78,69,299,0,69,83,0,78,69,77,14,-22,69,76,79,0,67,69,78,86,79,83,14|%{[char]($_+32)})

Try it online!
Naive approach; I just took the code points and converted them to decimal, subtracted 32, then this code treats them as a char before -joining it back together into a single string.

901, ouch

686 :/

Jelly, 321 bytes + 2 letters = score 361
3343781777797791350694255572961968519437585132057650209974147122192542459108221624793330048943528237823681411832154316740173721249435700067706302064570847610741421342406380917446310820012503592770000532190167243585300911078873144513786923305473352724133578818457026824110152529235136461572588027747840738399150398304b354Ọ

Try it online!
This is hideous and someone can definitely do better.
Verify score.

actually less bad than it seems

05AB1E, score 209 207 (187 bytes + 20 penalty for 1 letter)
•£?;\:'%¢;.'¡£/':¢?'¢°':¢°#@¢«>#%¡¤;®[¢:¥¢:©¢:¦¢;®¢>#¡£#¨¢#&¢+¢#,¢:§¡¤#¬¢#@¢#)¢#(¢#<¢#¢#/¡£#¯¢#.¢#>¢#±¢#«¡¤#?¢;¢#\¢#°¢#:¢'¢#%•[₅‰`©®_#∞158+9022014013016708040204090101502501027¾¡17∍.¥>:ç?

Try it online!
The only letter is ç. The currency symbols €£¢ are not considered letters in Unicode.

Python 3, 380 bytes + 5 letters = 480
print("""\143\141 \145 \156\141 \513\141 \166\141 \157 \163\141;
\376\141 \541\141 \162\141 \154\141 \502\141.
\155\141 \141 \160\141 \146\141 \147\141 \164\141 \415\141;
\356\156 \152\141 \151 \144\141 \360\141.
\141\162 \447\157 \352\156 \364\156 \342\156 \165\447\157;
\143\141\162\376 \164\141\513 \156\145\513 \145\163 \156\145\155.
\145\154\157 \143\145\156\166\157\163.""")

Try it online!

Retina, 140 characters, 159 bytes, 14 letters = score 439

%# ' 1# !# 9# 2 6#;¶þ# š# 5# /# ł#.¶0# # 3# (# )# 7# č#;¶î1 ,# + &# ð#.¶#5 ħ2 ê1 ô1 â1 8ħ2;¶%#5þ 7#! 1'! '6 1'0.¶'/2 %'1926.
T`!--/-9`ŋ\`-{

Try it online! Edit: Saved 1 letter by switching from K` to a newline. Now also works in Retina 0.8.2 (but the title would be too long).

Japt -S, 304 286 bytes + 2 1 letters = 344 306
Well, this is just god-awful!
"3 1
5
14 1
235 1
22 1
15
19 1 -37 -86 158 1
257 1
18 1
12 1
226 1 -50 -86 13 1
1
16 1
6 1
7 1
20 1
173 1 -37 -86 142 14
10 1
9
4 1
144 1 -50 -86 1 18
199 15
138 14
148 14
130 14
21 199 15 -37 -86 3 1 18 158
20 1 235
14 5 235
5 19
14 5 13 -50 -86 5 12 15
3 5 14 22 15 19 -50"·®¸®°d96} ¬

Try it

PHP -a, 402 bytes + 200 penalty = 602 score
foreach([67,65,0,69,0,78,65,0,299,65,0,86,65,0,79,0,83,65,27,-22,222,65,0,321,65,0,82,65,0,76,65,0,290,65,14,-22,77,65,0,65,0,80,65,0,70,65,0,71,65,0,84,65,0,237,65,27,-22,206,78,0,74,65,0,73,0,68,65,0,208,65,14,-22,65,82,0,263,79,0,202,78,0,212,78,0,194,8,0,85,263,79,27,-22,67,65,82,222,0,84,65,299,0,78,69,299,0,69,83,0,78,69,77,14,-22,69,76,79,0,67,69,78,86,79,83,14] as $i){echo ''.mb_chr($i+32);}

Port of Artermis Fowl's answer, and my first codegolf entry!
Leaves me wishing that chr() could just support UTF-8; those extra 3 bytes + 40 characters hurts!

Welcome to PPCG :)

Python 3, 397 bytes + 19 letters = 777 score
print(''.join(chr(i+32)for i in[67,65,0,69,0,78,65,0,299,65,0,86,65,0,79,0,83,65,27,-22,222,65,0,321,65,0,82,65,0,76,65,0,290,65,14,-22,77,65,0,65,0,80,65,0,70,65,0,71,65,0,84,65,0,237,65,27,-22,206,78,0,74,65,0,73,0,68,65,0,208,65,14,-22,65,82,0,263,79,0,202,78,0,212,78,0,194,78,0,85,263,79,27,-22,67,65,82,222,0,84,65,299,0,78,69,299,0,69,83,0,78,69,77,14,-22,69,76,79,0,67,69,78,86,79,83,14]))

Try it online!
Port of AdmBorkBork's answer.

1 less letter?

score 732

562, -2 if using python 2

TIO doesn't work at my organization, so I'll have to wait to get home to add those.

05AB1E, score 383 365  (325 bytes + 2 letters * 20 penalty)
3343781777797791350694255572961968519437585132057650209974147122192542459108221624793330048943528237823681411832154316740173721249435700067706302064570847610741421342406380917446310820012503592770000532190167243585300911078873144513786923305473352724133578818457026824110152529235136461572588027747840738399150398304 354вç.««

Port of @HyperNeutrino's Jelly answer.
Will try to improve here on. The number is divisible by a bunch of numbers, but none of them would save any bytes unfortunately, and the larger divisors compressed contain at least 1 letter..
-18 (+2 bytes and -20 penalty) thanks to @Grimy, replacing the letter J (join) with .«« (reduce by concatenating).
Try it online.

J can be .«« for -18. Or for a completely different approach, see my answer.

@Grimy Thanks! :) And nice answer!

R, 384 bytes + 12 letters * 20 points = 684 score
Not terribly original.
cat(intToUtf8(c(67,65,0,69,0,78,65,0,299,65,0,86,65,0,79,0,83,65,27,-22,222,65,0,321,65,0,82,65,0,76,65,0,290,65,14,-22,77,65,0,65,0,80,65,0,70,65,0,71,65,0,84,65,0,237,65,27,-22,206,78,0,74,65,0,73,0,68,65,0,208,65,14,-22,65,82,0,263,79,0,202,78,0,212,78,0,194,78,0,85,263,79,27,-22,67,65,82,222,0,84,65,299,0,78,69,299,0,69,83,0,78,69,77,14,-22,69,76,79,0,67,69,78,86,79,83,14)+32))

Try it online!