The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A135740 Maximal sum of decimal digits of a^b for 1 <= a,b <= n. 1
1, 4, 9, 13, 13, 27, 36, 37, 45, 45, 62, 64, 71, 97, 99, 99, 109, 117, 127, 136, 136, 148, 153, 163, 171, 197, 197, 202, 224, 224, 236, 236, 251, 256, 281, 281, 302, 302, 306, 306, 315, 352, 352, 355, 360, 385, 385, 396, 406, 406, 431, 432, 437, 441, 469, 469 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Clearly a(n) <= a(n+1). For what values of n do we have equality? Is there an explicit formula for a(n)?
LINKS
EXAMPLE
a(3)=9=2+7 is the digit sum of 3^2 and 3^3=27, all other a^b with a,b <= 3 have smaller digit sum.
a(4)=13=2+5+6 is the digit sum of 4^4=256, all other a^b with a,b <= 4 have smaller digit sum.
a(5)=13 since also for a,b <= 5 there is no higher digit sum (but the same is obtained for 5^4=625).
MATHEMATICA
a = {1}; For[n = 2, n < 100, n++, r = a[[ -1]]; For[j = 1, j < n + 1, j++, If[Max[Plus @@ IntegerDigits[n^j], Plus @@ IntegerDigits[j^n]] > r, r = Max[Plus @@ IntegerDigits[n^j], Plus @@ IntegerDigits[j^n]]]]; AppendTo[a, r]]; a (* Stefan Steinerberger, Dec 22 2007 *)
PROG
(PARI) digitsum(n, s)=n=[n]; while(n, n=divrem(n[1], 10); s+=n[2]); s A135740(n)=vecmax(matrix(n, n, i, j, digitsum(i^j)))
CROSSREFS
Sequence in context: A125848 A225752 A066588 * A312870 A312871 A247881
KEYWORD
base,nonn
AUTHOR
M. F. Hasler, Nov 30 2007
EXTENSIONS
More terms from Stefan Steinerberger, Dec 22 2007
STATUS
approved

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 May 15 09:20 EDT 2024. Contains 372540 sequences. (Running on oeis4.)