login
Numbers of the form p^q + q^p where p and q are consecutive primes.
1

%I #20 Jul 07 2024 02:57:49

%S 17,368,94932,1996813914,36314872537968,8660320497414243870,

%T 244552822542936127033092,257904243416235317958787975746,

%U 3091062959814255272215316579358416079052

%N Numbers of the form p^q + q^p where p and q are consecutive primes.

%C The first term is the only prime in the sequence.

%H Amiram Eldar, <a href="/A097499/b097499.txt">Table of n, a(n) for n = 1..75</a>

%F a(n) = A053089(n) + A078422(n). - _Amiram Eldar_, Jul 07 2024

%t lst={}; Do[p=Prime[n]; q=Prime[n+1]; a=p^q+q^p; AppendTo[lst,a],{n,4!}]; lst (* _Vladimir Joseph Stephan Orlovsky_, Aug 16 2009 *)

%t First[#]^Last[#]+Last[#]^First[#]&/@Partition[Prime[Range[10]],2,1] (* _Harvey P. Dale_, Sep 20 2011 *)

%o (PARI) f(n) = for(x=1,n,p=prime(x);q=prime(x+1);v=p^q+q^p;print1(v","))

%Y Cf. A053089, A078422.

%K nonn

%O 1,1

%A _Cino Hilliard_, Aug 24 2004

%E Offset corrected by _Amiram Eldar_, Jul 07 2024