login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = (prime(n+1)+1)^(prime(n+1)-1) - (prime(n)-1)^(prime(n)+1).
1

%I #15 Sep 08 2024 16:23:00

%S 15,1280,258048,61915684608,55693912375296,121438247178129702912,

%T 257421633517130354786304,2315500753239971319979258675200,

%U 228767924384358907355717734220022985785344,1401261602585169235166028950498857285425561600

%N a(n) = (prime(n+1)+1)^(prime(n+1)-1) - (prime(n)-1)^(prime(n)+1).

%H G. C. Greubel, <a href="/A166330/b166330.txt">Table of n, a(n) for n = 1..50</a>

%e a(2) = 6^4 - 2^4 = 1280. a(3) = 8^6 - 4^6 = 258048.

%t lst={};Do[n=Prime[k];m=Prime[k+1];a=(m+1)^(m-1)-(n-1)^(n+1);AppendTo[lst, a],{k,16}];lst

%t (#[[2]]+1)^(#[[2]]-1)-(#[[1]]-1)^(#[[1]]+1)&/@Partition[Prime[Range[20]],2,1] (* _Harvey P. Dale_, Sep 08 2024 *)

%o (Magma) [(NthPrime(n+1)+1)^(NthPrime(n+1)-1)-(NthPrime(n)-1)^ (NthPrime(n)+1):n in [1..10]]; // _Vincenzo Librandi_, May 10 2016

%K nonn

%O 1,1

%A _Vladimir Joseph Stephan Orlovsky_, Oct 11 2009

%E Definition rephrased by _R. J. Mathar_, Oct 14 2009