g | x | w | all
Bytes Lang Time Link
032Wolfram Language Mathematica220307T174238Zatt
056Factor + math.combinatorics math.unicode220307T020135Zchunes
046R220309T095106ZXi'a
045Python 3.8 prerelease220307T112358Zsolid.py
045Haskell220307T225631ZAZTECCO
008Husk220307T115220ZDominic
021Charcoal220307T112537ZNeil
030Retina 0.8.2220307T111343ZNeil
00805AB1E220307T084143ZKevin Cr
038JavaScript Node.js220307T014906Ztsh
107C# Visual C# Interactive Compiler220307T034330ZAndrew B
010Pyth220307T014413Zsinvec
006Vyxal220307T005913Zlyxal
007Jelly220307T010758ZUnrelate

Wolfram Language (Mathematica), 39 37 32 bytes

<|Tr@#->#&/@Subsets@Range@#|>@#&

Try it online!

Returns the partition in increasing order. For decreasing order, +5 bytes: Try it online!

Factor + math.combinatorics math.unicode, 56 bytes

[ dup 1 [a,b] all-subsets [ Σ = ] with filter infimum ]

Try it online!

R, 46 bytes

f=function(n)if(n)c(p<-round((2*n)^.5),f(n-p))

Try it online!

Reproducing tsh resolution in R.

Python 3.8 (pre-release), 45 bytes

Inspired by the answer of user tsh. -9 bytes thanks to user att.

lambda n:n*[p:=round((2*n)**.5)]and[p]+f(n-p)

Try it online!

Haskell, 45 bytes

f 0=[]
f n=[a:f(n-a)|a<-[1..n],[a]>f(n-a)]!!0

Try it online!

f(n) searches, starting from a = 1 , a list to append to a :

Such list is f( n-a ).

Husk, 8 bytes

↔ḟo=¹ΣṖḣ

Try it online!

Husk has no 'integer partitions' built-in, but since the array must be strictly decreasing (no duplicates) we can build it by selecting a subset of n..1 that sums to n.
If we do it the other way around (selecting from 1..n), then the first 'hit' is already the right set, and we just need to reverse the order of its elements to make it decreasing.

       ḣ  # start with range 1..input:
      Ṗ   # get all subsequences;
↔ḟo       # now get the first element that satisfies:
     Σ    #   its sum
   =¹     #   equals the input;
↔         # and finally reverse it.

Charcoal, 21 bytes

NθWLΦθ‹Σ…·⁰κθ«≧⁻ιθ⟦Iι

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

Nθ

Input n.

WLΦθ‹Σ…·⁰κθ«

Count how many triangular numbers starting from 0 are less than n and repeat until this becomes zero.

≧⁻ιθ

Subtract that number from n.

⟦Iι

Output that number on its own line.

Retina 0.8.2, 30 bytes

.+
$*
(?=(\G1|1\1)*1)1\1?
$.&¶

Try it online! Link includes test cases. Explanation:

.+
$*

Convert to unary.

(?=(\G1|1\1)*1)1\1?

Repeatedly match the smallest number whose triangular number exceeds the remainder, calculated as one more than the largest number whose triangular number is strictly less than the input.

$.&¶

Convert to decimal and list each number on its own line.

05AB1E, 8 bytes

Læí.ΔOQ

Try it online or verify all test cases.

Explanation:

L        # Push a sum in the range [1, (implicit) input]
 æ       # Pop and get the powerset of this
         # (which is already in the correct order)
  í      # Reverse each inner list to make the inner lists in decreasing order
   .Δ    # Keep the first inner list that's truthy for:
     O   #  Where the sum
      Q  #  Equals the (implicit) input
         # (after which this found result is output implicitly)

JavaScript (Node.js), 38 bytes

f=n=>n?[p=.5+(n+n)**.5|0,...f(n-p)]:[]

Try it online!

That is, find out the smallest \$x\$ where

$$ \sum_{i=1}^{x}i= \frac{(x+1)\cdot x}{2}\ge n $$

which is

$$ x=\left\lceil\frac{\sqrt{8n+1}-1}{2}\right\rceil $$

As att and Bubbler suggested in the comments. This formula could be simplified into

$$ x=\left\lfloor\sqrt{2n}+\frac{1}{2}\right\rfloor $$

C# (Visual C# Interactive Compiler), 107 bytes

x=>{var y=new List<int>();while(x!=0){y.Add((int)Math.Ceiling((Math.Sqrt(x*8+1)-1)/2));x-=y[^1];}return y;}

Try it online!

I think i can save a few bytes somewhere here, but i can't quite figure it out. Haskell tricks with unrolling multiple arguments comes to mind but it's been too long since i golfed properly to remember it (Lost access to old account when school email expired feelsbad). feel free to improve this and take the points. Uses the same approach as the Javascript answer, but without the JS list comprehension tricks. In other words, find the lowest value such that the sum from 1 to n is greater than x, push that to the list, subtract n from x and repeat until x is 0.

From my early tests, using Floor and the third formula is the same number of characters in C#, though i couldn't really get it working.

This can save a bunch of characters by taking an empty list as a parameter and editing/filling it in place (removes the need for the "new" and the return, effectively making the outer function a one-liner. Further, it could be made recursive, which removes the while loop, though idk if that actually saves anything), but i'd guess that's blocked by loophole rules.

making the list a list of double will save 2 bytes but the results are then doubles, and this raises the possibility of floating point nonsense and potentially printing out 3.0000000004 or something similar.

Edit: Uses the new Index object and it's ^ operator, introduced in C# 8.0. Not normally a fan b/c it makes the code more obtuse, but it's perfect for code golf. ^1 is shorthand for the last element in the list.

Pyth, 19 16 13 11 10 bytes

hf{ITS_M./

Try it online!

Vyxal, 7 6 bytes

Ṅ~Þush

Try it Online!

-1 thanks to EmanresuA reminding me that ~ exists.

Explained

Ṅ~Þush
Ṅ      # From all integer partitions of the input,
 ~     # Keep only partitions where:
  Þu   #   The uniqufied version equals the partition (this makes sure that only partitions without duplicates are kept)
    sh # Sort the list and take the first item

Jelly, 7 bytes

ŒṗUQƑƇṂ

Try it online!

The only real difference from lyxal's Vyxal solution is that Jelly's integer partitions builtin generates them in nondecreasing order, requiring them to be reversed before finding the minimum.

ŒṗU        Nonincreasing integer partitions.
     Ƈ     Filter to those which
    Ƒ      are unchanged by
   Q       uniquification.
      Ṃ    Take the minimum.