A159685 Maximal product of distinct primes whose sum is <= n.
1, 2, 3, 3, 6, 6, 10, 15, 15, 30, 30, 42, 42, 70, 105, 105, 210, 210, 210, 210, 330, 330, 462, 462, 770, 1155, 1155, 2310, 2310, 2730, 2730, 2730, 2730, 4290, 4290, 6006, 6006, 10010, 15015, 15015, 30030, 30030, 30030, 30030, 39270, 39270, 46410, 46410
Offset: 1
Keywords
Examples
A permutation of length 10 can have prime cycle lengths of 2+3+5; so when repeatedly applied to itself, can produce at most 2*3*5 different permutations. The products of distinct primes whose sum is <= 10 are 1 (the empty product), 2, 3, 5, 7, 2*3=6, 2*5=10, 2*7=14, 3*5=15, 3*7=21, and 2*3*5=30. The maximum is 30, so a(10) = 30. - _Jonathan Sondow_, Jul 06 2012
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..10000
- M. Deléglise and J.-L. Nicolas, Maximal product of primes whose sum is bounded, arXiv 1207.0603 [math.NT] (2012).
- Marc Deléglise and Jean-Louis Nicolas, On the Largest Product of Primes with Bounded Sum, Journal of Integer Sequences, Vol. 18 (2015), Article 15.2.8.
- Marc Deléglise, Jean-Louis Nicolas, The Landau function and the Riemann hypothesis, Univ. Lyon (France, 2019).
Programs
-
Maple
with(numtheory): b:= proc(n,i) option remember; local p; p:= ithprime(max(i,1)); `if`(n=0, 1, `if`(i<1, 0, max(b(n, i-1), `if`(p>n, 0, b(n-p, i-1)*p)))) end: a:= proc(n) option remember; `if`(n=0, 1, max(b(n, pi(n)), a(n-1))) end: seq(a(n), n=1..100); # Alois P. Heinz, Jun 04 2012
-
Mathematica
temp=Series[Times @@ (1/(1-q[ # ] x^#)& /@ Prepend[Prime /@ Range[24],1]),{x,0,Prime[24]}]; Table[Max[List @@ Expand[Coefficient[temp,x^n]]/. q[a_]^_ ->q[a] /.q->Identity],{n,64}] (* Second program: *) b[n_, i_] := b[n, i] = Module[{p = Prime[Max[i, 1]]}, If[n == 0, 1, If[i < 1, 0, Max[b[n, i-1], If[p > n, 0, b[n-p, i-1]*p]]]]]; a[n_] := a[n] = If[n == 0, 1, Max[b[n, PrimePi[n]], a[n-1]]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Nov 05 2013, translated from Alois P. Heinz's Maple program *)
Formula
a(n) <= A002809(n) and A008475(a(n)) <= n (see (1.2) and (1.4) in Deléglise-Nicolas 2012). - Jonathan Sondow, Jul 04 2012.
Comments