A069648 a(1) = 1, otherwise smallest m > 1 such that the sum of digits of m^n is k^n for some k > 1.
1, 2, 2, 11, 47, 46, 983, 193534, 676644395
Offset: 1
Crossrefs
Cf. A069647.
Programs
-
PARI
a237992(maxn, maxm) = { print1("1, "); for(n=1, maxn, for(m=2, maxm, t=eval(Vec(Str(m^n))); d=sum(i=1, #t, t[i]); if(d>1 && ispower(d, n), print1(m, ", "); break()) ) ) } a237992(8, 1000000) \\ Colin Barker, Feb 23 2014
-
PARI
a(n)=if(n==1,return(1)); my(t=2^n,t3=3^n,k,s); while((s=sumdigits(k++^n))
=t3 && ispower(s,n)),); k \\ Charles R Greathouse IV, Feb 26 2014 -
Python
import sympy from sympy import factorint def DigitSum(x): return sum(int(i) for i in str(x)) def PowExp(p): n = 2 while n < 10000*(10**(int(2**p/9)/p)): if DigitSum(n**p) != 1: count = 0 for i in list(factorint(DigitSum(n**p)).values()): if (int(i)/p) % 1 == 0: count += 1 if count == len(list(factorint(DigitSum(n**p)).values())): return n else: n += 1 else: n += 1 print(1) x = 2 while x < 20: print(PowExp(x)) x += 1 # Derek Orr, Feb 16 2014
-
Python
from sympy import factorint def A069648(n): if (n == 1): return 1 else: m = 2 while True: x = sum(int(d) for d in str(m**n)) if x > 1 and not any(map(lambda x:x%n,factorint(x).values())): return m m += 1 # Chai Wah Wu, Aug 11 2014
Formula
a(n) > c^2^n for n > 1 where c = 10^(1/81) = 1.0288.... - Charles R Greathouse IV, Feb 26 2014
Extensions
Corrected and extended by David Wasserman, Apr 23 2003
Comments