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.

A379978 a(n) is the smallest positive integer which can be represented as the sum of its prime divisors in exactly n ways, or -1 if no such integer exists.

This page as a plain text file.
%I A379978 #34 Jan 10 2025 20:47:21
%S A379978 1,2,6,12,18,24,50,36,98,48,54,100,242,72,338,196,225,96,578,108,722,
%T A379978 30,441,484,1058,144,250,676,42,392,1682,-1,1922,192,1089,1156,1225,
%U A379978 216,2738,1444,1521,400,66,70,3698,968,675,2116,4418,78,686,500,2601,1352,5618,324,3025,784,3249,3364,6962,105,7442,102,1323,110,4225
%N A379978 a(n) is the smallest positive integer which can be represented as the sum of its prime divisors in exactly n ways, or -1 if no such integer exists.
%C A379978 a(31) > 26000, if it is not -1. - _Michael S. Branicky_, Jan 08 2025
%C A379978 From _Yifan Xie_, Jan 09 2025: (Start)
%C A379978 a(31) = -1. Proof:
%C A379978 Lemma: n can be partitioned into a and b (gcd(a, b)=1) if n>ab-a-b. Proof: Using Bezout's theorem we can get n = xa+yb for integers x and y. Substitute x'=x-kb for x and y'=y+ka for y such that 0 <= x' <= b-1, then y'>-1, so y'>=0, a valid partition.
%C A379978 Suppose that a(31)=n has 3 distinct prime divisors p<q<r, and a valid partition is n=ap+bq+cr. Using the lemma, ap+bq has at least one partition if n-cr>pq-p-q. so c<(n+p+q-pq)/r, hence there are at least (n+p+q-pq)/r choices for c, but there are at most 31 partitions, thus 31r >= n+p-q(p-1) >= n-r*(p-1) >= r*(pq+1-p), p*(q-1) <= 30, and r <= 30 since there are r+1 partitions of pqr into p and q. Enumerate all possibilities of p, q, r and only (p,q,r) = (2,3,5) and (2,3,7) give no more than 31 partitions. But in these cases, if n=pqr, there are fewer than 31 partitions; if n >= 2pqr, there are more than 31 partitions.
%C A379978 If a(31) = n has exactly 2 prime divisors p, q, it's easy to see that n has n/(p*q) + 1 partitions into p and q. therefore n = 30*p*q, a contradiction. If a(31) = n is prime, n has only 1 partition. (End)
%F A379978 If a(n) > 0, A066882(a(n)) = n.
%e A379978 a(3) = 12: 12 = 2 + 2 + 2 + 2 + 2 + 2 = 2 + 2 + 2 + 3 + 3 = 3 + 3 + 3 + 3.
%o A379978 (Python) # uses code/imports in A066882
%o A379978 from itertools import count, islice
%o A379978 def agen(limit='float'): # generator of terms
%o A379978     r, n = dict(), 0
%o A379978     for k in count(1):
%o A379978         v = A066882(k)
%o A379978         if v not in r:
%o A379978             r[v] = k
%o A379978             while n in r:
%o A379978                 yield r[n]
%o A379978                 n += 1
%o A379978         if k == limit:
%o A379978             yield from (r[i] if i in r else -1 for i in range(n, max(r)+1))
%o A379978             return
%o A379978 print(list(islice(agen(), 31))) # _Michael S. Branicky_, Jan 08 2025
%Y A379978 Cf. A066882, A096356.
%K A379978 sign
%O A379978 0,2
%A A379978 _Ilya Gutkovskiy_, Jan 07 2025
%E A379978 a(31)-a(53) from _Yifan Xie_, Jan 09 2025
%E A379978 a(54)-a(66) from _Alois P. Heinz_, Jan 10 2025