Clash of Code - Unknown solution

I had this
Input ____________Output
7 _______________49
81 ______________243
357911 __________25411681
32768 ___________65536
819628286980801 _25408476896404831

Does anyone know how to solve it?

Thank you,
Redox15

I know how to solve it. Think of numbers raised to a power.

you search through each geometrical progression and return whichever number follows the input when you find it. :slight_smile:

  • let ratio = 2
  • while (1) do {
    • let number = ratio
    • while (number <= input) do {
      • if (number = input) return number * ratio
      • number = number * ratio
    • }
    • ratio = ratio + 1
  • }

as simple as it gets :slight_smile: