cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A380797 a(n) is the largest number whose fourth power is an n-digit which has the maximum sum of digits (A373914(n)).

Original entry on oeis.org

1, 3, 5, 8, 16, 26, 56, 88, 118, 308, 518, 974, 1768, 2868, 5396, 8979, 17306, 28871, 55368, 97063, 167622, 289146, 562341, 835718, 1727156, 3154276, 5623116, 9397404, 17728256, 27831542, 53129506, 98665756, 166025442, 315265896, 510466356, 904245732, 1188893858, 2298249374, 5315776056
Offset: 1

Views

Author

Zhining Yang, Feb 03 2025

Keywords

Examples

			a(7) = 56 because among all 7-digit fourth powers, 56^4=9834496 is the largest one (another smaller is 47^4=487968) which has the maximum sum of digits, 43 = A373914(7).
		

Crossrefs

Other powers: A379298, A380052, A380566, A380193.

Programs

  • C
    /* See A373914. */
  • Mathematica
    a[n_]:=Module[{m=Floor[(10^n-1)^(1/4)], max=0},
    For[k=m, k>=Ceiling[10^((n-1)/4)], k--, t=Total@IntegerDigits[k^4];
    If[t>max, s=k; max=t]]; s];
    Table[a[n], {n, 30}]