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
LINKS
Max Alekseyev, Table of n, a(n) for n = 0..70
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
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
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