A350300 Irregular triangle read by rows: The n-th row lists the "n-th power friends", numbers k such that digsum(digsum(k^n)^n) = k but digsum(k^n) is not k.
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
Offset: 2
Examples
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.
References
- M. Tahan, The Man Who Counted: A Collection of Mathematical Adventures, W. W. Norton & Company, 1993.
Programs
-
Python
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
Comments