cp's OEIS Frontend

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.

A057339 Largest of the most frequently occurring numbers in 1-to-n multiplication cube.

This page as a plain text file.
%I A057339 #20 Jun 02 2022 10:25:55
%S A057339 1,4,6,12,20,24,24,48,72,120,120,120,120,168,120,240,240,360,360,360,
%T A057339 360,360,360,720,720,720,720,1008,1008,720,720,720,720,720,1680,2520,
%U A057339 2520,2520,2520,1440,1440,2520,2520,2520,2520,2520,2520,5040,5040,5040
%N A057339 Largest of the most frequently occurring numbers in 1-to-n multiplication cube.
%H A057339 Branden Aldridge, <a href="/A057339/b057339.txt">Table of n, a(n) for n = 1..500</a>
%e A057339 M(n) is the array in which m(x,y,z)=x*y*z for x = 1 to n, y = 1 to n and z = 1 to n. In M(7), the most frequently occurring numbers are 12 and 24, each occurring 15 times. The largest of these numbers is 24, so a(7) = 24.
%o A057339 (Java)
%o A057339 public class LargestMultCube {
%o A057339     static int high, highestFrequency = 0;
%o A057339     static int[] counters;
%o A057339     public static void main(String[] args) {
%o A057339         int max=500;
%o A057339         counters = new int[max*max*max+1];
%o A057339         for(int outer=1; outer<=max; outer++) {
%o A057339             tally(outer*outer*outer, 1);
%o A057339             for(int middle=outer-1; middle>=1; middle--) {
%o A057339                 tally(outer*outer*middle, 3); tally(outer*middle*middle, 3);
%o A057339                 for(int inner=middle-1; inner>=1; inner--) {
%o A057339                     tally(outer*middle*inner, 6); } }
%o A057339             System.out.println(outer+" "+high); } }
%o A057339     private static void tally(int number, int repeatFactor) {
%o A057339         counters[number] += repeatFactor;
%o A057339         if(counters[number] >= highestFrequency) {
%o A057339             if (counters[number] == highestFrequency)
%o A057339                 if (number > high) high = number;
%o A057339             if (counters[number] > highestFrequency) {
%o A057339                 highestFrequency = counters[number]; high = number; } } } }
%o A057339 // _Branden Aldridge_, Apr 15 2022
%Y A057339 Cf. A057143, A057338, A057342, A057345.
%K A057339 nonn
%O A057339 1,2
%A A057339 _Neil Fernandez_, Aug 28 2000
%E A057339 More terms from _David W. Wilson_, Aug 28 2001