OFFSET
1,1
COMMENTS
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.
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
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
EXAMPLE
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.
MATHEMATICA
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 *)
PROG
(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
(Python)
from sympy import prime, primefactors
def A335306(n):
p = prime(n)
for m in range(max(4, 2*p-4), p**2+1):
if sum(primefactors(m)) == p:
return m # Chai Wah Wu, Jun 01 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, May 31 2020
EXTENSIONS
More terms from Michel Marcus, May 31 2020
STATUS
approved