cp's OEIS Frontend

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.

A346971 Smallest c which can be split into positive parts a and b with a+b=c, such that the divisors of a,b,c cover all numbers up to n.

This page as a plain text file.
%I A346971 #64 Oct 22 2021 21:23:11
%S A346971 2,3,4,8,10,12,24,45,54,88,120,182,182,360,540,1326,1326,3990,5040,
%T A346971 5040,5040,9282,9282,25200,25200,65208,65208,118800,118800,651456,
%U A346971 651456,651456,651456,651456,651456,2314200,2314200,2314200,2314200,16365396,16365396
%N A346971 Smallest c which can be split into positive parts a and b with a+b=c, such that the divisors of a,b,c cover all numbers up to n.
%C A346971 a(37)..a(40) <= 2314200 via 1062048 + 1252152 = 2314200. - _David A. Corneth_, Aug 11 2021
%F A346971 a(n) <= A003418(n) and a(n) <= a(n+1). - _David A. Corneth_, Aug 11 2021
%F A346971 a(n) >= (4*A003418(n))^(1/3). - _Charles R Greathouse IV_, Oct 14 2021
%e A346971 a(5) = 8, 3+5=8, divisors of 3, 5, and 8 are {1,3}, {1,5}, and {1,2,4,8}, which covers all of {1,2,3,4,5}.
%e A346971 a(9) = 45, 21+24=45, divisors of 21, 24, and 45 are {1,3,7,21}, {1,2,3,4,6,8,12,24}, and {1,3,5,9,15,45}, which covers all of {1,2,3,4,5,6,7,8,9}.
%t A346971 a[1]=1;a[n_]:=(k=1;While[Length@Select[Union@*Flatten@*Divisors/@(Join[{k},#]&/@Rest@IntegerPartitions[k,2]),SubsetQ[#,Range@n]&]<1,k++];k);Array[a,16] (* _Giorgos Kalogeropoulos_, Aug 13 2021 *)
%o A346971 (Python)
%o A346971 from sympy import divisors
%o A346971 from itertools import count
%o A346971 def cond(a, b, c, n):
%o A346971     return set(divisors(a)+divisors(b)+divisors(c)) >= set(range(1, n+1))
%o A346971 def a(n):
%o A346971     if n == 1: return 1
%o A346971     for c in count(1):
%o A346971         for a in range(1, c//2+1):
%o A346971             if cond(a, c-a, c, n): return c
%o A346971 print([a(n) for n in range(1, 17)]) # _Michael S. Branicky_, Aug 13 2021
%o A346971 (Python)
%o A346971 def A346971(n):
%o A346971     c, nlist = 1, list(range(1,n+1))
%o A346971     while True:
%o A346971         mlist = [m for m in nlist if c % m]
%o A346971         if len(mlist) == 0: return c
%o A346971         p = max(mlist)
%o A346971         for a in range(p,c,p):
%o A346971             for m in mlist:
%o A346971                 if a % m and (c-a) % m:
%o A346971                     break
%o A346971             else:
%o A346971                 return c
%o A346971         c += 1 # _Chai Wah Wu_, Oct 13 2021
%Y A346971 Cf. A003418, A027750, A346970.
%K A346971 nonn,more
%O A346971 2,1
%A A346971 _Steven M. Altschuld_, Aug 09 2021
%E A346971 a(16)-a(26) from _Alois P. Heinz_, Aug 09 2021
%E A346971 a(27)-a(36) from _David A. Corneth_, Aug 11 2021
%E A346971 a(37)-a(40) from _Chai Wah Wu_, Oct 13 2021
%E A346971 a(41)-a(42) from _Chai Wah Wu_, Oct 21 2021