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.

Showing 1-3 of 3 results.

A309859 Irregular table read by rows where row(n) partitions n into distinct integers with maximal product.

Original entry on oeis.org

1, 2, 3, 4, 3, 2, 4, 2, 4, 3, 5, 3, 4, 3, 2, 5, 3, 2, 5, 4, 2, 5, 4, 3, 6, 4, 3, 5, 4, 3, 2, 6, 4, 3, 2, 6, 5, 3, 2, 6, 5, 4, 2, 6, 5, 4, 3, 7, 5, 4, 3, 6, 5, 4, 3, 2, 7, 5, 4, 3, 2, 7, 6, 4, 3, 2, 7, 6, 5, 3, 2, 7, 6, 5, 4, 2, 7, 6, 5, 4, 3, 8, 6, 5, 4, 3, 7, 6, 5, 4, 3, 2, 8, 6, 5, 4, 3, 2, 8, 7, 5, 4, 3, 2, 8, 7, 6, 4, 3, 2
Offset: 1

Views

Author

Jean-François Alcover, Aug 20 2019

Keywords

Comments

All of the inequalities in the proof [of the maximum formula by Doslic] are strict inequalities (> instead of >=). So the partition which is found to be optimal is not just >= any other, it is >. And hence it is unique. - Franklin T. Adams-Watters [Copied from the SeqFan discussion by J.-F. Alcover, Sep 19 2019]

Examples

			The partitions of 10 into distinct addenda are {{10}, {9, 1}, {8, 2}, {7, 3}, {7, 2, 1}, {6, 4}, {6, 3, 1}, {5, 4, 1}, {5, 3, 2}, {4, 3, 2, 1}}, then the maximal product is attained with 5*3*2 = 30, so row(10) is {5, 3, 2}.
Table begins:
1
2
3
4
3, 2
4, 2
4, 3
5, 3
4, 3, 2
5, 3, 2
...
		

Crossrefs

Cf. A034893 (row products).

Programs

  • Mathematica
    $RecursionLimit = 2000;
    b[n_, i_] := b[n, i] = If[i (i + 1)/2 < n, 0, If[n == 0, 1, Max[b[n, i - 1], i b[n - i, Min[n - i, i - 1]]]]];
    A034893[n_] := b[n, n];
    sol[n_, pro_] := Do[If[pro == Product[i, {i, j, m}]/k && n == (m - j + 1)*(j + m)/2 - k , Return[ {j, k, m}]], {j, 2, 3}, {m, Floor[Sqrt[2 n]], Ceiling[Sqrt[2 n]] + 1}, {k, j + 1, m}];
    row[1] = {1}; row[4] = {4}; row[n_] := Module[{j, k, m}, {j, k, m} = sol[n, A034893[n]]; DeleteCases[Range[j, m], k] // Reverse];
    Array[row, 100] // Flatten (* Jean-François Alcover, Sep 14 2019, after Alois P. Heinz in A034893 *)

Extensions

b-file extended to 1000 rows by Jean-François Alcover, Sep 14 2019

A121451 Maximum product over partitions into parts of the form 3k+2.

Original entry on oeis.org

0, 2, 0, 4, 5, 8, 10, 16, 20, 32, 40, 64, 80, 128, 160, 256, 320, 512, 640, 1024, 1280, 2048, 2560, 4096, 5120, 8192, 10240, 16384, 20480, 32768, 40960, 65536, 81920, 131072, 163840, 262144, 327680, 524288, 655360, 1048576
Offset: 1

Views

Author

John W. Layman, Apr 26 2007

Keywords

Comments

With the exception of the first three terms of this sequence and the first two terms of A094958, these two sequences appear to be identical.

Examples

			The only partition of 7 into parts of the form 3k+2 is {5,2}, so the maximum product is a(7)=10.
		

Crossrefs

Formula

Conjecture. a(1)=a(3)=0, otherwise a(n)=2^(n/2) if n is even and a(n)=5*2^((n-5)/2) if n is odd. (This has been verified for up to n=40.)

A128939 Maximal product over partitions of n into parts of the form 3k+1.

Original entry on oeis.org

1, 1, 1, 4, 4, 4, 7, 16, 16, 16, 28, 64, 64, 64, 112, 256, 256, 256, 448, 1024, 1024, 1024, 1792, 4096, 4096, 4096, 7168, 16384, 16384, 16384, 28672, 65536, 65536, 65536, 114688, 262144, 262144, 262144, 458752, 1048576
Offset: 1

Views

Author

John W. Layman, Apr 27 2007

Keywords

Crossrefs

Formula

Conjecture. a(n)=1 if n<4, else a(n)=4^[n/4] if n<>4m+3, else a(n)=7*4^([n/4]-1), where [...] denotes the Floor function. (This has been verified up to n=40.)
Showing 1-3 of 3 results.