Python Forum
Help with a query - to show possible formulas
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with a query - to show possible formulas
#2
With a generalized solution, since you don't know if one of the numbers is 1, you need to find all of the permutations of the numbers, allowing repeats, of n numbers. Once you have the permutations, see how many add up to n.

Potential is a lot of permutations. If you have 3 numbers as in your example, and n=4 as in the example, you will have 3 1 digit options, 3 squared 2 digit options, 3 cubed 3 digit options, and 3 to the 4th power 4 digit options. Total is 3+9+27+81=120 combinations. Most will not add up to 4.
Reply


Messages In This Thread
RE: Help with a query - to show possible formulas - by jefsummers - Nov-02-2020, 12:18 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Updating formulas in Excel - best solution MasterOfDestr 4 887 Mar-11-2024, 01:02 PM
Last Post: MasterOfDestr
  plotting based on the results of mathematical formulas Timur 1 444 Feb-08-2024, 07:22 PM
Last Post: Gribouillis
  PIL Image im.show() no show! Pedroski55 2 1,081 Sep-12-2022, 10:19 PM
Last Post: Pedroski55
  PIL Image im.show() no show! Pedroski55 6 5,438 Feb-08-2022, 06:32 AM
Last Post: Pedroski55
  openpyxl insert list with formulas Irv1n 1 1,645 Sep-16-2021, 08:10 AM
Last Post: Irv1n
  Show graphs in matplotlib from a sql query? ScaleMan 1 1,959 Feb-06-2020, 05:47 PM
Last Post: ScaleMan
  How to ignore formulas when reading excel file SriMekala 3 6,717 Aug-16-2019, 04:04 PM
Last Post: buran
  python 3 math formulas where to use () Python101 1 2,388 Jun-09-2019, 09:54 PM
Last Post: micseydel
  Business formulas more help needed!! jy0013 4 3,536 Aug-29-2017, 12:21 AM
Last Post: jy0013

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020