%I #30 Dec 25 2019 23:10:11
%S 1225,1540,2926,4005,5985,8856,9045,9801,11781,11935,12376,12496,
%T 12720,13041,14400,16401,17200,17226,17290,17865,18096,21528,21736,
%U 23001,23751,24220,24976,25425,26796,27000,27405,27951,29241,29316,29601,29646,30976,31465,31536
%N Numbers with a minimum of 6 polygonal roots, excluding itself.
%C The i-th k-gonal number is equal to ((k-2)*i^2-(k-4)*i)/2. Sequence lists numbers n which are k-gonal numbers with k < n in at least 6 ways. - _N. J. A. Sloane_, Jul 25 2016
%C All polygonal roots (R) can be calculated for each number by checking if any numbers less than N give an integer result from (((K - 2) * (N * N) - (K - 4) * N) / 2), where K is increased until the numbers returned are larger than our N.
%H Chai Wah Wu, <a href="/A275256/b275256.txt">Table of n, a(n) for n = 1..10000</a>
%e For n = 5 we have a(5) = 5985. 5985 has 6 polygonal roots, since 5985 is the 45th octagonal number, the 35th dodecagonal number, the 18th 41-gonal number, the 9th 168-gonal number, the fifth 600-gonal number, and the third 1996-gonal number.
%o (C#)
%o List<BigInteger> CurrentBases = new List<BigInteger>();
%o List<BigInteger> CurrentNexts = new List<BigInteger>();
%o private int interesting2NumberPolygons;
%o public int Interesting2NumberPolygons
%o {
%o get
%o {
%o return interesting2NumberPolygons;
%o }
%o set
%o {
%o interesting2NumberPolygons = value;
%o OnPropertyChanged("Interesting2NumberPolygons");
%o }
%o }
%o private BigInteger interesting2Number;
%o public BigInteger Interesting2Number
%o {
%o get
%o {
%o return interesting2Number;
%o }
%o set
%o {
%o interesting2Number = value;
%o OnPropertyChanged("Interesting2Number");
%o }
%o }
%o private string fileLocation = "C:/NumberGen/";
%o public string FileLocation
%o {
%o get
%o {
%o return fileLocation;
%o }
%o set
%o {
%o fileLocation = value;
%o Properties.Settings.Default.LastLocation = value;
%o Properties.Settings.Default.Save();
%o OnPropertyChanged("FileLocation");
%o }
%o }
%o private void FindAllIntegers()
%o {
%o Interesting2Number = 0;
%o Interesting2NumberPolygons = 0;
%o CurrentBases = new List<BigInteger>();
%o CurrentNexts = new List<BigInteger>();
%o BigInteger i = 0;
%o int j = 0;
%o while(true)
%o {
%o bool Finished = false;
%o int k = 3;
%o while (!Finished)
%o {
%o if (k >= CurrentBases.Count)
%o {
%o CurrentBases.Add(1);
%o CurrentNexts.Add(1);
%o }
%o else
%o {
%o if(CurrentNexts[k] < i)
%o {
%o CurrentBases[k]++;
%o CurrentNexts[k] = PolygonalNumber(CurrentBases[k], k);
%o }
%o if(CurrentBases[k] <= 3 && CurrentNexts[k] >= i)
%o {
%o Finished = true;
%o }
%o k++;
%o }
%o }
%o if(CurrentNexts.FindAll(Nexts => Nexts == i).Count >= 6)
%o {
%o List<int> Results = Enumerable.Range(0, CurrentNexts.Count)
%o .Where(ind => CurrentNexts[ind] == i)
%o .ToList();
%o string Row = "";
%o Row += i + "," + Results.Count;
%o foreach(int Result in Results)
%o {
%o Row += "," + Result + "," + CurrentBases[Result];
%o }
%o using (StreamWriter ResultsWriter = File.AppendText(@FileLocation + "Interesting2Numbers.dat"))
%o {
%o ResultsWriter.WriteLine(Row);
%o }
%o if(Results.Count >= Interesting2NumberPolygons)
%o {
%o Interesting2NumberPolygons = Results.Count;
%o Interesting2Number = i;
%o }
%o }
%o if (i % 100 == 0)
%o {
%o Worker.ReportProgress(0, i);
%o using (StreamWriter DropCatcher = File.CreateText(@FileLocation + "DropCatcher.dat"))
%o {
%o DropCatcher.WriteLine(i);
%o }
%o }
%o j++;
%o i++;
%o }
%o }
%o private BigInteger PolygonalNumber(BigInteger N, BigInteger Sides)
%o {
%o if (Sides < 3)
%o {
%o return BigInteger.Zero;
%o }
%o //TRI: (N^2+N)/2
%o else if (Sides == 3)
%o {
%o return ((N * N + N) / 2);
%o }
%o //POLY: ((S-2)N^2-(S-4)N)/2
%o else
%o {
%o return (((Sides - 2) * (N * N) - (Sides - 4) * N) / 2);
%o }
%o }
%o (Python)
%o A275256_list = []
%o for m in range(2,10**5):
%o n, c = 3, 0
%o while (n*(n+1)) <= 2*m:
%o if not 2*(n*(n-2) + m) % (n*(n - 1)):
%o c += 1
%o if c >= 6:
%o break
%o n += 1
%o if c >= 6:
%o A275256_list.append(m) # _Chai Wah Wu_, Jul 25 2016
%K nonn
%O 1,1
%A _Matthew Parker_, Jul 21 2016
%E a(22)-a(39) from _Chai Wah Wu_, Jul 24 2016