login
A239055
Numbers n such that the equation Sd(n^k) = Sd(k^n) is satisfied for a k < n, where Sd(x) is the sum of the digits of x.
1
4, 10, 12, 15, 16, 18, 28, 39, 40, 52, 58, 63, 69, 72, 82, 87, 93, 100, 106, 120, 123, 126, 128, 138, 144, 186, 195, 212, 213, 214, 222, 225, 249, 263, 273, 274, 282, 286, 292, 294, 313, 321, 322, 339, 347, 375, 381, 386, 388, 400, 402, 426, 432, 436, 448, 454
OFFSET
1,1
COMMENTS
Obviously if k=n then Sd(n^k)=Sd(k^n). The sequence lists the numbers n whose minimum k that satisfies the equation is less than n.
LINKS
EXAMPLE
For n = 16 the minimum k is 14. In fact 16^14 = 72057594037927936 and the sum of its digits is 85 while 14^16 = 2177953337809371136 and the sum of its digits is, again, 85.
MAPLE
S:=proc(s) local w, j; w:=convert(s, base, 10); sum(w[j], j=1..nops(w)); end:
P:=proc(q) local k, n; for n from 1 to q do k:=0;
while S(n^k)<>S(k^n) do k:=k+1; od; if k<n then print(n); fi; od;
end: P(10^5);
MATHEMATICA
Select[Range@ 454, AnyTrue[Range[# - 1], Function[x, Total@ IntegerDigits[#^x] == Total@ IntegerDigits[x^#]]] &] (* Michael De Vlieger, Sep 22 2015, Version 10 *)
PROG
(PARI) isok(n) = {for (k=1, n-1, if (sumdigits(n^k)==sumdigits(k^n), return (1)); ); } \\ Michel Marcus, Sep 22 2015
CROSSREFS
Cf. A007953.
Sequence in context: A023693 A299634 A181053 * A295129 A287338 A077654
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, Apr 02 2014
STATUS
approved