OFFSET
4,1
LINKS
David A. Corneth, Table of n, a(n) for n = 4..507
EXAMPLE
For exponent sum n = 3 no prime exists, (3*5*7-1)/2 = 52 is composite.
a(4) = 157: (3^2*5*7-1)/2 is the least prime with exponent sum n = 4.
a(5) = 787: there are 6 ways to choose the exponents of 3, 5, 7 with sum n = 5, i.e., [3,1,1], [1,3,1], [1,1,3], [2,2,1], [2,1,2], [1,2,2]. (3^3*5*7-1)/2 = 472 is composite, but (3^2*5^2*7-1)/2 = 787 is prime.
MATHEMATICA
Table[Min[Select[(3^#[[1]] 5^#[[2]] 7^#[[3]]-1)/2&/@Flatten[Permutations/@ IntegerPartitions[n, {3}], 1], PrimeQ]], {n, 30}]/.\[Infinity]->Nothing (* Harvey P. Dale, Oct 29 2020 *)
PROG
(PARI) seqpp(np0, np, add, lim) = {for(m=np0, lim, my(pmin=oo); forpart(V=m, forperm(np, P, my(p=(prod(k=1, np, prime(k+1)^V[P[k]])+add)/2); if(isprime(p), pmin=min(pmin, p))), [1, m-np+1], [np, np]); print1(pmin, ", "))};
seqpp(4, 3, -1, 27)
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Aug 29 2020
STATUS
approved