login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A057339 Largest of the most frequently occurring numbers in 1-to-n multiplication cube. 4
1, 4, 6, 12, 20, 24, 24, 48, 72, 120, 120, 120, 120, 168, 120, 240, 240, 360, 360, 360, 360, 360, 360, 720, 720, 720, 720, 1008, 1008, 720, 720, 720, 720, 720, 1680, 2520, 2520, 2520, 2520, 1440, 1440, 2520, 2520, 2520, 2520, 2520, 2520, 5040, 5040, 5040 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
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.
PROG
(Java)
public class LargestMultCube {
static int high, highestFrequency = 0;
static int[] counters;
public static void main(String[] args) {
int max=500;
counters = new int[max*max*max+1];
for(int outer=1; outer<=max; outer++) {
tally(outer*outer*outer, 1);
for(int middle=outer-1; middle>=1; middle--) {
tally(outer*outer*middle, 3); tally(outer*middle*middle, 3);
for(int inner=middle-1; inner>=1; inner--) {
tally(outer*middle*inner, 6); } }
System.out.println(outer+" "+high); } }
private static void tally(int number, int repeatFactor) {
counters[number] += repeatFactor;
if(counters[number] >= highestFrequency) {
if (counters[number] == highestFrequency)
if (number > high) high = number;
if (counters[number] > highestFrequency) {
highestFrequency = counters[number]; high = number; } } } }
// Branden Aldridge, Apr 15 2022
CROSSREFS
Sequence in context: A063607 A306270 A045956 * A336552 A160856 A019445
KEYWORD
nonn
AUTHOR
Neil Fernandez, Aug 28 2000
EXTENSIONS
More terms from David W. Wilson, Aug 28 2001
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)