%I #21 Dec 23 2024 14:53:42
%S 17,37,8521,21601,229,106921,205081,289278699121,815401,1398841,
%T 8274567108488469403564696641244659777685186165444353190460129729940809291805549571887038803603334751361,
%U 3122281,2029
%N The smallest prime of the form (prime(n+1)^k + prime(n+2)^k)/2 for positive integer k.
%C These numbers are all of the form 4n+1.
%C k needs to be a power of two. The sequence of the associated k is 2, 2, 4, 4, 2, 4, 4, 8, 4, 4, 64, 4, 2, 0, 32, 4, 4, 4, 0, 0, 0, 8, 0, 0, 8, 4, 8, 4, 2, 4, 0, 32, 0, 2, 8, 2, ... where 0 is inserted if a(n) does not appear to exist. - _Robert G. Wilson v_, Aug 02 2018
%C It seems likely that a(14) does not exist. No k <= 2^15 works. - _Don Reble_ and _Robert Israel_, Aug 02 2018
%H Zak Seidov, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/pipermail/seqfan/2006-September/010432.html">query about (3^n + 5^n)/2 is prime</a> in seqfan 9/10/06.
%p A121710 := proc(n)
%p local p1,p2,k,a ;
%p p1 := ithprime(n+1) ;
%p p2 := nextprime(p1) ;
%p for k from 1 do
%p a := (p1^k+p2^k)/2 ;
%p if type(a,'integer') and isprime(a) then
%p return a;
%p end if;
%p end do:
%p end proc:
%p for n from 1 do
%p printf("%d %d\n",n,A121710(n)) ;
%p end do: # _R. J. Mathar_, Aug 02 2018
%o (PARI) g(n,a,b) = for(x=1,n,y=(a^x+b^x)/2;if(ispseudoprime(y),print(a","b","x","y)))
%K nonn
%O 1,1
%A _Cino Hilliard_, Sep 10 2006
%E Name and Data corrected by _Robert Israel_, Aug 02 2018