7 added 229 characters in body
source | link

Jelly, 16 bytes

³‘X’¤þ`ṂƤ€Z$⁺ṄS⁺

Try it online!


I made a terrible mistake. No idea why no-one noticed that.

Full program. Prints the array and the sum.

Not uniform, of course. Return all-zero most of the time.

Verification for side length 2.

Jelly, 16 bytes

³‘X’¤þ`ṂƤ€Z$⁺ṄS⁺

Try it online!


I made a terrible mistake. No idea why no-one noticed that.

Full program. Prints the array and the sum.

Not uniform, of course. Return all-zero most of the time.

Jelly, 16 bytes

³‘X’¤þ`ṂƤ€Z$⁺ṄS⁺

Try it online!


I made a terrible mistake. No idea why no-one noticed that.

Full program. Prints the array and the sum.

Not uniform, of course. Return all-zero most of the time.

Verification for side length 2.

6 deleted 9 characters in body
source | link

Jelly, 16 bytes

⁸‘X’¤þ`ṂƤ€Z$⁺ṄS⁺³‘X’¤þ`ṂƤ€Z$⁺ṄS⁺

Try it online!Try it online!


Sorry, I forgot the "and the sum" part..I made a terrible mistake. Fixed now at +3 bytesNo idea why no-one noticed that.

Full program. Prints the array and the sum.

Not uniform, of course. Return all-zero most of the time.

Jelly, 16 bytes

⁸‘X’¤þ`ṂƤ€Z$⁺ṄS⁺

Try it online!


Sorry, I forgot the "and the sum" part... Fixed now at +3 bytes.

Full program. Prints the array and the sum.

Not uniform, of course. Return all-zero most of the time.

Jelly, 16 bytes

³‘X’¤þ`ṂƤ€Z$⁺ṄS⁺

Try it online!


I made a terrible mistake. No idea why no-one noticed that.

Full program. Prints the array and the sum.

Not uniform, of course. Return all-zero most of the time.

5 The `⁸` was for the nilad.
source | link

Jelly, 16 bytes

⁸‘X’¤þ`ṂƤ€Z$⁺ṄS⁺

Try it online!


Sorry, I forgot the "and the sum" part... Fixed now at +3 bytes.

Full program. Prints the array and the sum.

Not uniform, of course. Return all-zero most of the time. 

Jelly, 16 bytes

⁸‘X’¤þ`ṂƤ€Z$⁺ṄS⁺

Try it online!


Sorry, I forgot the "and the sum" part... Fixed now at +3 bytes.

Full program. Prints the array and the sum.

Not uniform, of course. Return all-zero most of the time.

Jelly, 16 bytes

⁸‘X’¤þ`ṂƤ€Z$⁺ṄS⁺

Try it online!


Sorry, I forgot the "and the sum" part... Fixed now at +3 bytes.

Full program. Prints the array and the sum.

Not uniform, of course. Return all-zero most of the time. 

4 Rollback to Revision 2
source | link
3 added 47 characters in body
source | link
2 added 131 characters in body
source | link
1
source | link