OFFSET
1,1
COMMENTS
From David A. Corneth, Aug 10 2021: (Start)
Let k be a candidate value for a(n) and let g = gcd(c, primorial(n)) = gcd(c, A002110(n)). Let p be the largest prime that primorial(n)/g is divisible by. Then at least one of a and b is divisible by p.
So we can check multiples m of p < k and see if m*(k-m)*k is divisible by primorial(n).
If that is the case then k can be written as a + b where 0 < a,b < k and a*b*k is divisible by primorial(n) and a(n) = k when each of 1..k-1 do not have that property. (End)
From Kevin P. Thompson, Jun 30 2022 and Sep 07 2022: (Start)
n a(n) = c a b a * b * c
---- ---------- ---------- ----------- ---------------
1 2 1 1 prime(1)#
2 3 1 2 prime(2)#
3 5 2 3 prime(3)#
4 10 3 7 prime(4)#
5 21 10 11 prime(5)#
6 55 13 42 prime(6)#
7 182 17 165 prime(7)#
8 357 110 247 prime(8)#
9 1105 231 874 prime(9)#
10 2958 1463 1495 prime(10)#
11 16588 1615 14973 2 * prime(11)#
12 51243 16835 34408 4 * prime(12)#
13 106981 49335 57646 prime(13)#
14 608685 81548 527137 2 * prime(14)#
15 3003455 595034 2408421 7 * prime(15)#
16 7497910 2741301 4756609 3 * prime(16)#
17 52350909 2975429 49375480 4 * prime(17)#
18 168539462 55318167 113221295 9 * prime(18)#
19 1822961393 223726938 1599234455 83 * prime(19)#
20 3079378759 256763535 2822615224 4 * prime(20)# (End)
a(21) <= 111610913771, a(22) <= 111610913771 both via (a, b, c) = (54966571731, 56644342040, 111610913771). a(24) <= 8163073396289 via (a, b, c) = (133445799584, 8029627596705, 8163073396289). - David A. Corneth, Sep 07 2022
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
EXAMPLE
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.
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Steven M. Altschuld, Aug 09 2021
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
STATUS
approved