ACC's Math Conjecture II

Another one for posterity:


If N=31622777, then N^3 = 31622777796632428411433, and that's the largest N that has such a property.

I have tested this conjecture up to N's 100-digits long, and it holds true. Used the code below.
If you can find a larger N, let me know.
Thanks, ACC.

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

namespace SquareStart
{
 class Program
 {
  static void Main(string[] args)
  {
            int power = Int32.Parse(args[0]);
   BigInteger factor = 1;
   BigInteger MAX = 1000000;
   BigInteger count = 0;
   for (BigInteger n = 1; ; n++, count++)
   {
    if (n % 10 != 0 && (BigInteger.Pow(n, power)).ToString().StartsWith(n.ToString()))
    {
     Console.WriteLine("{0} => {1}", n, BigInteger.Pow(n, power));
     BigInteger temp = n;
     n = 10 * n - factor;
     if (n <= temp)
     {
      n = temp;
     }
     else
     {
      factor *= 10;
     }
     count = 0;
    }
    if (count >= MAX)
    {
     n *= 10;
     count = 0;
     Console.Write("{0}-", n.ToString().Length);
    }
   }
  }
 }
}

Comments

  1. Well, it's easy to find at least one number with arbitrary length for which this property holds true - any power of 10 :) Here is my napkin-style Python script that prints all such numbers and makes it very obvious that any power of 10 always fits the bill :)

    for i in range(10**1000):
    if str(i ** 3).startswith(str(i)):
    print(i, i**3)

    0 0
    1 1
    10 1000
    32 32768
    100 1000000
    1000 1000000000
    10000 1000000000000
    31623 31623446801367
    100000 1000000000000000
    316228 31622846796684352
    1000000 1000000000000000000
    3162278 31622786796633508952
    10000000 1000000000000000000000
    31622777 31622777796632428411433
    100000000 1000000000000000000000000

    ReplyDelete
  2. Wie wär's mit 316227766017? 31622776601^3=31622776601732413360022154029126
    oder 316227766016838^3=31622776601683813360022129111349862592192472

    ReplyDelete
  3. Miracle173: I guess the problem's been solved :) Good job!!!

    ReplyDelete
  4. einfach die Ziffern von 10^0.5 nehmen. Diese Wurzel kann man z.B. hier (https://www.ttmath.org/online_calculator) berechnen. Dann findet man z.B.

    316227766016837933199889354443271853371955513932521682685750485279259443863923822134424810837930029518734728415284005514854885603045388001469051959670015390334492165717925994065915015347411333948412408531692957709047157646104436925787906203780860994182837171154840632855299911859682456420332696160469131433612894979189027^3 = 31622776601683793319988935444327185337195551393252168268575048527925944386392382213442481083793002951873472841528400551485488560304538800146905195967001539033449216571792599406591501534741133394841240853169295770904715764610443692578790620378086099418283717115484063285529991185968245642033269616046913143361289497918902769409127746476424372998772236274428390726337300950439377124613306560523609736286431935375164091955633839082543107707994928448405943427119419511840442079309120216733015546947758644146966479379031266044124861476885589992602101810611562999852833023107122345377814217819153038915286931921854519604269125481207165479973860200095144367860768079216739417320940438348635868789195186885141279651353875619216981657040907404475657787785785828175923925174846559126447745292267007331960857567949514398539137781848120134336213196224279280093116123725767418602571473583480804020163991852839938793882772549236048118970510860691652596864884863920503887362683

    ReplyDelete

Post a Comment

Popular posts from this blog

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

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

The Power Sum, a recursive problem by HackerRank