login
A182987
Least a + b such that a*b = A002110(n), the product of the first n primes, where a, b are positive integers.
7
2, 3, 5, 11, 29, 97, 347, 1429, 6229, 29873, 160879, 895681, 5448239, 34885673, 228759799, 1568299433, 11417382973, 87698582693, 684947829299, 5606539600699, 47241542381273, 403631914511993, 3587558929043927, 32684217334524347, 308342289648328511, 3036819365023723883
OFFSET
0,1
COMMENTS
Original definition (not applicable for n = 0 and 1, but equivalent for n >= 2):
Let p(S) be product of integers in S. a(n) is minimum of p(S_1) + p(S_2) over all partitions of first n primes into sets S_1 and S_2.
Also: Least integer such that a(n)^2 - 4*A002110(n) is a square. - David Broadhurst, Sep 20 2011
The integers a,b are the two median divisors of primorial(n), a = A060795(n) = A060775(A002110(n)) and b = A060796(n) = A033677(A002110(n)). (For n = 0, a = b = 1 of course.) - M. F. Hasler, Sep 20 2011
LINKS
David Broadhurst, Re: adding to prime number [primes in A182987], primenumbers group, Sep 20 2011.
David Broadhurst and others, Adding to prime number, digest of 28 messages in primenumbers Yahoo group, Sep 19, 2011 - Sep 22, 2011.
FORMULA
a(n) = A060795(n) + A060796(n). - M. F. Hasler, Sep 20 2011
Conjecture: Limit_{N->oo} (Sum_{n=1..N} log(a(n)-2*sqrt(prime(n)#))) / (Sum_{n=1..N} prime(n)) = 2/e - 1/2 (i.e., A135002 - 1/2). - Alain Rocchelli, Nov 30 2023
EXAMPLE
a(3) = 11 = min{ 2*3 + 5 = 11, 2*5 + 3 = 13, 3*5 + 2 = 17 }
Or, a(3) = 11 = min { 1+30, 2+15, 3+10, 5+6 } because A002110(3) = 2*3*5 = 30 = 2*15 = 3*10 = 5*6.
MATHEMATICA
a[0] = 2; a[n_] := Module[{m = Times @@ Prime[Range[n]]}, For[an = 2 Floor[Sqrt[m]] + 1, an <= m + 2, an += 2, If[IntegerQ[Sqrt[an^2 - 4 m]], Return[an]]]]; Table[an = a[n]; Print[an]; an, {n, 0, 25}] (* Jean-François Alcover, Oct 20 2016, adapted from PARI *)
PROG
(PARI) A182987(n)={if(n, vecsum(divisors(vecprod(primes(n)))[2^(n-1)..2^(n-1)+1]), 2)} \\ Needs stack size >= 2^(n+6). - M. F. Hasler, Sep 20 2011, edited Mar 24 2022
(PARI) A182987(n)={ n||return(2); my(m=prod(k=1, n, prime(k))); forstep(a=2*sqrtint(m)+1, m+2, 2, issquare(a^2-4*m) & return(a)) } \\ Slow for n >= 28, but needs not much memory. - M. F. Hasler, following an idea from David Broadhurst, Sep 20 2011
(Python)
def A182987(n): # becomes slow for n >= 28, but not slower than memory-hungry
# sum(divisors(primorial(n))[2**(n-1)-1:2**(n-1)+1]) if n else 2
"Compute A182987(n) = sum of the two central divisors of primorial(n)."
if n < 2: return n+2
from math import isqrt # = A000196
from sympy import primorial # = A002110
from sympy.ntheory.primetest import is_square # = A010052
m = primorial(n)*4; a = isqrt(m)|1 ### ceil(sqrt(m))**2 < m for n = 26..27 !!
while True:
if is_square(a*a - m): return a
a += 2
# M. F. Hasler, Mar 21 2022
CROSSREFS
Cf. A000196 (integer sqrt), A002110 (primorial), A010052 (is_square).
Sequence in context: A346052 A190197 A173631 * A334814 A364802 A360815
KEYWORD
nonn
AUTHOR
Risto Kauppila, Feb 06 2011
EXTENSIONS
First term and example corrected, as empty sets have product 1, by Phil Carmody, Sep 20 2011
Simpler definition and extension to n = 0 by M. F. Hasler, Sep 20 2011
b-file extended to a(59) with results from R. Gerbicz (cf. 2nd Broadhurst link) by M. F. Hasler, Mar 22 2022
a(60)-a(70) in b-file from Max Alekseyev, Apr 20 2022
STATUS
approved