ACC's Math Conjecture

Assume P, N and X are positive integers greater than 1.The only possible value for X in the below expression is 2.
I can't prove the conjecture but I can write some code that validates it for large P's and N's, and no matter how far it goes, the only possible integer value for X is 2. Take a look at some of the results (P;N;X). Code is down below, cheers, ACC.

2;2;2
4;4;2
16;8;2
32;10;2
256;16;2
1024;20;2
2048;22;2
8192;26;2
32768;30;2
65536;32;2

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SQRootPower
{
 class Program
 {
  static void Main(string[] args)
  {
   int MAXN = 2000000;
   int MAXP = 1000;
   for (int n = 2; n <= MAXN; n++)
   {
    for (int p = 2; p <= MAXP; p++)
    {
     double result = _SQRootPower(n, p);
     if (Math.Abs((int)result - result) <= 0.00000001)
     {
      Console.WriteLine("{0};{1};{2}", n, p, result);
     }
    }
   }
  }

  static double _SQRootPower(int n, int p)
  {
   int MAXLIMIT = 100;

   double result = Math.Pow(n, 1.0 / p);
   for (int i = 0; i < MAXLIMIT; i++)
   {
    result = Math.Pow(Math.Pow(n, 1.0 / p), result);
   }

   return result;
  }
 }
}

Comments

Popular posts from this blog

Golang vs. C#: performance characteristics (simple case study)

Claude vs ChatGPT: A Coder's Perspective on LLM Performance

ProjectEuler Problem 719 (some hints, but no spoilers)