Hello rainer
I'm not sure that I agree with your working so far - that is, if I'm understanding your requirements.
Take a look at the diagram I've attached. 
Originally Posted by
rainer
Every corner of the cube must have a line connecting it to every other corner. I am interested in the sum of the length of these lines.
In one cube the sum, if I'm not mistaken, is:

I agree with this. This sum can be thought of as:(1) The sum of the lengths of the lines lying in the plane
; PLUS
The additional lengths created when the plane
is added; which in turn is comprised of: (2) The sum of the lengths of the lines in the plane
(the same as (1)); PLUS
(3) The sum of the distances of each of the points in plane #1 from each of the points in plane #2.
This last sum, (3), can be found by taking the sum of the distances of one of the points in plane #1 - say,
- from each of the points in plane #2, and multiplying by 4 (since there are four points in plane #1, each indistinguishable from each other). This sum (3), then, is
.
Thus, when we add the totals (1), (2) and (3) together, we get:
Now, when I place another cube right smack alongside the first cube, there are now 12 planets connected by lines of force.
The sum of these lines, if I'm not mistaken, is:
If I understand you correctly, I think you are mistaken here.
When we add four more 'planets' in plane #3, we get, in addition to the distances above:(4) The sum of the lengths of the lines in plane #4; this is, of course, the same as (1) and (2); namely
. PLUS
The sum of the all the distances of
from each of the points
; which comprises:(5) the distances of the points in plane #2, which is the same as (3) above; namely
; and
(6) the distances of the points in plane #1, which is (taking the distances from
and multiplying by 4)
.
So I reckon that the total for the 12 planets is:To see the pattern being created here, break the expression above into three components:(1) for plane #1
(2) + (3) for plane #2
(4) + (5) + (6) for plane #3
and notice that (1), (2) and (4) are the same; (3) and (5) are the same; (6) is the new expression formed from the distances of the points in the first plane from the last. So we can re-arrange these as:i.e.So when the next new plane is added comprising points
, there will be additional totals equal to:(4) + (5) + (6) for the points in planes #2, #3 and #4; PLUS
(7) the distances from plane #1 to plane #4; namely
.
So this, when re-arranged, is equivalent to:... and so on. I hope you can see the pattern emerging. I realise that I'm still quite a way short of developing a formula for the total with
planes, but at least you should be able to see how to continue - if you still want to, that is!
Lastly:
AND: In this scheme of things, the cubes line up in a straight line. Would the sum of lengths be the same if the cubes were arranged differently (but always so that the xth cube is added in such a way that four of its corners line up exactly with the four corners of one of the other cubes)?
Thanks
No, I'm sure that the sum won't be the same if the cubes are not arranged in a straight line.
Grandad