A346970 Smallest c which can be split into positive integers a,b with a+b=c, such that a*b*c is divisible by each of the first n primes.
2, 3, 5, 10, 21, 55, 182, 357, 1105, 2958, 16588, 51243, 106981, 608685, 3003455, 7497910, 52350909, 168539462, 1822961393, 3079378759
Offset: 1
Examples
a(4) = 10 via 3+7=10 and 3*7*10 = 210 which is divisible by each of the first 4 primes, namely 2, 3, 5 and 7. a(7) = 182 via 17+165=182. 17*165*182 = 510510 which is divisible by each of the first 7 primes, namely 2, 3, ..., 13, 17.
Programs
-
Mathematica
Do[Monitor[k=1; While[!Or@@And@@@(IntegerQ/@(#/Prime@Range@n)&/@Times@@@(Join[{k}, #]&/@IntegerPartitions[k, {2}])), k++]; Print@k,k], {n, 20}] (* Giorgos Kalogeropoulos, Aug 16 2021 *)
-
PARI
a(n) = { if(n <= 3, return(prime(n))); P = vecprod(primes(n)); for(i = sqrtnint(P, 3) + 1, oo, if(iscanforA(n, i), return(i) ) ) } iscanforA(n, k) = { my(g = gcd(k, P), step); if(k^2*g < P, return(0)); step = hpf(P/g); forstep(i = step, k, step, if((i*(k-i)*k)%P == 0, return(1) ) ); 0 } hpf(n) = my(f = factor(n)); f[#f~, 1] \\ David A. Corneth, Aug 10 2021
-
Python
from sympy import primorial, primefactors, gcd def A346970(n): c, ps = 2, primorial(n) while True: m = ps//gcd(ps,c) if m == 1: return c p = max(primefactors(m)) for a in range(p,c,p): if a*(c-a) % m == 0: return c c += 1 # Chai Wah Wu, Oct 13 2021
Formula
a(2k) <= Product_{i=1..k} p_2i, a(2k+1) <= Product_{i=0..k} p_{2i+1} where p_i is the i-th prime. - Chai Wah Wu, Oct 14 2021
a(n) >= (4*A002110(n))^(1/3), strengthening David's result above. This inequality is strict for n > 1. - Charles R Greathouse IV, Jun 30 2022
Extensions
a(12)-a(16) from David A. Corneth, Aug 10 2021
a(17)-a(18) from Kevin P. Thompson, Jun 30 2022
a(19)-a(20) from Kevin P. Thompson, Sep 07 2022
a(20) corrected by David A. Corneth, Sep 07 2022
Comments