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.
%I A182987 #87 Jan 22 2024 06:19:50 %S A182987 2,3,5,11,29,97,347,1429,6229,29873,160879,895681,5448239,34885673, %T A182987 228759799,1568299433,11417382973,87698582693,684947829299, %U A182987 5606539600699,47241542381273,403631914511993,3587558929043927,32684217334524347,308342289648328511,3036819365023723883 %N A182987 Least a + b such that a*b = A002110(n), the product of the first n primes, where a, b are positive integers. %C A182987 Original definition (not applicable for n = 0 and 1, but equivalent for n >= 2): %C A182987 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. %C A182987 Also: Least integer such that a(n)^2 - 4*A002110(n) is a square. - _David Broadhurst_, Sep 20 2011 %C A182987 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 %H A182987 Max Alekseyev, <a href="/A182987/b182987.txt">Table of n, a(n) for n = 0..70</a> %H A182987 David Broadhurst, <a href="http://groups.yahoo.com/group/primenumbers/message/23128">Re: adding to prime number [primes in A182987]</a>, primenumbers group, Sep 20 2011. %H A182987 David Broadhurst and others, <a href="/A182987/a182987.txt">Adding to prime number</a>, digest of 28 messages in primenumbers Yahoo group, Sep 19, 2011 - Sep 22, 2011. %F A182987 a(n) = A060795(n) + A060796(n). - _M. F. Hasler_, Sep 20 2011 %F A182987 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 %e A182987 a(3) = 11 = min{ 2*3 + 5 = 11, 2*5 + 3 = 13, 3*5 + 2 = 17 } %e A182987 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. %t A182987 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 *) %o A182987 (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 %o A182987 (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 %o A182987 (Python) %o A182987 def A182987(n): # becomes slow for n >= 28, but not slower than memory-hungry %o A182987 # sum(divisors(primorial(n))[2**(n-1)-1:2**(n-1)+1]) if n else 2 %o A182987 "Compute A182987(n) = sum of the two central divisors of primorial(n)." %o A182987 if n < 2: return n+2 %o A182987 from math import isqrt # = A000196 %o A182987 from sympy import primorial # = A002110 %o A182987 from sympy.ntheory.primetest import is_square # = A010052 %o A182987 m = primorial(n)*4; a = isqrt(m)|1 ### ceil(sqrt(m))**2 < m for n = 26..27 !! %o A182987 while True: %o A182987 if is_square(a*a - m): return a %o A182987 a += 2 %o A182987 # _M. F. Hasler_, Mar 21 2022 %Y A182987 Cf. A173631, A060795, A060796, A061060, A127180. %Y A182987 Cf. A000196 (integer sqrt), A002110 (primorial), A010052 (is_square). %K A182987 nonn %O A182987 0,1 %A A182987 _Risto Kauppila_, Feb 06 2011 %E A182987 First term and example corrected, as empty sets have product 1, by _Phil Carmody_, Sep 20 2011 %E A182987 Simpler definition and extension to n = 0 by _M. F. Hasler_, Sep 20 2011 %E A182987 b-file extended to a(59) with results from R. Gerbicz (cf. 2nd Broadhurst link) by _M. F. Hasler_, Mar 22 2022 %E A182987 a(60)-a(70) in b-file from _Max Alekseyev_, Apr 20 2022