login
a(n) is the least prime of the form (3^r*5^s*7^t - 1)/2, r, s, t > 0, r + s + t = n.
2

%I #12 Oct 29 2020 18:30:23

%S 157,787,3307,19687,12757,347287,267907,3125587,2870437,5166787,

%T 25833937,590736037,232505437,2712563437,13562817187,3766588087,

%U 52313723437,726579492187,332213069317,847482319687,4237411598437,115351760179687,88985643567187,68646067894687

%N a(n) is the least prime of the form (3^r*5^s*7^t - 1)/2, r, s, t > 0, r + s + t = n.

%H David A. Corneth, <a href="/A337427/b337427.txt">Table of n, a(n) for n = 4..507</a>

%e For exponent sum n = 3 no prime exists, (3*5*7-1)/2 = 52 is composite.

%e a(4) = 157: (3^2*5*7-1)/2 is the least prime with exponent sum n = 4.

%e 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.

%t 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 *)

%o (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,", "))};

%o seqpp(4,3,-1,27)

%Y Cf. A337423, A337425, A337428.

%K nonn

%O 4,1

%A _Hugo Pfoertner_, Aug 29 2020