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.

A159685 Maximal product of distinct primes whose sum is <= n.

This page as a plain text file.
%I A159685 #42 Sep 04 2019 17:36:07
%S A159685 1,2,3,3,6,6,10,15,15,30,30,42,42,70,105,105,210,210,210,210,330,330,
%T A159685 462,462,770,1155,1155,2310,2310,2730,2730,2730,2730,4290,4290,6006,
%U A159685 6006,10010,15015,15015,30030,30030,30030,30030,39270,39270,46410,46410
%N A159685 Maximal product of distinct primes whose sum is <= n.
%C A159685 Equivalently, largest value of the LCM of the partitions of n into primes.
%C A159685 Equivalently, maximal number of times a permutation of length n, with prime cycle lengths, can operate on itself before returning to the initial permutation.
%C A159685 If the requirement that primes are distinct is dropped, this becomes A000792. - _Charles R Greathouse IV_, Jul 10 2012
%H A159685 Alois P. Heinz, <a href="/A159685/b159685.txt">Table of n, a(n) for n = 1..10000</a>
%H A159685 M. Deléglise and J.-L. Nicolas, <a href="http://arxiv.org/abs/1207.0603">Maximal product of primes whose sum is bounded</a>, arXiv 1207.0603 [math.NT] (2012).
%H A159685 Marc Deléglise and Jean-Louis Nicolas, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/Deleglise/deleglise3.html">On the Largest Product of Primes with Bounded Sum</a>, Journal of Integer Sequences, Vol. 18 (2015), Article 15.2.8.
%H A159685 Marc Deléglise, Jean-Louis Nicolas, <a href="https://hal.archives-ouvertes.fr/hal-02177338/">The Landau function and the Riemann hypothesis</a>, Univ. Lyon (France, 2019).
%F A159685 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.
%e A159685 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.
%e A159685 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
%p A159685 with(numtheory):
%p A159685 b:= proc(n,i) option remember; local p; p:= ithprime(max(i,1));
%p A159685       `if`(n=0, 1, `if`(i<1, 0,
%p A159685        max(b(n, i-1), `if`(p>n, 0, b(n-p, i-1)*p))))
%p A159685     end:
%p A159685 a:= proc(n) option remember;
%p A159685      `if`(n=0, 1, max(b(n, pi(n)), a(n-1)))
%p A159685     end:
%p A159685 seq(a(n), n=1..100);  # _Alois P. Heinz_, Jun 04 2012
%t A159685 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}]
%t A159685 (* Second program: *)
%t A159685 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 *)
%Y A159685 Cf. A077011, A000793, A034891.
%K A159685 nonn
%O A159685 1,2
%A A159685 _Wouter Meeussen_, Apr 19 2009, May 02 2009