Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

#Mathematica, 53 bytes

Mathematica, 53 bytes

Min[Plus@@@Table[$($+1)/2,{,ドル#+1}]~FrobeniusSolve~#]&

This code is very slow. If you want to test this function, use the following version instead:

Min[Plus@@@Table[$($+1)/2,{,ドル√#+1}]~FrobeniusSolve~#]&

Try it on Wolfram Sandbox

###Explanation

Explanation

Min[Plus@@@Table[$($+1)/2,{,ドル#+1}]~FrobeniusSolve~#]& (* input: n *)
 Table[$($+1)/2,{,ドル#+1}] (* Generate the first n triangle numbers *)
 ~FrobeniusSolve~# (* Generate a Frobenius equation from the *)
 (* triangle numbers and find all solutions. *)
 Plus@@@ (* Sum each solution set *)
Min (* Fetch the smallest value *)

#Mathematica, 53 bytes

Min[Plus@@@Table[$($+1)/2,{,ドル#+1}]~FrobeniusSolve~#]&

This code is very slow. If you want to test this function, use the following version instead:

Min[Plus@@@Table[$($+1)/2,{,ドル√#+1}]~FrobeniusSolve~#]&

Try it on Wolfram Sandbox

###Explanation

Min[Plus@@@Table[$($+1)/2,{,ドル#+1}]~FrobeniusSolve~#]& (* input: n *)
 Table[$($+1)/2,{,ドル#+1}] (* Generate the first n triangle numbers *)
 ~FrobeniusSolve~# (* Generate a Frobenius equation from the *)
 (* triangle numbers and find all solutions. *)
 Plus@@@ (* Sum each solution set *)
Min (* Fetch the smallest value *)

Mathematica, 53 bytes

Min[Plus@@@Table[$($+1)/2,{,ドル#+1}]~FrobeniusSolve~#]&

This code is very slow. If you want to test this function, use the following version instead:

Min[Plus@@@Table[$($+1)/2,{,ドル√#+1}]~FrobeniusSolve~#]&

Try it on Wolfram Sandbox

Explanation

Min[Plus@@@Table[$($+1)/2,{,ドル#+1}]~FrobeniusSolve~#]& (* input: n *)
 Table[$($+1)/2,{,ドル#+1}] (* Generate the first n triangle numbers *)
 ~FrobeniusSolve~# (* Generate a Frobenius equation from the *)
 (* triangle numbers and find all solutions. *)
 Plus@@@ (* Sum each solution set *)
Min (* Fetch the smallest value *)
added 592 characters in body
Source Link
JungHwan Min
  • 14k
  • 3
  • 24
  • 73

#Mathematica, 53 bytes

Min[Plus@@@Table[$($+1)/2,{,ドル#+1}]~FrobeniusSolve~#]&

This code is very slow. If you want to test this function, use the following version instead:

Min[Plus@@@Table[$($+1)/2,{,ドル√#+1}]~FrobeniusSolve~#]&

Try it on Wolfram Sandbox

###Explanation

Min[Plus@@@Table[$($+1)/2,{,ドル#+1}]~FrobeniusSolve~#]& (* input: n *)
 Table[$($+1)/2,{,ドル#+1}] (* Generate the first n triangle numbers *)
 ~FrobeniusSolve~# (* Generate a Frobenius equation from the *)
 (* triangle numbers and find all solutions. *)
 Plus@@@ (* Sum each solution set *)
Min (* Fetch the smallest value *)

#Mathematica, 53 bytes

Min[Plus@@@Table[$($+1)/2,{,ドル#+1}]~FrobeniusSolve~#]&

#Mathematica, 53 bytes

Min[Plus@@@Table[$($+1)/2,{,ドル#+1}]~FrobeniusSolve~#]&

This code is very slow. If you want to test this function, use the following version instead:

Min[Plus@@@Table[$($+1)/2,{,ドル√#+1}]~FrobeniusSolve~#]&

Try it on Wolfram Sandbox

###Explanation

Min[Plus@@@Table[$($+1)/2,{,ドル#+1}]~FrobeniusSolve~#]& (* input: n *)
 Table[$($+1)/2,{,ドル#+1}] (* Generate the first n triangle numbers *)
 ~FrobeniusSolve~# (* Generate a Frobenius equation from the *)
 (* triangle numbers and find all solutions. *)
 Plus@@@ (* Sum each solution set *)
Min (* Fetch the smallest value *)
Source Link
JungHwan Min
  • 14k
  • 3
  • 24
  • 73

#Mathematica, 53 bytes

Min[Plus@@@Table[$($+1)/2,{,ドル#+1}]~FrobeniusSolve~#]&

AltStyle によって変換されたページ (->オリジナル) /