Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A135740
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A135740 Maximal sum of decimal digits of a^b for 1 <= a,b <= n. +0
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; listen)
OFFSET

1,2

COMMENT

Clearly a(n) <= a(n+1). For what values of n do we have equality? Is there an explicit formula for a(n)?

LINKS

Project Euler, Problem 56: Considering natural numbers of the form a^b, find the maximum digital sum.

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 (stefan.steinerberger(AT)gmail.com), Dec 22 2007

PROGRAM

(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

Adjacent sequences: A135737 A135738 A135739 this_sequence A135741 A135742 A135743

Sequence in context: A055381 A032820 A066588 this_sequence A010412 A033662 A136640

KEYWORD

base,nonn

AUTHOR

M. F. Hasler (Maximilian.Hasler(AT)gmail.com), Nov 30 2007

EXTENSIONS

More terms from Stefan Steinerberger (stefan.steinerberger(AT)gmail.com), Dec 22 2007

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified May 16 01:24 EDT 2008. Contains 139630 sequences.


AT&T Labs Research