login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A069648 a(1) = 1, otherwise smallest m > 1 such that the sum of digits of m^n is k^n for some k > 1. 4

%I #27 May 15 2021 12:34:59

%S 1,2,2,11,47,46,983,193534,676644395

%N a(1) = 1, otherwise smallest m > 1 such that the sum of digits of m^n is k^n for some k > 1.

%C n-th root of A069647(n).

%C Probably k = 2 in all cases. - _Charles R Greathouse IV_, Feb 26 2014

%F a(n) > c^2^n for n > 1 where c = 10^(1/81) = 1.0288.... - _Charles R Greathouse IV_, Feb 26 2014

%o (Python)

%o import sympy

%o from sympy import factorint

%o def DigitSum(x):

%o return sum(int(i) for i in str(x))

%o def PowExp(p):

%o n = 2

%o while n < 10000*(10**(int(2**p/9)/p)):

%o if DigitSum(n**p) != 1:

%o count = 0

%o for i in list(factorint(DigitSum(n**p)).values()):

%o if (int(i)/p) % 1 == 0:

%o count += 1

%o if count == len(list(factorint(DigitSum(n**p)).values())):

%o return n

%o else:

%o n += 1

%o else:

%o n += 1

%o print(1)

%o x = 2

%o while x < 20:

%o print(PowExp(x))

%o x += 1

%o # _Derek Orr_, Feb 16 2014

%o (PARI)

%o a237992(maxn, maxm) = {

%o print1("1, ");

%o for(n=1, maxn,

%o for(m=2, maxm,

%o t=eval(Vec(Str(m^n)));

%o d=sum(i=1, #t, t[i]);

%o if(d>1 && ispower(d, n), print1(m, ", "); break())

%o )

%o )

%o }

%o a237992(8, 1000000) \\ _Colin Barker_, Feb 23 2014

%o (PARI) a(n)=if(n==1,return(1)); my(t=2^n,t3=3^n,k,s); while((s=sumdigits(k++^n))<t || (s<t3 && s!=t) || (s>=t3 && ispower(s,n)),); k \\ _Charles R Greathouse IV_, Feb 26 2014

%o (Python)

%o from sympy import factorint

%o def A069648(n):

%o ....if (n == 1):

%o ........return 1

%o ....else:

%o ........m = 2

%o ........while True:

%o ............x = sum(int(d) for d in str(m**n))

%o ............if x > 1 and not any(map(lambda x:x%n,factorint(x).values())):

%o ................return m

%o ............m += 1 # _Chai Wah Wu_, Aug 11 2014

%Y Cf. A069647.

%K more,nonn,base

%O 1,2

%A _Amarnath Murthy_, Apr 04 2002

%E Corrected and extended by _David Wasserman_, Apr 23 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 17 23:23 EDT 2024. Contains 371767 sequences. (Running on oeis4.)