[Community Puzzle] Crazy List

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @Caduchon,validated by @_yel_p,@Timinator and @Gthev.
If you have any issues, feel free to ping them.

I don’t want to spoil it for myself by looking at the contribution, but can somebody give me a hint on how to get started with this contribution? I don’t see any constraints, so it seems to me there are endless possibilities. How can I find out that it is 5 crazy operators in some case (and which those operators are), and not 95 crazy operators or one million?

Try algebra to generalise the situation.

I’m drawing a blank. How can I generalize a sequence of operations that can either be
2 + a * b - c or 2 - a * b - c * d + e * f + g * h - i * j?

Take the second example in the statement for example:

Start with 2 and apply operators +1, x3, -1, x2 at each iteration will give the crazy list

2 16 100 604 3628 …

Try applying the operators to a variable (say p) instead of any numbers in the given series, i.e. (((p + 1) x 3) - 1) x 2. What do you find? Then, think about whether the finding can be generalised for any list of operators.

1 Like

Ah thanks for bringing me back to primary school - this helped :grinning:.

Spoiler for people as stupid as me

I simply did not expect that any of those operations can always be rewritten to a form of a*p+b - giving me only two unknowns rather than a crazy amount.

1 Like