This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A275256 #30 Dec 25 2019 23:10:11 %S A275256 1225,1540,2926,4005,5985,8856,9045,9801,11781,11935,12376,12496, %T A275256 12720,13041,14400,16401,17200,17226,17290,17865,18096,21528,21736, %U A275256 23001,23751,24220,24976,25425,26796,27000,27405,27951,29241,29316,29601,29646,30976,31465,31536 %N A275256 Numbers with a minimum of 6 polygonal roots, excluding itself. %C A275256 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 A275256 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 A275256 Chai Wah Wu, <a href="/A275256/b275256.txt">Table of n, a(n) for n = 1..10000</a> %e A275256 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 A275256 (C#) %o A275256 List<BigInteger> CurrentBases = new List<BigInteger>(); %o A275256 List<BigInteger> CurrentNexts = new List<BigInteger>(); %o A275256 private int interesting2NumberPolygons; %o A275256 public int Interesting2NumberPolygons %o A275256 { %o A275256 get %o A275256 { %o A275256 return interesting2NumberPolygons; %o A275256 } %o A275256 set %o A275256 { %o A275256 interesting2NumberPolygons = value; %o A275256 OnPropertyChanged("Interesting2NumberPolygons"); %o A275256 } %o A275256 } %o A275256 private BigInteger interesting2Number; %o A275256 public BigInteger Interesting2Number %o A275256 { %o A275256 get %o A275256 { %o A275256 return interesting2Number; %o A275256 } %o A275256 set %o A275256 { %o A275256 interesting2Number = value; %o A275256 OnPropertyChanged("Interesting2Number"); %o A275256 } %o A275256 } %o A275256 private string fileLocation = "C:/NumberGen/"; %o A275256 public string FileLocation %o A275256 { %o A275256 get %o A275256 { %o A275256 return fileLocation; %o A275256 } %o A275256 set %o A275256 { %o A275256 fileLocation = value; %o A275256 Properties.Settings.Default.LastLocation = value; %o A275256 Properties.Settings.Default.Save(); %o A275256 OnPropertyChanged("FileLocation"); %o A275256 } %o A275256 } %o A275256 private void FindAllIntegers() %o A275256 { %o A275256 Interesting2Number = 0; %o A275256 Interesting2NumberPolygons = 0; %o A275256 CurrentBases = new List<BigInteger>(); %o A275256 CurrentNexts = new List<BigInteger>(); %o A275256 BigInteger i = 0; %o A275256 int j = 0; %o A275256 while(true) %o A275256 { %o A275256 bool Finished = false; %o A275256 int k = 3; %o A275256 while (!Finished) %o A275256 { %o A275256 if (k >= CurrentBases.Count) %o A275256 { %o A275256 CurrentBases.Add(1); %o A275256 CurrentNexts.Add(1); %o A275256 } %o A275256 else %o A275256 { %o A275256 if(CurrentNexts[k] < i) %o A275256 { %o A275256 CurrentBases[k]++; %o A275256 CurrentNexts[k] = PolygonalNumber(CurrentBases[k], k); %o A275256 } %o A275256 if(CurrentBases[k] <= 3 && CurrentNexts[k] >= i) %o A275256 { %o A275256 Finished = true; %o A275256 } %o A275256 k++; %o A275256 } %o A275256 } %o A275256 if(CurrentNexts.FindAll(Nexts => Nexts == i).Count >= 6) %o A275256 { %o A275256 List<int> Results = Enumerable.Range(0, CurrentNexts.Count) %o A275256 .Where(ind => CurrentNexts[ind] == i) %o A275256 .ToList(); %o A275256 string Row = ""; %o A275256 Row += i + "," + Results.Count; %o A275256 foreach(int Result in Results) %o A275256 { %o A275256 Row += "," + Result + "," + CurrentBases[Result]; %o A275256 } %o A275256 using (StreamWriter ResultsWriter = File.AppendText(@FileLocation + "Interesting2Numbers.dat")) %o A275256 { %o A275256 ResultsWriter.WriteLine(Row); %o A275256 } %o A275256 if(Results.Count >= Interesting2NumberPolygons) %o A275256 { %o A275256 Interesting2NumberPolygons = Results.Count; %o A275256 Interesting2Number = i; %o A275256 } %o A275256 } %o A275256 if (i % 100 == 0) %o A275256 { %o A275256 Worker.ReportProgress(0, i); %o A275256 using (StreamWriter DropCatcher = File.CreateText(@FileLocation + "DropCatcher.dat")) %o A275256 { %o A275256 DropCatcher.WriteLine(i); %o A275256 } %o A275256 } %o A275256 j++; %o A275256 i++; %o A275256 } %o A275256 } %o A275256 private BigInteger PolygonalNumber(BigInteger N, BigInteger Sides) %o A275256 { %o A275256 if (Sides < 3) %o A275256 { %o A275256 return BigInteger.Zero; %o A275256 } %o A275256 //TRI: (N^2+N)/2 %o A275256 else if (Sides == 3) %o A275256 { %o A275256 return ((N * N + N) / 2); %o A275256 } %o A275256 //POLY: ((S-2)N^2-(S-4)N)/2 %o A275256 else %o A275256 { %o A275256 return (((Sides - 2) * (N * N) - (Sides - 4) * N) / 2); %o A275256 } %o A275256 } %o A275256 (Python) %o A275256 A275256_list = [] %o A275256 for m in range(2,10**5): %o A275256 n, c = 3, 0 %o A275256 while (n*(n+1)) <= 2*m: %o A275256 if not 2*(n*(n-2) + m) % (n*(n - 1)): %o A275256 c += 1 %o A275256 if c >= 6: %o A275256 break %o A275256 n += 1 %o A275256 if c >= 6: %o A275256 A275256_list.append(m) # _Chai Wah Wu_, Jul 25 2016 %K A275256 nonn %O A275256 1,1 %A A275256 _Matthew Parker_, Jul 21 2016 %E A275256 a(22)-a(39) from _Chai Wah Wu_, Jul 24 2016