%I #24 Feb 19 2026 19:18:11
%S -1,-1,18307,112105843,1793060726797,10089795754966163,
%T 5480903094928438857619,81872643259787173972610143,
%U 4316742844900502599568730017541461,17761888924321463357789870295452355955736467
%N Least prime representable as a sum of n prime powers using each of the first 2n primes exactly once as bases and exponents, and -1 if no such number exists.
%C If a(n) != -1, a(n) >= A392412(n).
%C a(3) = A392412(3) and a(9) = A392412(9).
%e a(3) = 7^5 + 11^3 + 13^2 = 18307 is prime.
%e a(4) = 2^19 + 5^11 + 13^7 + 17^3 = 112105843 is prime.
%e a(5) = 13^11 + 17^2 + 19^7 + 23^5 + 29^3 = 1793060726797 is prime.
%e a(6) = 2^31 + 3^29 + 17^13 + 19^11 + 23^5 + 37^7 = 10089795754966163 is prime.
%e a(7) = 19^17 + 23^13 + 29^11 + 31^3 + 37^2 + 41^5 + 43^7 = 5480903094928438857619 is prime.
%e a(8) = 2^41 + 23^19 + 29^17 + 31^13 + 37^11 + 43^7 + 47^5 + 53^3 = 81872643259787173972610143 is prime.
%e a(9) = 29^23 + 31^19 + 37^17 + 41^13 + 43^11 + 47^7 + 53^5 + 59^3 + 61^2 = 4316742844900502599568730017541461 is prime.
%e a(10) = 2^67 + 31^29 + 37^23 + 41^19 + 43^17 + 47^13 + 53^5 + 59^7 + 61^11 + 71^3 = 17761888924321463357789870295452355955736467 is prime.
%o (PARI) a(n) =my(u = primes(2*n),p2 = prime(2*n),pexp = prime(n+1),mmax = n * p2^pexp,candidats = List(),m = mmax);forsubset([2*n, n], s,my(sv = Vec(s),v = vector(n, i, u[sv[i]]),w = Vecrev(setminus(Set(u), Set(v))));forperm(#w, p,my(pp = Vec(p),x = sum(i=1, n, v[i]^w[pp[i]]));if (x > mmax, next);if (ispseudoprime(x),listput(candidats, x);if (x < m,m = x))));if (#candidats,return(m));return(-1) \\ code appropriate for n <= 9.
%Y Cf. A053810, A392412.
%K sign,more
%O 1,3
%A _Jean-Marc Rebert_, Feb 03 2026
%E a(10) from _Sean A. Irvine_, Feb 19 2026