A271936 Commutative powers: numbers of the form a^b = b^a.
1, 4, 16, 27, 256, 3125, 46656, 823543, 16777216, 387420489, 10000000000, 285311670611, 8916100448256, 302875106592253, 11112006825558016, 437893890380859375, 18446744073709551616, 827240261886336764177, 39346408075296537575424, 1978419655660313589123979, 104857600000000000000000000
Offset: 1
Examples
4 is in the list because 2^2 = 2^2; 16 is in the list because 2^4 = 4^2. This is the only term not of the form n^n.
Crossrefs
Cf. A000312.
Programs
-
Mathematica
Union[Power @@@ Select[Tuples[Range@ 20, 2], Power @@ # == Power @@ Reverse@ # &]] (* Michael De Vlieger, Apr 17 2016 *)
-
PARI
a(n)=if(n>3,n-1,4)^(n-1) \\ M. F. Hasler, Oct 15 2019
Formula
Extensions
Edited by M. F. Hasler, Oct 15 2019
Comments