text:
Hexasweep (part 1): The Solver
(This is part 1 in a two-part challenge.)
Your task is to solve a Hexasweep puzzle.
A Hexasweep puzzle is set out on a grid of diamonds arranged in hexagonal shapes, of which the board looks like a hexagon, like so:
         _____
        /\    \
  _____/ X\____\_____
 /\    \  / XX /\    \
/X \____\/____/X \____\
\ X/ XX /\    \ X/    /
 \/____/  \____\/____/
 /\    \  / X  /\    \
/  \____\/____/  \____\
\  / XX /\    \  / XX /
 \/____/  \____\/____/
       \ X/    /
        \/____/

The above image is composed of 7 hexagons (21 diamonds), and is thus a Hexasweep puzzle of size 2.

If you want to expand it, cover the current Hexasweep puzzle with more hexagons (so that there are 19 hexagons - that will make a Hexasweep puzzle of size 3).
The same goes for the other direction - to make a Hexasweep puzzle of size 1, remove the outermost layer of hexagons (so that there's 1 hexagon).

Each diamond can contain 0, 1 or 2 "bombs", with bombs depicted as X above. With bombs filled out, this is the final solution.
Numbers are marked on "intersection points", to show how many bombs are on the diamonds which are touching those intersection points - the intersection points of this grid are shown below using O.
         _____
        /\    \
  _____/  OO___\_____
 /\    \  OO   /\    \
/  OO___OO___OO  OO___\
\  OO   OO   OO  OO   /
 \/___OO  OO___OO____/
 /\   OO  OO   OO    \
/  OO___OO___OO  OO___\
\  OO   OO   OO  OO   /
 \/____/  OO___\/____/
       \  OO   /
        \/____/

As you can see, there are two "types" of intersection points - those with 3 diamonds touching it, and those with 6 (the one that are touching the edge of the board aren't counted):
  _____
 /\  XX\
/X OO___\
\ XOO   /
 \/____/

       /\
 _____/X \_____
 \ XX \ X/    /
  \____OO____/
  / XX OO  X \
 /____/  \____\
      \ X/
       \/

The two intersections would be marked with 4 and 8 respectively.
In the original Hexasweep puzzle above, the intersection numbers would be:
   3
4 5 4 2
 2 1 3
2 4 1 2
   1

Which would be condensed to:
3,4,5,4,2,2,1,3,2,4,1,2,1

Given an input in this "condensed form", you must output the original puzzle, in "condensed form" (see above).
The solved image (the first one, with the crosses) - which would be formed from the puzzle - would be read from top to bottom, starting from the left:
2,0,0,2,0,2,1,0,1,0,2,0,1,0,0,2,0,0,0,0,2

That is now the "condensed form" of the puzzle.
If there is more than 1 answer (as in the condensed form above), the output must be N.
Examples:
0,0,4,3,1,3,4,7,1,4,3,6,1 -> 0,0,0,0,1,0,0,2,0,0,0,2,0,1,0,1,2,0,0,2,2 (size 2 Hexasweep)
6 -> 2,2,2 (size 1 Hexasweep)
0,1,5,3,1,4,4,7,2,5,3,6,1 -> N (multiple solutions)

Specs:

Any delimiter for the "condensed form" as input are allowed (it doesn't have to be , separating the numbers).
You may output a list, or a string with any delimiter.
Your program must be generalised: it must be able to solve Hexasweep puzzles of any size (at least from size 1 to size 4).

This is code-golf, so lowest amount of bytes wins!

shouldn't these be two separate challenges?

@DestructibleWatermelon I've decided to clump them together into one challenge, so that the score could be combined easily.

but why should they be combined?

I agree with @DestructibleWatermelon that this should be two challenges. The two parts are not really dependent on each other except when calculating the score. A notable example of this is [tag:cops-and-robbers] challenges

So when the input is 3,4,5,4,2,2,1,3,2,4,1,2,1, the output has to be 2,0,0,2,0,2,1,0,1,0,2,0,1,0,0,2,0,0,0,0,2? Also, some more test cases would be nice.

@JHM That's if the Hexasweep puzzle only has one solution. If there's more solutions, it should be N.

Should this be tagged [tag:decision-problem]? It doesn't seem to involve outputting a boolean...

Also the board is not a hexagon.

Could I or somebody else post a fastest code version of this, maybe with a fixed board size and easier I/O?

Javascript (V8), 1509 bytes
V=>{S=Math.sqrt(V[L="length"])/3+1|0;C=(Y=Array)(3**(W=12*(S-1)||2))[F="fill"]``.map(c=>Y(G=3*S*(S-1)+1)[F]``.map(h=>[N=-1,N,N]))
O=[];R=Y(4*S-3)[F]``.map(r=>[]);for(r=0,c=1,m=S,i=0;i<G;++r>=m&&(r=0,m+=++c>S?N:1))R[r*2+(X=Math.abs)(S-c)][P="push"](i++,N)
R=R.map(r=>(r.pop(t=Y(((T=2*S-1)-r[L]+1)/2)[F](N)),t.concat(r,t)));I=R.flat()[K="filter"](Q=r=>r+1);J=[[m=1,0]]
if(S>1){for(i=0;i<S-1;i++)J[P]([m+=3,0]);for(i=0;i<S-1;i++)J[P]([m-1,2],[m,0]);for(i=0;i<S-1;i++)J[P]([m-=3,0])}M=[]
J[K](j=>(t=j[1],Y(j[0])[F]``[K](_=>M[P](t++%3))))
z=0;g=p=>{for(j=0;j<R[L];j++)if(p<(t=R[j][K](Q))[L]){a=R[b=j].indexOf(t[p]);break}else p-=t[L]}
M=M.map((v,i)=>v?(v<2?(g(z-1),[[I[z-1],1],[I[z-1],2],[R[b-1][++a],0],[R[b-1][a],2],[R[b+1][a],0],[R[b+1][a],1]]):(g(z),[[I[z],0],[R[b-1][a-1],2],[R[b+1][a-1],1]])):(x=[0,1,2].map(d=>[I[z],d]),z++,x))
C.map((c,i)=>{r=-2;s=_=>[...i.toString(3).padStart(W,0).substr(r+=2,2).split``.map(n=>+n),N];for(j=0;j<S;c[j++]=s())
t=S-1;for(j=1;j<S;j++)c[++t]=s(),c[t+=j+S-1]=s();for(j=S-2;j>0;j--)c[++t]=s(),c[t+=j+S-1]=s();if(S>1)for(j=0;j<S;j++)c[++t]=s()})
C.map(c=>{q=1;l:while(c.find(h=>h[0]<0|h[1]<0|h[2]<0))for(j=0;j<M[L];j++){t=M[j];if(t[K](Z=v=>!(c[v[0]][v[1]]+1))[L]==1){if((s=V[j]-t.reduce(U=(a,v)=>a+(c[v[0]][v[1]]+1||1)-1,0))<0||s>2){q=0;break l};r=t.find(Z);c[r[0]][r[1]]=s}};
M.map((t,j)=>{if(t.reduce(U,0)!=V[j])q=0})
q&&O[P](c)});if(O[L]>1)return"N";O=O[p=0];E=[];for(i=0;i<T;i++){a=T-X(S-i-1);for(j=0;j<a;j++)E[P](O[p+j][0]);for(j=0;j<a;j++)E[P](O[p][1],O[p++][2])}return E}

Wow. This was not as fun as I expected it would be.
This is by far not an optimal solution. It's hard to golf something this big. I think you could save a hundred bytes or so by brute forcing the answer instead. However, my goal wasn't to be super competitive (yet!), but instead to provide a baseline for other answers to work off of.
Seeing as this challenge hasn't been answered in the four years since it was asked, it obviously took a few days. The strategy I ended up using was to generate a list of all possible values for the outer ring of hexagons, and repeatedly fill in any diamonds whose values can be inferred from the vertexes near them. If any contradictions are found, that starting value is ignored and the next one is analyzed.
This likely costs a few bytes compared to brute forcing, but it means it can finish running before the inevitable heat death of the universe. It takes less than a second for size one, about half a minute for size two, and based on the time complexity somewhere in the span of a few weeks to a few months for size three (haven't tested yet). My computer doesn't actually have enough memory for attempting higher than size two (gives me invalid array length), but with enough time and memory it's theoretically possible to use this approach for puzzles with millions of hexagons.
If anyone wants to use this to develop a shorter or faster solution, here's the pre-golfed version of my code (it's not very pretty, but it works):
var hexasweep = function(vertexes) {
    var size = Math.sqrt(vertexes.length) / 3 + 1 | 0;

    var configs = new Array(3 ** (2 * (6 * (size - 1) || 1))).fill(0).map(c => new Array(3 * size * (size - 1) + 1).fill(0).map(h => [-1, -1, -1]));

    var solutions = [];

    var reference_array = new Array(4 * size - 3).fill(0).map(r => []);

    for (let r = 0, c = 0, m = size, i = 0; i < 3 * size * (size - 1) + 1; i++) {
        reference_array[r * 2 + Math.abs(size - c - 1)].push(i, -1);

        if (++r >= m) {
            m += (++c >= size ? -1 : 1);
            r = 0;
        }
    }

    for (let t, r, i = 0; i < reference_array.length; i++) {
        r = reference_array[i];

        r.pop();

        t = new Array(((2 * size - 1) - r.length) / 2).fill(-1);

        reference_array[i] = t.concat(r, t);
    }

    var reference = reference_array.flat().filter(r => r + 1);

    var m = 1, length_map = [];

    length_map.push([m = 1, 0]);

    if (size > 1) {
        for (let i = 0; i < size - 1; i++) {
            length_map.push([m += 3, 0]);
        }

        for (let i = 0; i < size - 1; i++) {
            length_map.push([m - 1, 2], [m, 0]);
        }

        for (let i = 0; i < size - 1; i++) {
            length_map.push([m -= 3, 0]);
        }
    }

    var vertex_map = [];

    for (let t, i = 0; i < length_map.length; i++) {
        t = length_map[i][1];

        for (let j = 0; j < length_map[i][0]; j++) {
            vertex_map.push(t++ % 3);
        }
    }

    for (let v, z = 0, b, a, g, i = 0; i < vertex_map.length; i++) {
        v = vertex_map[i];

        g = p => {
            for (let t, j = 0; j < reference_array.length; j++) {
                if (p < (t = reference_array[j].filter(r => r + 1)).length) {
                    b = j;
                    a = reference_array[j].indexOf(t[p]);

                    break;
                } else {
                    p -= t.length;
                }
            }
        }

        if (v == 0) {
            vertex_map[i] = [0, 1, 2].map(d => [reference[z], d]);
            z++;
        } else if (v == 2) {
            g(z);

            vertex_map[i] = [[reference[z], 0], [reference_array[b - 1][a - 1], 2], [reference_array[b + 1][a - 1], 1]];
        } else {
            g(z - 1);

            vertex_map[i] = [
                [reference[z - 1], 1],
                [reference[z - 1], 2],
                [reference_array[b - 1][a + 1], 0],
                [reference_array[b - 1][a + 1], 2],
                [reference_array[b + 1][a + 1], 0],
                [reference_array[b + 1][a + 1], 1]
            ];
        }
    }

    for (let r, s, t, c, i = 0; i < configs.length; i++) {
        c = configs[i];

        r = -2;
        s = _ => (i.toString(3).padStart(2 * (6 * (size - 1) || 1), 0).substr(r += 2, 2)).split("").map(n => +n).concat(-1);

        for (let j = 0; j < size; j++) {
            c[j] = s();
        }

        t = size - 1;

        for (let j = 1; j < size; j++) {
            c[++t] = s();
            c[t += j + size - 1] = s();
        }

        for (let j = size - 2; j >= 1; j--) {
            c[++t] = s();
            c[t += j + size - 1] = s();
        }

        if (size > 1) {
            for (let j = 0; j < size; j++) {
                c[++t] = s();
            }
        }
    }

    // Validate each

    for (let c, i = 0; i < configs.length; i++) {
        c = configs[i];

        (_ => {
            while (c.find(h => h[0] == -1 || h[1] == -1 || h[2] == -1)) {
                for (let t, r, s, j = 0; j < vertexes.length; j++) {
                    t = vertex_map[j];

                    if (t.filter(v => !(c[v[0]][v[1]] + 1)).length == 1) {
                        if ((s = vertexes[j] - t.reduce((a, v) => a + (c[v[0]][v[1]] + 1 || 1) - 1, 0)) < 0 || s > 2) {
                            return;
                        }

                        r = t.find(v => !(c[v[0]][v[1]] + 1));

                        c[r[0]][r[1]] = s;
                    }
                }
            }

            for (let j = 0; j < vertexes.length; j++) {
                if (vertex_map[j].reduce((a, v) => a + (c[v[0]][v[1]] + 1 || 1) - 1, 0) != vertexes[j])
                    return;
            }

            solutions.push(c);
        })();
    }

    if (solutions.length > 1)
        return "N";

    // Convert to output list format

    var solution = solutions[0];

    var result = [];

    for (let p = 0, a, i = 0; i < 2 * size - 1; i++) {
        a = 2 * size - 1 - Math.abs(size - i - 1);

        for (let j = 0; j < a; j++) {
            result.push(solution[p + j][0]);
        }

        for (let j = 0; j < a; j++) {
            result.push(solution[p][1], solution[p++][2]);
        }
    }

    return result;
};

This challenge would actually be really fun as fastest-code: I think there are a lot of byte-expensive shortcuts that could really speed this up that I didn't have time to explore.
Thank you for a fun challenge.

Hey, thanks for answering the question! I haven't been on this site in forever, so seeing a bunch of notifs on other SE sites was a surprise! In hindsight, having this task as a [tag:code-golf] wasn't ideal, and it would definitely be more fun to make this [tag:fastest-code], I'll try and think of something (maybe make my own solution) when I have the time. However, feel free to post any optimised versions of your code if you want!


text:
Peel the potato
This is a potato:
  @@
 @@@@
@@@@@@
@@@@@@
 @@@@
  @@

More generally, a size N potato is defined as the following shape:
If N is even, it is 2 centered @ symbols, followed by 4 centered @ symbols, followed by 6 centered @ symbols, all the way up to N centered @ symbols; then, N centered @ symbols, followed by N-2 centered @ symbols, all the way down to 2.
If N is odd, a size N potato is generated in the same way as described above, but we begin with 1 @ symbol, rather than 2.
A potato is peeled by starting in the top right corner, and removing one @ sign each step, going in a counterclockwise fashion. For instance, peeling a size-3 potato looks like this:
 @
@@@
@@@
 @

@@@
@@@
 @

 @@
@@@
 @

 @@
 @@
 @

 @@
 @@

 @@
 @

 @
 @

 @

Challenge
Write a program, that, given an integer input, displays all of the steps of peeling a potato of that size.
Trailing whitespace/newlines are allowed.
Scoring
This is code-golf; the shortest code in bytes wins.

Sample Test Cases
N=2
@@
@@

@
@@

@@

 @

N=7
   @
  @@@
 @@@@@
@@@@@@@
@@@@@@@
 @@@@@
  @@@
   @

  @@@
 @@@@@
@@@@@@@
@@@@@@@
 @@@@@
  @@@
   @

   @@
 @@@@@
@@@@@@@
@@@@@@@
 @@@@@
  @@@
   @

   @@
  @@@@
@@@@@@@
@@@@@@@
 @@@@@
  @@@
   @

   @@
  @@@@
 @@@@@@
@@@@@@@
 @@@@@
  @@@
   @

   @@
  @@@@
 @@@@@@
 @@@@@@
 @@@@@
  @@@
   @

   @@
  @@@@
 @@@@@@
 @@@@@@
  @@@@
  @@@
   @

   @@
  @@@@
 @@@@@@
 @@@@@@
  @@@@
   @@
   @

   @@
  @@@@
 @@@@@@
 @@@@@@
  @@@@
   @@

   @@
  @@@@
 @@@@@@
 @@@@@@
  @@@@
   @

   @@
  @@@@
 @@@@@@
 @@@@@@
  @@@
   @

   @@
  @@@@
 @@@@@@
 @@@@@
  @@@
   @

   @@
  @@@@
 @@@@@
 @@@@@
  @@@
   @

   @@
  @@@
 @@@@@
 @@@@@
  @@@
   @

   @
  @@@
 @@@@@
 @@@@@
  @@@
   @

  @@@
 @@@@@
 @@@@@
  @@@
   @

   @@
 @@@@@
 @@@@@
  @@@
   @

   @@
  @@@@
 @@@@@
  @@@
   @

   @@
  @@@@
  @@@@
  @@@
   @

   @@
  @@@@
  @@@@
   @@
   @

   @@
  @@@@
  @@@@
   @@

   @@
  @@@@
  @@@@
   @

   @@
  @@@@
  @@@
   @

   @@
  @@@
  @@@
   @

   @
  @@@
  @@@
   @

  @@@
  @@@
   @

   @@
  @@@
   @

   @@
   @@
   @

   @@
   @@

   @@
   @

   @
   @

   @

Catalog
Based on Is this number a prime?

 <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

Welcome to PPCG! Nice first question, by the way.

Is trailing whitespace/newlines allowed?

I don't have the Retina skills but I would be interested in seeing that - if it is possible.

@JamesHolderness Thanks! I have fixed that.

Perl, 129 bytes
128 bytes of code + -n flag.
$p=($r=$"x$n++."@"x$_.$/).$p.$r,$_-=2while$_>0;say$_=$p;say y/A/ /r while s/(^| )A(.*
? *)@/$1 $2A/m||s/@( *
?.*)A/A$1 /||s/@/A/

You'll need -nE flags to run it :
perl -nE '$p=($r=$"x$n++."@"x$_.$/).$p.$r,$_-=2while$_>0;say$_=$p;say y/A/ /r while s/(^| )A(.*
? *)@/$1 $2A/m||s/@( *
?.*)A/A$1 /||s/@/A/' <<< 7

Explanations: (I'll detail them more when I have a moment)
The first part, $p=($r=$"x$n++."@"x$_.$/).$p.$r,$_-=2while$_>0;, generates the initial potato: it starts from the middle line of the potato, and adds two lines at each iteration: one before the previous string, one after. Note that $" is a space, and since $n isn't initialized, it starts at 0, and $/ is a newline.
Note much to say about the say$_=$p; that prints the initial potato while storing it in $_ (which will later be easier to manipulate).
Finally, say y/A/ /r while s/(^| )A(.*\n? *)@/$1 $2A/m||s/@( *\n?.*)A/A$1 /||s/@/A/ peels the potato. The last position where a @ was removed contains a A (it's arbitrary, it could have be any symbol). So each iteration consist in finding the A, replacing it with a space, and in the meantime replacing the next @ with a A. That's done thanks to two regex: s/(^| )A(.*\n? *)@/$1 $2A/m when the A is on the left side of the potato (A(.*\n? *)@ allows to go on the right or down), and s/@( *\n?.*)A/A$1 / when the A is on the right side (@( *\n?.*)A allows to go up or on the left). s/@/A/ replaces the first @ with a A (that's the initialization). Since we always have a A in the string, we need to replace it with a space when printing it, that's what y/A/ /r does.

Just for the eyes, the animated version looks fairly nice: (to run in a terminal, it's roughly the same code but with clear and sleep)
perl -nE 'system(clear);$p=($r=$"x$n++."@"x$_.$/).$p.$r,$_-=2while$_>0;say$_=$p;select($,,$,,$,,0.1),system(clear),say y/A/ /r while(s/(^| )A(.*\n? *)@/$1 $2A/m||s/@( *\n?.*)A/A$1 /||s/@/A/)&&/@/' <<< 10

This is great! I've never had so much fun watching an animated program :)

Befunge, 319 254 bytes
&:00p1+:40p2/10p>:40g%20p:40g/30p\:10g30g`:!00g:2%!-30g-*\30g*+:20g1+v
+10g-::40g\-*2*30g+\-1+00g2%!+\00g2/1++20g-:::40g\-*2*+30g-\4*00g2*-v>
v+1\,-**2+92!-g02g00**84+1`\+*`g02g01\*!`g02g01+**!-g02\`g03:/2g00-4<
>:40g00g:2%+*`!#v_$1+:55+,00g::*1-2/+`#@_0

The motivation for this algorithm was to try and avoid branching as much as possible, since a single path of execution is generally easier to golf. The code is thus comprised of just two loops: the outer loop iterating over the frames of the peeling process, and the inner loop rendering the potato for each frame.
The rendering loop is essentially just outputting a sequence of characters, the character for each iteration being determined by a rather complicated formula that takes the frame number of the peeling process and the index of the output sequence and returns either an @, a space, or a newline, as required.
Try it online!

Wow, this is beautiful.

Python 3.5.1, 520 bytes
n=int(input())L=lenR=rangeP=printdefg(a,b):f=list(a)ifb:foriinR(L(f)):iff[i]=="@":f[i]=""breakelse:foriinR(L(f)-1,-1,-1):iff[i]=="@":f[i]=""breakreturn"".join(f)l=[]s=(2-n%2n)*(((n-2n%2)/2)1)i=2-n%2whilei<=n:l.append("@"*i)i=2j=L(l)-1whilej>=0:l.append(l[j])j-=1y=[rforrinR(int((L(l)/2)-1),-1,-1)]forhinR(L(y)-1,-1,-1):y.append(y[h])defH(q):foreinR(L(l)):P((""*y[e])q[e])P("")H(l)k=0m=0whilek<s:fortinR(L(l)):if'@'inl[t]andm%2==0:l[t]=g(l[t],True)k=1H(l)if'@'inl[t]andm%2==1:l[t]=g(l[t],False)k=1p=l[:]p.reverse()H(p)m=1

Explanation
Basic idea: Alternate between iterating down each line and removing leftmost character and iterating up each line removing rightmost character while there are still @s left.
n=int(input())
L=len
R=range
P=print
# g() returns a line in the potato with leftmost or rightmoxt '@' removed
def g(a,b):
    f=list(a)
    if b:
        for i in R(L(f)):
            if f[i]=="@":
                f[i]=" "
                break
    else:
        for i in R(L(f)-1,-1,-1):
            if f[i]=="@":
                f[i]=" "
                break
    return "".join(f)

l=[]
# s is the total number of '@'s for size n
s=(2-n%2+n)*(((n-2+n%2)/2)+1)
i=2-n%2

# store each line of potato in l
while i<=n:
    l.append("@"*i)
    i+=2
j=L(l)-1
while j>=0:
    l.append(l[j])
    j-=1

# this is used for spacing
y=[r for r in R(int((L(l)/2)-1),-1,-1)]
for h in R(L(y)-1,-1,-1):
    y.append(y[h])

# print the potato
def H(q):
    for e in R(L(l)):
        P((" "*y[e])+q[e])
    P("\n")

H(l)
k=0
m=0

# while there are still '@'s either
# go down the potato removing leftmost '@'
# go up the potato removing rightmost '@'
while k<s:
    for t in R(L(l)):
        if '@' in l[t] and m%2==0:
            l[t]=g(l[t],True)
            k+=1
            H(l)
        if '@' in l[t] and m%2==1:
            l[t]=g(l[t],False)
            k+=1
            p=l[:]
            p.reverse()
            H(p)
    m+=1

Overall a sad attempt at a straightforward procedure.

Why is there no whitespace in your program?

source: Stack Exchange

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

sort: votes


text:
Dobble/SpotIt card generator
Introduction
Dobble/SpotIt  is a card game, where people have to spot same symbol on pair of cards in shortest time, indicate it and move to next pair. Each card has multiple symbols (8 in normal version), but exactly one is common between each pair of cards.
Example from physical copy of game:

Challenge
Write a program, which given set of symbols (single ascii characters) and number of symbols on single card will produce output listing cards with symbols for each card. There are obviously many equivalent combinations, your program just has to write any of combinations which produces largest amount of cards for given input.
It is a code-golf, so shorter the code, better.
It would be also great if computation will finish before heat death of universe for most complicated case.
Input
Two arguments to function/stdin (your choice)

First of them being collection of symbols, something like 'ABCDE" or ['A','B','C','D','E'] - your choice of format, be it string, set, list, stream, or whatever is idiomatic for language of choice. Characters will be given from set of [A-Za-z0-9], no duplicates (so maximum size of input symbol set is 62). They won't be neccesarily ordered in (so you can get "yX4i9A" as well for 6-symbol case).

Second argument is integer, indicating amount of symbols on single card. It will be <= than size of symbol set.

Output
Print multiple lines separated by newlines, each one of them containing symbols for single card.
Examples
ABC
2
>>>>
AB
BC
AC

Or
ABCDEFG
3
>>>>
ABC
BDE
CEF
BFG
AEG
CDG
ADF

Or
ABCDE
4
>>>>
ABCD

Hints

Number of cards produced cannot be larger than amount of distinct symbols and in many combinations it will be considerably smaller
You might want to read up Some math background if you need help with math side of the problem

This is my first code golf challenge, so please forgive possible issues with formatting/style - I'll try to correct errors if you point them in comments.
Edit:
There is a very nice youtube video explaining the math behind the Dobble setup here:

Related

Suggested test-case ('abcdefghijklmnopqrstu', 5) -> ['abcde', 'afghi', 'ajklm', 'anopq', 'arstu', 'bfjnr', 'bgkpt', 'bhlou', 'bimqs', 'cfkqu', 'cgjos', 'chmpr', 'cilnt', 'dfmot', 'dglqr', 'dhkns', 'dijpu', 'eflps', 'egmnu', 'ehjqt', 'eikor'] or some other 21-card working-solution. (Note that this is the projective finite plane of order 4).

Python 2, 192 162 bytes
I have an argument that this produces the maximum set of cards for every scenario and it does handle the 3 test cases.
from itertools import*
def m(a,s):
    C=["".join(x)for x in combinations(a,s)]
    while len(C):
        print C[0]
        C=list(set(A for A in C if len(set(A)&set(C[0]))==1<s))

Try it online!
Algorithm
Given an alphabet a and a card size s, take all combinations of s elements in a and call it C,  then:

Take the first element of C, call it C0
Save C0
Remove all elements fromC that have a union with C0 not equal to 1
Repeat with second element of C
Continue until C is empty

Then print the saved elements.
Argument
Some non-empty subset of C is our maximal solution, K. Since it contains at least one element and any two elements are indistinguishable, choose an arbitrary element, C0, of C to be in K. For any element e in the K, the cardinality of e union x is 1 for x != e in K; so eliminate all elements in C whose union with C0 does not have cardinallity 1. By the same reasoning, choose a new arbitrary element in C, add it to K, and reduce C. Eventually C is the empty set and K will be the maximal solution because at no point did we choose an element that was distinguishable from any other element.

Test Cases
These test cases were written before I realized that the printing was a requirement.
a=["a","b","c"]
b=2
c=3
d=m(a,b)
print d,len(d)==c
>> ['bc', 'ab', 'ac'] True

a=["a","b","c","d","e","f","g"]
b=3
c=7
d=m(a,b)
print d,len(d)==c
>> ['aef', 'abc', 'bde', 'ceg', 'adg', 'cdf', 'bfg'] True

a=["a","b","c","d","e"]
b=4
c=1
d=m(a,b)
print d,len(d)==c
>> ['abcd'] True

Update

+9 [16-12-07] Fit the print requirement
-11 [16-12-07] Golfed out my R variable
-30 [16-12-09] Golfed out my K variable, Thanks to @Leo!

Do you really need to subtract the set K from C at every step? I think the filtering you do (A for A in C if len(set(A)&set(C[0]))==1) already removes the chosen elements, unless s==1 (in this case len(set(C[0])&set(C[0])) would be 1). You could golf your second to last line to: C=[A for A in C if len(set(A)&set(C[0]))==1<s]

I was writing a Dobble challenge in the sandbox and Dom Hastings pointed me to this question as a possible dupe (which it may well be), however one thing I noticed is that it is much harder to make a full Dobble deck of NN+N+1 cards (and symbols) with N+1 symbols per card with N being a non-prime prime-power. For N=4=2^2 this would be a deck using 44+4+1=21 symbols and the same number of cards; however this solution produces a deck of only 13 cards - yet 21 is possible.

@JonathanAllan Just added a TIO link. I ran the function with an alphabet of 21 characters and with 5 characters per card. It output 21 cards. I think this is correct unless I misunderstood.

Hmm, sorry, I must have made some mistake running it locally then! (That's a Full Dobble Deck of Order 4. :))

Haskell, 175 156 bytes
My first take at golfing, let me know if I've messed something up.
import Data.List
f 0_=[[]]
f n a=g$c n a
c n a=[a!!i:x|i<-[0..(length a)-1],x<-f(n-1)(drop(i+1)a)]
g[]=[]
g(x:t)=x:g(filter(\z->length(z`intersect`x)<= 1)t)

Try it online!
Thank to @Paul Mutser for improvement and -19 bytes

Original version

Welcome to PPCG! Note that the imports count towards your score. Possible improvement: 156 bytes, including the import

Thanks for the heads up, I wasn't sure if they did!

Perl 6, 88 77 bytes
{+(combinations($^a,$^n),{my \d=.[0];say d.join;grep *∩d==1,.[1..*]}...!*)}

Try it online!

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


text:
Cantor's unspeakable numbers
An unspeakable number is a number which is divisible by seven or has seven as one of its digits. A children game is to count skipping unspeakable numbers
1 2 3 4 5 6 ( ) 8 9 10 11 12 13 ( ) 15 16 ( ) 18 ...

Cantor's version of the game is the sequence defined by recursively filling in the sequence "1 2 3 4 5 6 ( ) 8..." into the gaps ( ) above.
1 2 3 4 5 6 1 8 9 10 11 12 13 2 15 16 3 18 19 20 4 22 23 24 25 26 5 6 29 30 31 32 33 34 1 36 8 38 ...
Print/output at least the first 7^7 numbers of Cantor's unspeakable number game...
While the definition is given recursively, you are not obliged to use recursion in the code.
This is code-golf, so the program with the shortest byte count wins!
Note: The sum of numbers in 1 to 7^7 is 203511962727. The last 10 numbers in that range are
   823534 823535 221563 108068 823538 823539 823540 823541 823542 221565.
Pastebin dump of first 1000 iterates: http://pastebin.com/Ksiu9Svf

Please provide the first 7^7 numbers of that sequence such that we can check our solutions.

Related

In case anybody wants to generate some more numbers and compare results: The sum of the first 7^77 numbers in the sequence is 3336402440238885119980169136020683586413168645292341926482898521634332654984279162327502549917668322950744929983987545341421076028

Sure, the number of 1's in that sequence is 22977, which means if you pick an element out of the first 7^77 uniformly at random, you have a 2 * 10^-61 chance of it being a 1

In case you are interested, here is a graph showing the growth of the number of repeated ones: https://drive.google.com/file/d/0B71iQwGfNtw5NGladjdOZVhoNkk/view?usp=sharing

Thank you, @NiklasB. one can see that the depth grows polynomial and not logaritmically!

Yeah my algorithm to compute the sum is only fast because of that fact.

Pyth, 25 23 22 bytes
Thanks to @Maltysen for -2 bytes
.V1=+Y
?}7+PbjbT@Y~hZb

A program that prints an infinite stream.
Try it online! (Output flushed at intervals and times out at 1 min)
How it works
.V1=+Y
?}7+PbjbT@Y~hZb

Z = 0, Y = []    Implicit variable assignment
.V1              Infinite incrementing for loop with variable b, starting at 1:
   =+Y            Y = Y +
(newline)          (Implicitly print the result of the following:)
?                   If
 }7                  7 is in
    Pb                the prime factorisation of b
   +                  or
      jbT             the digits of b:
         @Y            Index into Y at index
             Z          Z
           ~h          (Increment Z)
                    else:
              b      b

23 bytes. It works cuz 7 is prime, so divisibility is can be done through checking the prime factorization, which fits in well with the other check

you can post it, the main part of its yours

Congratulation for winning this contest. I also like @Maltysen 's trick!

Python 2, 77 75 74 70 bytes
Thanks to @MartinEnder for suggesting the limit of 9e5 which enderd up working after a change.Thanks to @mschauer for suggesting an infinite stream, saving 4 bytes.
def f(n=0):
 i=f()
 while 1:n+=1;yield next(i)if'7'in`n`or n%7<1else n

This is a generator that yields an infinite stream of the numbers.

Could you not remove the upper bound entirely?

@mschauer Thanks, didn't think of that one.

if n%7<1or'7'in`n`else n might be slightly faster (same byte count), since n%7<1 is faster than checking the string, and or is short-circuiting. It's too bad that yield[n,next(i)][n%7<1or'7'in`n`] won't work.

@mbomb007 I don't think speed is an issue here, but thanks. :)

Perl, 47 46 41 39 bytes
Saved 5 bytes thanks to @Dada
say$_=$_%7*!/7/?$_:$a[$b++]for@a=1..1e6

Try It Online! TIO Nexus, now with Perl support!  This will truncate the output after a certain point, but if you have Perl installed, you can run it locally to produce the full output.
The code makes use of a couple of strange quirks of Perl's syntax, so I'll break down how it works below.
Code breakdown:
say$_=$_%7*!/7/?$_:$a[$b++]for@a=1..1e6
                              @a=1..1e6 #Assign the range (1..1,000,000) to the array @a
                           for          #and then loop through this list, with $_ as an alias for the list member.  As an alias, modifying $_ modifies @a.
      $_%7*!/7/?$_:$a[$b++]             #Ternary operation
      $_%7                              #Returns the residue modulo 7...
          *!/7/                         #...and multiplies it by the negation of whether or not there exists a 7 $_
                                        #Since % and * have the same operator precedence, it must be evaluated in this order
                                        #otherwise we would get (!/7/*$_)%7 instead of ($_%7)*!/7/
               ?$_                      #If the result is non-zero (i.e. truthy), then return $_
                  :$a[$b++]             #Otherwise, return the $b-th element of @a, and increment $b
   $_=                                  #Reassign the result back to $_, modifying @a
say                                     #Prints the result of the assignment, separated by newlines

say$a[@a]=$_=... to win 2 bytes if I'm not mistaken.

@Dada actually since that saves me from having to assign to $_, it saves me 5 bytes.  Thanks!

Oh indeed, I just had a quick look and didn't noticed that assignment in the middle.. good job :)

It is at this moment (and this moment only!) that I have understood the statement "Perl can be quite the write-only language".

@Grimy please don't edit others code. If you want to improve an answer add a comment including the improvement or post your own answer. As you probably won't reach the OP by a comment just post your own answer.

Haskell, 67 66 bytes
i#x|mod x 7<1||'7'`elem`show x=f!!i:(i+1)#(x+1)|y<-x+1=x:i#y
f=0#1

f is an infinite list of the numbers.
Try it online!
f starts a new iteration with 1 and an index which number to pick of 0.
Whenever there's a gap we take a new iteration an pick it's ith element and continue the current iteration with i+1. If there's no gap, we take the current number x and go on without increasing i.
Edit: -1 byte thanks to @BMO.

PHP, 80 (Wahooka) 57 54 bytes
While the idea is from Wahooka. I think my version is different enough to make it an own answer:
for(;;)echo$a[]=strpos(++$n,55)<-$n%7?"$n ":$a[+$b++];

MATL, 26 25 bytes
9e5:`t7\yFYA!7-A*~s:2M(2M

Try it online! with 9e5 replaced by 9e4, so that the maximum running time and output size of the online compiler are not exceeded.
How it works
This uses iteration instead of recursion. (In fact, MATL doesn't have recursion).
An array of numbers from 1 to 9e5 is first generated (this is enough, because 9e5 exceeds 7^7). Then, numbers that are multiples of 7 or have 7 as digit are identified, and replaced by 1, 2, ... The process is iterated until there are no numbers that need to be replaced.
9e5:       % Generate array of numbers [1 2 ... 9e5]. This array will become the
           % output, after some numbers have been replaced
`          % Do...while
  t        %   Duplicate the array of numbers
  7\       %   Modulo 7. Gives zero for multiples of 7
  y        %   Duplicate the array of numbers
  FYA!     %   Matrix of decimal digits, with a column for each number
  7-       %   Subtract 7 to each entry of that matrix
  A        %   Array that contains "true" for columns that only contain nonzeros;
           %   that is, for numbers that do not have 7 as digit
  *        %   Multiply. This corresponds to a logical "and" of the two conditions.
           %   A zero indicates that the number at that index needs to be replaced
  ~        %   Logical negate. Each "true" corresponds to a number to be replaced
  s        %   Sum. This is the amount of numbers to be replaced, say n
  :        %   Push array [1 2 ... n]
  2M       %   Push array of logical values again
  (        %   Replace the numbers at the positions indicated by the logical array
           %   by the values [1 2 ... n]
  2M       %   Push n again. This is used as loop condition, so if it is nonzero
           %   the next iteration will be executed. Note that this executes one
           %   too many iterations: the exit condition is that no replacing has
           %   been needed in the current iteration; but then the current iteration
           %   (which will be the last) was not really necessary. This does not
           %   matter; the last iteration is useless but also harmless
           % End do...while implicitly. Display implicitly

Tcl, 121 Bytes
The trivial solution using infinite loop, nothing fancy..
set r 0;set n 0;while {[set r [expr $r+1]]} {if {![expr $r%7]||(7 in[split $r ""])} {puts [set n [expr $n+1]]} {puts $r}}

Ungolfed:
set r 0
set n 0
while {[set r [expr $r+1]]} {
  if {![expr $r % 7] || (7 in [split $r ""])} {
    puts [set n [expr $n+1]]
  } {
    puts $r
  }
}

You can use incr. And if tcl version >= 8.6, incr assumes the first iteration an increment of a new variable from 0 to 1 if that variable was not set before; so you can get rid of the first two set instructions.

golfed by me — I removed also some non needed white space.

The site where I posted my golfing suggestions for you has lost them, so I made a my new answer

PHP, 106 80 bytes
Thank you Ismael Miguel for help with the ternary solution and shorter loop code using for instead of while.
Could not verify the last parts of the full sequence due to PhpFiddle's 30 second max runtime.  Seems to work at least up to 1K based on the sample output provided by the OP.
Golf:
for($n=1;;$n++)echo$a[]=!(strpos($n,"7")>-1||$n%7==0)?"$n ":array_shift($a)." ";

Original golfed version:
$n=1;while(1){if(!(strpos($n,"7")>-1||$n%7==0)){echo$a[]=$n." ";}else{echo$a[]=array_shift($a)." ";}$n++;}

for($n=1;;$n++)echo$a[]=!(strpos($n,7)>-1||$n%7==0)?"$n ":array_shift($a)." "; I don't know the byte count, but I'm sure it is a lot lower than 106 bytes. Try it out and see if it works.

Very nice, thanks for the help.  The only modification to your code was to put the first 7 in quotations which added two bytes to your 78 byte version.

You can save 3 bytes or so by doing for($n=1;;$n++)echo$a[]=strpos($n,"7")>-1||$n%7==0?array_shift($a)." ":"$n ";. I'm not sure if you can replace $n%7==0 with !$n%7 but it's worth a try.

." " is not neccessary. Use for($n=1;;$n++)echo$a[]=strpos($n,"7")>-1||$n%7==0?array_shift($a):"$n "; to save 7 chars

for($n=1;;$n++)echo$a[]=strpos($n,"7")<-1&&$n%7?"$n ":array_shift($a); gets you down to 70.

for($n=0;;)echo$a[]=strpos(++$n,"7")<-1&&$n%7?"$n ":array_shift($a); 68. Last comment so far.

Keep going -6 : $n=0 is useless, "7" can be 7.

@Crypto thx for the tip: for(;;)echo$a[]=strpos(++$n,55)<-1&&$n%7?"$n ":array_shift($a); (63 Byte) works correctly (param 2 gets covered to a char so we need 55 instead of 7).

why shift? for(;;)echo$a[]=strpos(++$n,55)<-1&&$n%7?"$n ":$a[++$b-1]; (58 byte). ++$b-1 because $a[null] === null

Perl 6,  74 57 54  53 bytes
sub u{my@u;(1..*).map: {if $_%%7||.comb('7') {@u||=u;@u.shift} else {$_}}}

sub u{(1..*).map: {$_%%7||.comb('7')??(@||=u).shift!!$_}}

sub u{map {$_%%7||.comb('7')??(@||=u).shift!!$_},1..*}

sub u{map {$_%%7||.comb(~7)??(@||=u).shift!!$_},1..*}

Try it
Expanded:
sub u{
  map             # for each element transform using:

  { # bare block lambda with implicit parameter ｢$_｣

      $_ %% 7     # if it is divisible by 7
      ||          # or
      .comb(~7)   # contains the number 7 (implicit method call on ｢$_｣)

    ??            # then
      ( @ ||= u ) # store a new instance of the Seq into an unnamed state array if it is empty
                  # ( it is only empty the first time it is seen in this Seq instance )
      .shift      # pull one off of the front

    !!            # else
      $_          # return the value
  },

  1 .. *          # infinite range starting at one ( elements to be mapped over )
}

Test:
$ time perl6 -e'sub u{map {$_%%7||.comb(~7)??(@||=u).shift!!$_},1..*};put 203511962727 == sum u()[^7**7]'
True

real    2m45.744s
user    2m45.416s
sys     0m0.212s

Looks like you could save a byte by saying ~7 instead of '7'.

Julia, 62 bytes
x=[];j=0;for i=1:7^7;x=[x;i%7<1||('7' in "$i")?x[j+=1]:i]end;x

Nothing fancy. Uses that the sequence within the gaps is the sequence itself. Makes excessive array copies to save some bytes.

Dyalog APL, 39 bytes
{(⍵⍴⍨⍴i)@(i←⍸('7'∊¨⍕¨⍵)∨0=7|⍵)⊢⍵}⍣≡⍳7*7
⍳7*7 is 1 2 3...77
{ }⍣≡ is the fixed point operator - apply a function repeatedly until the result stabilises
A@I⊢B amend operator - replace the elements at indices I in B with A
0=7|⍵ bitmask for where the argument is divisible by 7
'7'∊¨⍕¨⍵ bitmask for where the decimal formatting of the argument contains a 7
∨ or
⍸ at what indices is either of the above bitmasks true?
i← assign to i
⍵⍴⍨⍴i reshape the argument to the number of elements in i

This is nice. Does it help if you multiply ⍳7*7 with the bitmask and take the fixpoint of amending the zeros in the sequence?

Javascript, 80 bytes
n=[]
r=l=>(m=n[l]=++n[l]||1,!/7/.test(m)m%7?m:r(l+1))
for(;;)console.log(r(0))

Since there is only a minimum requirements but not a maximum requirements, this solution continues to output indefinitely.
To verify that the algorithm is correct, you can execute the same code printing only the last 10 numbers and the sum:
n = []
r = l => (m = n[l] = ++n[l] || 1, !/7/.test(m) && m % 7 ? m : r(l + 1))
var tot = 0
for (i = 0; i + 1; i++) {
    v = r(0)
    tot += v
        if (i > Math.pow(7, 7) - 11) {
        console.log(v)
    }
    if (i === Math.pow(7, 7) - 1) {
        console.log(tot)
        break
    }
}

SyntaxError: missing ) in parenthetical

Ceylon, 202 bytes
object u satisfies{Integer*}{iterator()=>object satisfies Iterator<Integer>{variable value i=0;late Iterator<Integer>n;next()=>if(++i%7<1||'7'in"``i``")then(i<8then(n=iterator())else n).next()else i;};}

This is not a function, but an object declaration implementing an infinite sequence (Iterable). The object can be printed directly, print(u) outputs this:
{ 1, 2, 3, 4, 5, 6, 1, 8, 9, 10, 11, 12, 13, 2, 15, 16, 3, 18, 19, 20, 4, 22, 23, 24, 25, 26, 5, 6, 29, 30, ... }
To print more, use printAll(u). The following code uses newlines, and also prints the sum (and the first 30 elements shown above):
shared void run() {
    printAll(u.take(7^7), "\n");
    print(sum({0, * u.take(7^7)}));
    print(u);
}

Here is the ungolfed and commented version:
// Prints cantor's unspeakable numbers.
//
// Question:  http://codegolf.stackexchange.com/q/101231/2338
// My answer: http://codegolf.stackexchange.com/a/101297/2338

// this object u (which is like a singleton class with its single instance)
// implements the Iterable<Integer> interface.
object u satisfies {Integer*} {
    // That interface has just one formal method,
    // `shared formal Iterator<Integer> iterator()`.
    // Lets implement it by ...
    iterator()
    // ... providing for each call ...
            =>
                // ... a new (anonymous) object, which
                // implements the Iterator<Integer> interface.
                object satisfies Iterator<Integer> {
                    // This is the counter (the type `Integer`
                    // is longer than `value`, so we infer it).
                    // We start at 0.
                    variable value i = 0;
                    // This is a nested Iterator. It will be
                    // initialized when first needed, so we don't
                    // get an endless recursion when creating the
                    // first iterator.
                    late Iterator<Integer> n;
                    // `shared formal Integer next()` is the single method
                    // of Iterator which needs to be implemented.
                    next()
                    // each time it is called, the following
                    // expression will be evaluated.
                            =>
                                // increment the counter, then check if it
                                // is an unspeakable number.
                                if (++i % 7 < 1 || '7' in "``i``")
                                then
                                    // if so, take the nested iterator (and the
                                    //  first time, for i == 7, create it first),
                                    // and take its next element.
                                    (i < 8 then (n = iterator()) else n).next()
                                else
                                    // otherwise, just return i.
                                    i;
                };
}

Ruby, 80 bytes
l=->x{x%7==0||x.to_s[/7/]};a=(1..100);b=a.reject &l
p a.map{|x|!l[x]?x:b.shift}
First submission, I'm sure it can be improved :)

Welcome to PPCG! Does this go up to at least 7^7 (i.e. 823543), and does it account for numbers which contain the digit 7, i.e. 17?

It sure didn't. Fixed now. Thought that problem was a little too easy :)

Nice, but I'm not sure it qualifies yet. The number after 34 (which is 8 currently) should be 7, but because 7 is an unspeakable number, the program should start a third iteration and instead print 1.

C 157 155 Bytes
int c[999999],r;main(_,p){if(_){p=--_;c[_]=1;for(;;){printf("%d ",c[_]);main(0,++_+1);c[_]=r?_+1:c[p++];}}else!p?r=1:p%7?p%10-7?main(0,p/10):(r=0):(r=0);}

It looks right, I didn't bother to fully check. Goes up to 999999 which is apparently large enough.
Ungolfed version:
int cantor_n[1000000];

int cantor_n_safe(int x) {
    if (!x) return 1;
    if (x % 7 == 0) return 0;
    if (x % 10 == 7) return 0;
    return cantor_n_safe(x / 10);
}

int main(_, prev_index) {
    prev_index = --_;
    cantor_n[_] = 1;
    for(;;) {
        printf("%d ", cantor_n[_]);
        _++;
        if (!cantor_n_safe(_+1)) {
            cantor_n[_] = cantor_n[prev_index++];
        } else {
            cantor_n[_] = _+1;
        }
    }
    return 0;
}

Partially golfed version:
int c[999999];int r;
safe(x){
    !x?
        r=1:
        x%7?
            x%10-7?
                safe(x/10):
                (r=0):
            (r=0);
}

main(_){
    int p;
    p=--_;
    c[_]=1;
    for(;;){
        printf("%d ",c[_]);
        safe(++_+1);
        if (!r) {
            c[_]=c[p++];
        } else {
            c[_]=_+1;
        }
    }
}

Do you need the braces after else?

I do not, thank you. I also don't technically need the braces around (r=0) most of the time. But some compilers are picky. I'm too lazy to check the spec right now.

133 bytes

R, 86 bytes
x=1;while(T<7^7){T=T+1;x[T]=if(!T%%7|7%in%el(strsplit(c(T,""),""))){F=F+1;x[F]}else T}

Uses R's Truthy built-in T (initialized to TRUE/1) to count the numbers in the the sequence and the Falsy value F (initialized to FALSE/0) to count the unspeakables. Other than that the program simply checks whether each number is divisible by seven or contains the number.

-4 bytes replacing 7%in%el(strsplit(c(T,""),"")) by 55%in%utf8ToInt(paste(T))? (not tested)

C - 115 bytes
s[99],r;g(x){return x%10-7&&(!x||g(x/10));};f(i){(r=++s[i])%7&&g(r)||f(i+1);}main(){for(;;f(0),printf("%d\n",r));}

EDIT: Thanks to @mschauer who pointed out I missed some things.

Nice approach. Two remarks. r%10-7 does only captures trailing sevens and don't corrupt your heap: stack depth grows polynomially... s[99] is safe.

112 bytes

Mathematica, 82 bytes
Nest[#2&[i=1,If[Or@@(#==7&)/@IntegerDigits@#,i++,#]&/@#]&,Table[i,{i,7^7}],20]

JavaScript 81 bytes
Original (98 bytes)
for(c=0,i=1;i<=Math.pow(7,7);i++)/7/.test(i)||i%7==0?(6==c?c=1:c++,console.log(c)):console.log(i);

Golfed
p=console.log;for(c=0,i=1;i<9e5;i++)/7/.test(i)||i%7==0?(6==c?c=1:c++,p(c)):p(i);

Welcome to the site! I don't know a lot about javascript, but could you do something like p=console.log;for(c=0,i=1;i<=Math.pow(7,7);i++)/7/.test(i)||i%7==0?(6==c?c=1:c++,p(c)):p(i);?

Thanks @DrMcMoylex, that dropped a few more bytes. I don't doubt there's still room for improvement.

Glad I could help! One other thing I just realized, is you could do 9e5 instead of Math.pow(7,7), since the challenge said: Print/output AT LEAST the first 7^7

Yep, nice shot Doc! This allowed me to drop an equals from a comparison operator too.

It doesn't seem to do what's expected. When filling the gaps, you apparently have to apply the rules again rather than just resetting a counter (see this part of the sequence: 34 1 36 **8** 38). But for what it's worth, the current version could be golfed some more: for(c=i=0;++i<9e5;)console.log(!/7/.test(i)&&i%7?i:c++%6+1).

Seems wrong, a(37) is 8, not 2

Befunge, 100 or 156 bytes
This first version is the more portable of the two, limiting itself to 7-bit memory cells, which is what you get in the reference interpreter.
"O":0>\#09#:p#-:#1_v<0$.<
9\*"~"g9+1:+1::p00:<+3$_^#g01$$<v"~":/"~"p9g00%"~"::+1+g9\*"~"+g
:#15#+5#g+#0%#17#\-#/!#+\#5:#5_^>%00g1+9p"~"/00g2+9p::7%!10>>p#0

The second version only works with interpreters that have 32-bit memory cells, and thus isn't strictly standard Befunge, but that lets us store larger values in memory without having to split them across cells.
"O":0>\#09#:p#-:#1_v<0$.<
%7::p9g00:+1g9:p00:<+1$_^#g01$$<v01!
:#15#+5#g+#0%#17#\-#/!#+\#5:#5_^>p#0

In both cases the program runs indefinitely, but the first version will overflow around the 2 million mark, while the second version should get up to the max int value (around 2 billion).
You can Try it online, but you'll need to kill the process to prevent it from trying to run forever.

Clojure, 130 bytes
#(let[R(range(inc %))](rest((reduce(fn[[r s]i](if(or(=(mod i 7)0)((set(str i))\7))[(assoc r i(r s))(inc s)][r s]))[(vec R)0]R)0)))

Basic reduce, keeping track of contents of the result vector and how many values have been skipped. The last 0 takes first element of the reduced [r s], rest drops first element of the 0-indexed result.

Perl6, 41 bytes
put {($_=++$)%%7|m/7/??@_[$++]!!$_}…1e6

Tcl, 72 bytes
while 1 {puts [expr {[incr i]%7&&7ni[split $i ""]?$i:([incr s]-1)%6+1}]}

Try it online!

nice! much shorter than mine…

This writes "...33 34 7 36 8 38..." instead of "...33 34 1 36 8 38..."

@mschauer: Ok, I will fix it when I have time...

@hdrz I tried your solution and it has the same issue mschauer told about!

@mschauer: fixed.

JavaScript, 64 bytes
for(f=n=>!/7/.test(m=++n[0])*m%7?m:f(n.t=n.t||[0]);;)alert(f(f))

output=[];index=0;for(f=n=>!/7/.test(m=++n[0])*m%7?m:f(n.t=n.t||[0]);index<100;)output[index++]=f(f);console.log(output.join(','))

p.s. to compare with the other few (console.log) JavaScript answers, it's 70 bytes

Japt, 25 bytes
[]L³õ@pX%7«/7/tX ?X:UgV°

Test the sum and last 10 elements.
Generates first 1,000,000 entries of the sequence and prints them. One million is the shortest number over 7**7 == 823543 in Japt.
The trailing newline is significant, as it activates the implicit assignment to U.
Generating the list only takes around a second, but outputting the entire array will likely make your browser hang.
Unpacked & How it works
[]L³õX{UpX%7&&!/7/tX ?X:UgV++

[]                            Assign empty array to U
  L³õX{                       Map over 1 to 1,000,000 inclusive...
         X%7&&                  If X is not divisible by 7 and
              !/7/tX            X does not have a digit 7
                     ?X:UgV++   then X, otherwise the next element already in U
       Up                       Push it to the end of U

                              Implicit print U

Uses the property that the recursive definition can be resolved by looking at the already generated sequence.

05AB1E, 17 bytes
[N>ÐÑª˜7åi¯¾è¼}=ˆ

Port of @TheBikingViking's Pyth answer, so make sure to upvote him as well!
Also outputs the infinite sequence, each number on a separated line.
Try it online.
Explanation:
[               # Start an infinite loop:
 N>             #  Push the 0-based loop-index + 1
   Ð            #  Triplicate this now 1-based index
    Ñ           #  Pop one and push a list of its divisors
     ª          #  Implicitly convert another number to a list of digits, and
                #  append this list of divisors to it
      ˜         #  Flatten it
       7åi      #  Pop and if it contains a 7
                #  (so either the digits contained a 7 or the divisors):
          ¯     #   Push the global array
           ¾è   #   Index the counter variable into it
             ¼  #   And increase the counter variable by 1 afterwards
         }      #  Close the if-statement
          =     #  Print the top number (without popping)
           ˆ    #  Pop and add it to the global array

If we only want to output the first \$7^7\$ results instead of printing indefinitely, the [N> could be 7mEN instead.

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

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


text:
Evaluate the aspect ratio of a triangle
Given three sidelengths of a triangle, evaluate its aspect ratio AR given the following formula:

where

The closer to equilaterality a triangle is, the closer to 1 its aspect ratio is. The aspect ratio is bigger or equal to 1 for valid triangles.
Inputs
The input is three real positive numbers which can be encapsulated in a list or anything similar if need be.
Your program must output the same value no matter what the order in which the three sidelengths are inputted is.
Those three numbers will always be valid sidelengths of a triangle (degenerate triangles like one with sidelengths 1, 1 and 2 will not be given as input). You need not worry about floating point inaccuracies when values become extremely close to a degenerate triangle (e.g. it is acceptable that your program would error division by 0 for input [1, 1, 1.9999999999999999]).
The input can be given through STDIN, as a function argument, or anything similar.
Outputs
The output is a real number bigger or equal to 1 with the standard accuracy that is acceptable in your language.
The output may be printed to STDOUT, returned from a function, or anything similar.
Test cases
Inputs                   Output

  1      1      1         1
  3      4      5         1.25
 42     42   3.14         ≈ 6.9476
 14      6     12         1.575
  6     12     14         1.575
0.5    0.6    0.7         ≈ 1.09375

Scoring
This is code-golf, so the shortest answer in bytes wins.

should s be (a+b+c)/3 ?

@costrom No, the formula is correct. s is the semiperimeter of the triangle. your formula would be undefined for an equilateral triangle.

Can I just get floats for input or do I need to get integers as well?

@ErikGolferエリックゴルファー It is acceptable to input 42.0 instead of 42.

@Fatalize Thanks. Also, can the inputs all be 0?

@ErikGolferエリックゴルファー I fixed the description: "The input is three real positive numbers", so no input can be 0 (this would yield a degenerate triangle). Thanks.

Is there a related Wikipedia or WolframAlpha page for this formula?

@mbomb007 This formula is described in this book.

@Fatalize Yeah, I saw, but I was expecting to find more than that when searching.

Input given through STDOUT? Do you mean STDIN, or do you actually want us to retrieve input through STDOUT?

@ZacharyT That was a typo, thanks.

@mbomb007 Look here.

Ehm. An answer in... MINECRAFT!?!?!. Ehm.

Jelly, 6 bytes
This answer is based on Emigna's 05AB1E answer. Many thanks to Dennis and Lynn for their help in figuring this answer out. Golfing suggestions welcome! Try it online!
S_Ḥ⁸÷P

Ungolfing
           Implicit argument [a, b, c].
S          Take the sum, a+b+c or 2*s
  Ḥ        Take the double, [2*a, 2*b, 2*c].
 _         Vectorized subtract, giving us [2*(s-a), 2*(s-b), 2*(s-c)].
   ⁸÷      Vectorized divide the initial left argument, the input [a, b, c],
             by [2*(s-a), 2*(s-b), 2*(s-c)].
     P     Take the product giving us the aspect ratio, abc/8(s-a)(s-b)(s-c).

6 bytes and you still want golfing suggestions? :-D

@LuisMendo If it's at all possible, sure :D

“Push” isn’t quite correct terminology; Jelly isn’t stack-based. Rather, ⁸÷ gets muched off the chain as a unit, and should be read as divide the initial left argument by this, or something.

@Lynn I'm been golfing Actually for several months now. Stack-based terminology is firmly wedged in my brain :D Should be fixed now.

Jelly, 7 bytes
SH_÷@HP

Try it online!
Explanation

Let’s read this chain:

The implicit argument is a list [a, b, c].
First we read S. This takes the sum: a + b + c.
Then, we read H. This halves it: (a + b + c)/2. (This is s.)
Then, we read a dyad _ (subtract), followed by another dyad. This is a hook: it lacks a right argument, so it receives the argument to this chain, [a, b, c], giving us [s-a, s-b, s-c]. (This is the fifth chain pattern in the table here.)
Then, we read the dyad-monad pair ÷@H. This is a fork: ÷@ is division with the arguments flipped, and H is halve, so our working value gets Half the argument to this chain ÷’d by it. This vectorizes; we’re left with [(a/2)/(s-a), (b/2)/(s-b), (c/2)/(s-c)]. (This is the second chain pattern in the table here.)
Finally, we take the product with P, getting us abc/(8(s-a)(s-b)(s-c)).

View a tree-like graph of how the links fit together.

The images look great! Nice touch!

I made the top image smaller myself, and turned the second one into a link (no pun intended).

I saw the image and immediately thought, "Nice one, Lynn!" before looking at who posted it ;-)

Best explanation I've seen of a Jelly program. I still don't understand, but closer!

I ran the sample against the test-case ´6.0,12.0,14.0and it gave-0.8888888888888888´ instead of 1.575 as shown in the test-cases. Is it a problem with the test-cases or your code?

@MBaas It returns 1.575 for me. Could you double-check?

Jelly, 6 bytes
S÷_2Pİ

Try it online!
How it works
S÷_2Pİ  Main link. Argument: [a, b, c]

S       Sum; compute 2s := a + b + c.
 ÷      Divide; yield [2s ÷ a, 2s ÷ b, 2s ÷ c].
  _2    Subtract 2; yield [2s ÷ a - 2, 2s ÷ b - 2, 2s ÷ c - 2].
    P   Product; yield (2s ÷ a - 2)(2s ÷ b - 2)(2s ÷ c - 2).
     İ  Invert; yield 1 ÷ (2s ÷ a - 2)(2s ÷ b - 2)(2s ÷ c - 2).

Ahh, and I tried to use ³⁴⁵ as arguments...

JavaScript, 38 bytes
This is a (curried) lambda:
a=>b=>c=>a*b*c/(b+c-a)/(a+c-b)/(a+b-c)

(If you assign it to a variable f you'd need to call it like f(3)(4)(5))

Beat me to it by a few seconds :) Mind explaining how the formula works similarly to the one provided by the question?

@KritixiLithos Just plug in s = 1/2(a+b+c) into the formula and simplify :D (e.g. s-a = .5*b+.5*c-.5*a, and the three factors of .5 cancel with 8)

(a,b,c)=> is the same length, and costs less bytes to call ;)

But I love curry :D

05AB1E, 11 7 bytes
05AB1E uses CP-1252 encoding.
O¹·-¹/P

Try it online!
Explanation
O         # sum input
 ¹        # push input again
  ·       # multiply by 2
   -      # subtract from sum
    ¹/    # divide by input
      P   # product

MATL, 8 7 bytes
tsGE-/p

Try it online!
Explanation
Let's use input [3 4 5] as an example
t    % Take input implicitly. Duplicate
     % STACK: [3 4 5], [3 4 5]
s    % Sum of array
     % STACK: [3 4 5], 12
G    % Push input again
     % STACK: [3 4 5], 12, [3 4 5]
E    % Multiply by 2, element-wise
     % STACK: [3 4 5], 12, [6 8 10]
-    % Subtract, element-wise
     % STACK: [3 4 5], [6 4 2]
/    % Divide, element-wise
     % STACK: [0.5 1 2.5]
p    % Product of array. Implicitly display
     % STACK: 1.25

R, 34 29 bytes
x=scan();prod(x/(sum(x)-2*x))

Reads input from stdin and store as the R-vector x. Then make use of R's vectorization to form the denominator.

Haskell, 36 bytes
This defines the function # which takes three arguments.
(a#b)c=a*b*c/(b+c-a)/(a+c-b)/(a+b-c)

You have to call it as follows: (3#4)5
A little bit longer but perhaps more golfable:
p=product
f v=p v/p((sum v-).(2*)<$>v)

Mathematica, 20 bytes
1##&@@(#/(Tr@#-2#))&

Takes input as a list of three values, which is referred to as # inside the function. Tr@ is the shortest way to sum a list (to get 2s) and 1##&@@(...) multiplies the three factors i/(2s-2i) for i in a, b, c.
If the inputs are integers or rational numbers, you'll get an exact result.

Python 3, 42 bytes
lambda a,b,c:a*b*c/(b+c-a)/(a+c-b)/(a+b-c)

Try It Online!

MATLAB, 64 38 25 bytes
This is an anyonmous function that implements the formula as provided:
@(v)prod(v./(sum(v)-2*v))

It assumes the input to be a list of three values e.g. [3,4,5]. This example is used in following explanation:
             sum(v)        = 3+4+5 = 12
             sum(v)-2*v    = 12 - 2*[3,4,5] = 12 - [6,8,10] = [6,4,2]
         v./(sum(v)-2*v))  = [3,4,5] ./ [6,4,2] = [0.5,1,2.5]
    prod(v./(sum(v)-2*v))  = 0.5 * 1 * 2.5 = 1.25

Minecraft 1.8, 1607 bytes + 85 blocks = 1692 blytes
Warning: Not golfed. Golfed will take up to 1/3 less blytes.
Here is a commented screenshot:

The inputs are a, b, and c,and the output is fin
fin, and all other variables in Minecraft are integers, so the standard Minecraft accuracy is 0 decimal points
The green border: the command blocks on the left will activate after the ones on the right, which are just variable initializations.
The lever (grey-brown rectangle in the down right) is the contraption trigger
It takes up so much because of the way Minecraft handles variables. A very simplified overview:

/scoreboard objectives add name dummy creates a new variable named "name"
/scoreboard players set @p name number sets the variable name to number. Number must be a real number, not a variable.
/scoreboard players operation @p name += @p name2 increments name by name2. name2 must be a variable, not a number.

-=, /=, *=, = and more can be used instead += to decrement, multiply, divide, etc.

I'm not going to post all the 43 commands here. It would help golfing this, but would also help drive me crazy copypasting
If 1.9 command blocks would be used, the solution would (at least) use 42 blocks less. If one-letter variables would be used, almost 200 bytes would be saved.

OCaml, 51 bytes
fun a b c->a*.b*.c/.(b+.c-.a)/.(a+.c-.b)/.(a+.b-.c)

Yay, separate operators for floats...

Actually, 10 8 bytes
This answer is based on Dennis's excellent Jelly answer. Golfing suggestions welcome! Try it online!
;Σ♀/♂¬πì

Ungolfing
     Implicit input [a, b, c].
;    Duplicate [a, b, c].
Σ    sum() to get twice the semiperimeter, 2*s.
♀/   Vectorized divide 2*s by [a, b, c] to get [2*s/a, 2*s/b, 2*s/c].
♂¬   Vectorized subtract 2 to get [2*s/a-2, 2*s/b-2, 2*s/c-2].
π    Get the product of the above to get 8*(s/a-1)*(s/b-1)*(s/c-1).
     This is the same as 8(s-a)(s-b)(s-c)/abc.
ì    Invert to get the aspect ratio, abc/8(s-a)(s-b)(s-c).
     Implicit return.

Wonder, 48 bytes
@@@prod[#0#1#2/1- +#1#0#2/1- +#2#0#1/1- +#2#1#0]

RIP
Usage:
(((@@@prod[#0#1#2/1* * - +#1#0#2- +#2#0#1- +#2#1#0])3)4)5

Explanation
Function calls are costly in Wonder when compared to infix operators in other languages. Because of this, I contained all the terms in an array and got the product of the result instead of multiplying every single term. The code would be equivalent to something like:
(a,b,c)=>product([a,b,c,1/(b+c-a),1/(a+c-b),1/(a+b-c)])

Hmm, why "RIP"?

It's much longer than necessary/expected

Java, 38 bytes
(a,b,c)->a*b*c/(b+c-a)/(a-b+c)/(a+b-c)

Testing and ungolfed
public class Pcg101234 {
  interface F {
    double f(double a, double b, double c);
  }
  public static void main(String[] args) {
    F f = (a,b,c)->a*b*c/(b+c-a)/(a-b+c)/(a+b-c);

    System.out.println(f.f(1,1,1));
    System.out.println(f.f(3,4,5));
    System.out.println(f.f(42,42,3.14));
    System.out.println(f.f(14,6,12));
    System.out.println(f.f(6,12,14));
    System.out.println(f.f(0.5,0.6,0.7));
  }
}

Test it!
Output
1.0
1.25
6.947606226693615
1.575
1.575
1.09375

I feel like (a,b,c) is kinda cheating here, because it contains no type information. IMO the implicit lambda interface (in your case F) should count in the total byte sum.

@mEQ5aNLrK3lqs3kfSa5HbvsTWe0nIu Lambdas are heavily recommended. Also, most of the Java 8 entries work like that without any remarks. If you disagree and consider I cheated, I invite you to ask formally in meta if this notation is accepted or not. Meanwhile, I align on previous Java 8 answers.

Jellyfish, 17 16 bytes
Thanks to Zgarb for saving 1 byte.
p%/*-)/+i
    2%

Try it online!
Explanation
This is based on the same reciprocal formula as Dennis's answer.
In more traditional functional notation, the above program reads as follows:
print(
  1 / fold(
    multiply,
    fold(add, i) / i - 2
  )
)

Where i is the input list. Note that fold(multiply, ...) just computes the product and fold(add, ...) the sum, so we can further simplify this to:
print(1 / product(sum(i) / i - 2))

The sum(i) / i is implemented via the hook )/+ which defines a new unary function to do both steps at once.

Save a byte with a hook.

Dyalog APL, 10 9 bytes
×/⊢÷+/-+⍨

This is an anonymous function train (an atop of a fork of a fork of a fork), meaning that every sub-function is applied to the argument, inside the following structure:
 ┌─┴─┐
×/ ┌─┼───┐
   ⊢ ÷ ┌─┼──┐
      +/ - +⍨

TryAPL online!
×/ the product of
⊢ the arguments
÷ divided by
+/ the sum of the arguments
- minus
+⍨ the arguments doubled (lit. added to themselves)
Mathematical background.
ngn shaved a byte.

Hi Adám, pls. remind me to ask you about ´⊢´ next week if I forget it :-)

I dunno how the "background" link supposedly pertains to this answer because I see no algorithm there at all. Also, can you add some info about order of operations? I've tried to reproduce this answer in a few different languages with varying order of operations but I always get an answer different from that in the question.

@cat Well, it wasn't intended to give the algorithm, only to explain what the aspect ratio is, as there is no such page on Wikipedia. APL is right-to-left, meaning that every function takes whatever is on its right as argument. Therefore, it can be read from left to right as in the explanation.

2sable, 6 bytes
A port of Dennis' Jelly answer.
Os/ÍPz

Uses the CP-1252 encoding. Try it online!

dc, 49 bytes
5k?dsa?dsb?dsc++2/sslalblc**lsla-lslb-lslc-8***/p

A direct implementation of the formula given. Prompts for the three inputs upon invocation on three separate lines and outputs a floating-point value with 5 digits after the decimal point to the next line.
Explanation
5k                                                # Set the output precision to 5 digits after the decimal
  ?dsa                                            # Prompt for first input value on first line, duplicate it, and then store it in register `a`
      ?dsb                                        # Prompt for second input, duplicate it, and store it in register `b`
          ?dsc                                    # Prompt for third input, duplicate it, and store it in register `c`
              ++2/ss                              # Sum up the 3 values on the main stack, then divide sum by 2 and store the result in register `s`
                    lalblc**                      # Copy all three values from registers `a`,`b`,`c` onto the main stack, find their product, and push result to top of main stack
                            lsla-                 # Copy value from register `s` onto main stack, subtract register `a`'s value from it, and push result to main stack
                                 lslb-            # Copy value from register `s` onto main stack, subtract register `b`'s value from it, and push result to main stack
                                      lslc-       # Copy value from register `s` onto main stack, subtract register `c`'s value from it, and push result to main stack
                                           8***   # Find the product of the top three values and 8 and then push the result to main stack
                                               /p # Divide the second to top value (a*b*c) by the top of stack value (8*(s-a)*(s-b)*(s-c)), push the result to the main stack, and then output the result to STDOUT

TI-Basic, 11 bytes
Input should be in the form of a list, like {A B C}.
prod(Ans)/prod(sum(Ans)-2Ans

Maybe this visual will help (remember that 2s = a+b+c):

      abc                    abc                   abc                prod(Ans)
---------------- = --------------------- = ------------------- = -------------------
8(s-a)(s-b)(s-c)   (2s-2a)(2s-2b)(2s-2c)   (a+b+c)(1-2{a,b,c})   prod(sum(Ans)-2Ans)

Perl 6, 44 bytes
->\a,\b,\c{a*b*c/(b+c -a)/(a+c -b)/(a+b -c)}

Pyke, 12 bytes
1QFQsR/tt)B/

Try it here!
Well, BlueEyedBeast, you had your chance. I used a good algorithm here.

Python, 55 bytes
def f(x,y,z):s=x+y+z;return 1/((s/x-2)*(s/y-2)*(s/z-2))

Credit to Dennis. I just ported. In Python, a much-neglected language.

Forth, 83 bytes
Assumes the floating point parameters start on the floating point stack. Leaves the result on the floating point stack. Using the stack for params/returning is the standard for Forth.
: p 3 fpick ;
: T p p p ;
: f 0 s>f T f- f+ f- T f+ f- f* T f- f- f* 1/f f* f* f* ;

Try it online - contains all test cases
Uses the formula a*b*c *  1/ ( -(a+b-c) * -(b+c-a) * (a+c-b) ). Pretty much the entire program is using only the floating point stack. The exception is the 3 in 3 fpick. This program requires an interpreter that supports fpick (Ideone works, repl.it doesn't).
Explanation: slightly less golfed
\ 3 fpick takes the 3rd element (0-indexed) and pushes a copy
\ Used to copy parameters on the stack over another number 'x' ( a b c x -> a b c x a b c )
: f3p 3 fpick 3 fpick 3 fpick ;

: f                     \ define a function f
0 s>f f3p f- f+ f-      \ push a zero, copy params, compute 0-(a+b-c)
                        \ the zero allows me to copy (I need an 'x' to jump over)
f3p f+ f- f*            \ copy params and compute -(b+c-a), multiply by previous result
                        \ the negatives miraculously cancel
f3p f- f- f*            \ copy and compute (a+c-b), multiply by previous result
1/f f* f* f* ;          \ take the reciprocal and multiply by a*b*c
                        \ the result is left on the floating point stack

ised: 19 bytes
@*$1/@*{@+$1-2.*$1}

Call it as ised --l 'inputfile.txt' '@*$1/@*{@+$1-2.*$1}'
where inputfile.txt can be a file with space separated array, or - to receive from pipe/stdin.
Unicode version (same bytecount but 3 chars less):
Π$1/Π{Σ$1-2.*$1}

Unfortunately, ised wastes a lot of chars for its input argument syntax.

vba, 76
Function r(a,b,c)
s=(a+b+c)/2:r=(a*b*c)/(8*(s-a)*(s-b)*(s-c))
End Function

Call with

?r(3,4,5)

or in excel with

=r(5,12,13)

You'd save 6 bytes with @SuperJedi224 's algorithm: Public Function r(a,b,c):r=a*b*c/(b+c-a)/(a-b+c)/(a+b-c):End Function

C#, 82 bytes
void ar(double a,double b,double c)=>Console.Write(a*b*c/(b+c-a)/(a+c-b)/(a+b-c));

Usage:
ar(42, 42, 3.14);

k, 19 bytes
{(*/x)%8*/-x-+/x%2}

Evaluates right to left - Divide the list x by 2, sum the result and subtract it from original x. Neg the answer and get the product of the result and 8. The result is the denominator, the numerator is the product of the list.

Lua, 45 bytes
a,b,c=...print(a*b*c/(b+c-a)/(a+c-b)/(a+b-c))

Heavily based on the JavaScript answer.

Common Lisp, 70 bytes
(lambda(a b c &aux(s(/(+ a b c)2)))(/(* a b c)8(- s a)(- s b)(- s c)))

Math++, 51 41 bytes
?>a
?>b
?>c
a*b*c/(b+c-a)/(a-b+c)/(a+b-c)

Minkolang v0.15, 34 bytes
$n3$D++2$:3[d5i-g-$r]x**8*r**r$:N.

Try it online!
Explanation
$n                                     takes all numbers from input
                                       STACK: [a,b,c]
  3$D                                  duplicates stack 3 times
                                       STACK: [a,b,c,a,b,c,a,b,c]
     ++                                adds top two numbers in stack
                                       STACK: [a,b,c,a,b,c,a+b+c]
       2$:                             divides it by 2 (float division)
                                       STACK: [a,b,c,a,b,c,(a+b+c)/2]
                                        or can be restated as
                                       STACK: [a,b,c,a,b,c,s]
          3[        ]                  starts a for-loop (for 3 iterations)
            d                          duplicates top of stack
                                       STACK: [a,b,c,a,b,c,s,s]
             5i-g                      pushes 5 minus the index (0-indexed) and gets the
                                       value in the stack at that index
                                       STACK: [a,b,c,a,b,s,s,c]
                 -                     subtracts them
                                       STACK: [a,b,c,a,b,s,s-c]
                  $r                   swaps the top 2 stack values
                                       STACK: [a,b,c,a,b,s-c,s]
                                       Does this two more times
                                       STACK: [a,b,c,s-c,s-b,s-a,s]
                    x                  removes top of stack
                                       STACK: [a,b,c,s-c,s-b,s-a]
                     **8*              multiplies the top 3 values with 8 and each other
                                       STACK: [a,b,c,8(s-c)(s-b)(s-a)]
                         r             reverses stack
                                       STACK: [8(s-c)(s-b)(s-a),a,b,c]
                          **           multiplies top 3 values with each other
                                       STACK: [8(s-c)(s-b)(s-a),abc]
                            r$:        reverse stack and divide the values
                                       STACK: [abc/8(s-c)(s-b)(s-a)]
                               N.      outputs value as number and exit program

05AB1E, 6 bytes
O¹/ÍPz

Try it online!
Floating point inaccuracies.
Ported.
Looks an awful lot like this answer. Gawd.

CJam, 21 15 bytes
l~_:+\f/2f-:*W#

[.5 .6 .7]
Dennis's post that I ported.
Thanks to 8478 (Martin Ender) for saving me 6 bytes.

PHP, 109 97 bytes
<?$n=explode(',',$argv[1]);echo($a=$n[0])*($b=$n[1])*($c=$n[2])/($a+$b-$c)/($a+$c-$b)/($b+$c-$a);

Output:
php triangle-aspect.php "1,1,1"
1
php triangle-aspect.php "3,4,5"
1.25
php triangle-aspect.php "42,42,3.14"
6.9476062266936
php triangle-aspect.php "14,6,12"
1.575
php triangle-aspect.php "6,12,14"
1.575
php triangle-aspect.php ".5,.6,.7"
1.09375

QBIC, 35 bytes
:::?(a*b*c)/(a+b-c)/(a+c-b)/(b+c-a)

Wrapped the shortest algorithm in a QBIC boilerplate. ::: gets three command line parameters and makes the ints a, b, c out of them.

Lithp, 71 bytes
#A,B,C::((/ (* A B C) (+ B C (- 0 A)) (+ A C (- 0 B)) (+ A B (- 0 C))))

At least it's not the longest solution. But it's not all that short either.
In Lithp, arithmatic functions such as / (divide), * (multiply), + (plus) and - (subtract) take multiple arguments, and continually applies the operation to each successive argument. Therefore we only need one divide call total, one multiply and several discrete add and subtract operations. This saves quite a few bytes.
Automatic arithmatic like -A does not work, so instead we subtract A from 0 to make it negative and save on more complex operations.
Usage and ungolfed:
(
    (import "lists")
    (def f #A,B,C::(
        (/ (* A B C)
           (+ B C (- 0 A))
           (+ A C (- 0 B))
           (+ A B (- 0 C))
        )
    ))
    (print (f 1   1   1))    % Output: 1
    (print (f 3   4   5))    % Output: 1.25
    (print (f 42  42  3.14)) % Output: 6.9476062266936145
    (print (f 14  6   12))   % Output: 1.575
    (print (f 6   12  14))   % Output: 1.575
    (print (f 0.5 0.6 0.7))  % Output: 1.09375
)

J, 10 bytes
*/ .%+/-+:

Try it online!
Explanation
*/ .%+/-+:  Input: array [a b c]
        +:  Double, gets [2a, 2b, 2c]
     +/     Reduce by addition, gets the sum a+b+c
       -    Subtract, gets [-a+b+c, a-b+c, a+b-c]
   .        Inner product between [a b c] and [-a+b+c, a-b+c, a+b-c]
    %         Divide elementwise
*/            Reduce by multiplication

Clojure, 53 bytes
#(apply /(apply * %)8(for[i %](-(*(apply + %)0.5)i)))

Takes numbers as a list or a vector and applies them to various basic mathematical operations. Many bytes from repeated apply.

Racket 57 bytes
(define s(/(+ a b c)2))(/(* a b c)8(- s a)(- s b)(- s c))

Ungolfed:
(define (f a b c)
  (define s (/ (+ a b c) 2))
  (/ (* a b c)
     8
     (- s a)
     (- s b)
     (- s c)))

Testing:
(f 1 1 1)
(f 3 4 5)
(f 42 42 3.14)
(f 14 6 12)
(f 6 12 14)
(f 0.5 0.6 0.7)

Output:
1
1 1/4
6.947606226693614
1 23/40
1 23/40
1.0937499999999993


text:
Add the Fibonnaci Sequence to the Lucas Sequence
Background of Lucas Numbers
The French mathematician, Edouard Lucas (1842-1891), who gave the name to the Fibonacci Numbers, found a similar series occurs often when he was investigating Fibonacci number patterns.
The Fibonacci rule of adding the latest two to get the next is kept, but here we start from 2 and 1 (in this order) instead of 0 and 1 for the (ordinary) Fibonacci numbers.
The series, called the Lucas Numbers after him, is defined as follows: where we write its members as Ln, for Lucas:

Challenge
Input
0 < x < ∞
The input will be a positive integer starting at 0.
Output
The output must be a positive integer.
What to do?
Add the Fibonacci numbers to the Lucas numbers.
You will input the index.
The output will be the addition of the Lucas and Fibonacci numbers.
Fibonnaci formula:

F(0) = 0,
  F(1) = 1,
  F(n) = F(n-1) + F(n-2)

Lucas formula:

L(0) = 2,
  L(1) = 1,
  L(n) = L(n-1) + L(n-2)

Who wins?
Standard Code-Golf rules apply, so the shortest answer in bytes wins.
Test-cases

A(0)  = 2
  A(1)  = 2
  A(5)  = 16
  A(10) = 178
  A(19) = 13,530
  A(25) = 242,786

This is just twice the Fibonacci numbers, with a different offset. (L[n] = F[n–1] + F[n+1], so L[n] + F[n] = 2F[n+1].) I'm tempted to call it a duplicate.

@Belfield I'm not sure I follow. This is just 2F[n+1]. The Mathematica answer 2Fibonacci[#+1]& solves the challenge.

Yes, didnt see that @Lynn

C, 33 bytes
A(n){return n<2?2:A(n-1)+A(n-2);}

Why is there no int?

It’s implicit in very-old-style C.

@KritixiLithos there is no need, compiler adds it. The original K&R C didn't have it, this is just for backward compatibility.