

A350300


Irregular triangle read by rows: The nth row lists the "nth power friends", numbers k such that digsum(digsum(k^n)^n) = k but digsum(k^n) is not k.


2



13, 16, 19, 28, 18, 27, 23, 29, 31, 34, 38, 44, 46, 47, 55, 56, 62, 65, 64, 73, 35, 80, 109, 127, 52, 70, 112, 118, 121, 127, 136, 181, 97, 108, 117, 130, 144, 153, 88, 144, 153, 160, 139, 152, 153, 154, 161, 173, 176, 178, 181, 184, 187, 189, 189, 198
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

2,1


COMMENTS

Two numbers x and y with x < y are said to be "nth power friends" if digsum(x^n)=y and digsum(y^n)=x. This sequence lists both x and y; A350301 lists just the x's and A350302 lists just the y's.
The name "nth power friends" comes from "The Man Who Counted", where the n=2 case is discussed:
"The digits of the number 256 add up to 13. The square of 13 is 169. The digits of 169 add up to 16. As a result, the numbers 13 and 16 have a curious relation, which we could call a quadratic friendship" (p. 33).
There are finitely many such k for a particular n since digsum(digsum(k^n)^n) <= 9n log_10(9n log_10(k)). There are no such k for n=1 since either k is a single digit or else digsum(k) < k.


REFERENCES

M. Tahan, The Man Who Counted: A Collection of Mathematical Adventures, W. W. Norton & Company, 1993.


LINKS



EXAMPLE

Triangle begins:
13, 16;
19, 28;
18, 27;
23, 29, 31, 34;
;
38, 44, 46, 47, 55, 56, 62, 65;
64, 73;
35, 80;
;
;
109, 127;
52, 70, 112, 118, 121, 127, 136, 181;
97, 108, 117, 130;
144, 153;
88, 144, 153, 160;
...
18 and 27 are in row n=4 since 18^4 = 104976 and 1 + 0 + 4 + 9 + 7 + 6 = 27, and 27^4 = 531441 and 5 + 3 + 1 + 4 + 4 + 1 = 18.


PROG

(Python 3)
from math import log
n = 1
while n <= 50:
k = 2
while 9*n*log(9*n*log(k, 10), 10) >= k:
s1 = sum(int(d) for d in str(k**n))
s2 = sum(int(d) for d in str(s1**n))
if k != s1 and k == s2:
print(k)
k += 1
n += 1


CROSSREFS



KEYWORD

nonn,base,tabf


AUTHOR



STATUS

approved



