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.

A335306 a(n) is the smallest composite number whose sum of distinct prime divisors is prime(n).

This page as a plain text file.
%I A335306 #14 Jun 02 2020 14:04:08
%S A335306 4,9,6,10,121,22,210,34,273,399,58,435,651,82,777,903,1645,118,885,
%T A335306 1281,142,1065,1533,1659,1335,3115,202,2037,214,2163,3729,6213,2667,
%U A335306 274,2919,298,2235,4917,3297,3423,5845,358,3801,382,7059,394,6501,7385,8229,454,4683
%N A335306 a(n) is the smallest composite number whose sum of distinct prime divisors is prime(n).
%C A335306 a(n) <= prime(n)^2 for all n, the equality applies to n = 1,2,5 since 2,3,11 are the only primes which cannot be expressed as the sum of distinct smaller primes. For n other than 1,2,5, a(n) is squarefree, and corresponds to the partition (q_1, q_2,....q_k) of n into distinct primes whose product is the least possible value compared with the product of all distinct prime partitions of n. The intersection of this sequence with A261023 corresponds to primes in A133225.
%C A335306 a(n) >= max(4,2*prime(n)-4) with equality if and only if n = 1 or n is in A107770. - _Chai Wah Wu_, Jun 01 2020
%H A335306 Chai Wah Wu, <a href="/A335306/b335306.txt">Table of n, a(n) for n = 1..10000</a>
%e A335306 a(7) = 10 since (2,5) is the only prime partition of 7 into distinct smaller parts, and 2*5 = 10. a(11) = 11^2 = 121 because the prime partitions of 11 into smaller parts are: (2,2,7), (2,2,2,5), (2,2,2,2,3), (3,3,5), (2,3,3,3), none of which have only distinct primes.
%t A335306 a[n_] := Block[{k = 4, p = Prime@ n}, While[PrimeQ[k] || p != Total[First /@ FactorInteger[k]], k++]; k]; Array[a, 50] (* _Giovanni Resta_, May 31 2020 *)
%o A335306 (PARI) a(n) = {my(p=prime(n)); forcomposite(k=1, p^2, if (vecsum(factor(k)[, 1]) == p, return(k)););} \\ _Michel Marcus_, May 31 2020
%o A335306 (Python)
%o A335306 from sympy import prime, primefactors
%o A335306 def A335306(n):
%o A335306     p = prime(n)
%o A335306     for m in range(max(4,2*p-4),p**2+1):
%o A335306         if sum(primefactors(m)) == p:
%o A335306             return m # _Chai Wah Wu_, Jun 01 2020
%Y A335306 Cf. A000040, A000586, A008472, A107770, A070215, A133225, A261023.
%K A335306 nonn
%O A335306 1,1
%A A335306 _David James Sycamore_, May 31 2020
%E A335306 More terms from _Michel Marcus_, May 31 2020