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.

Showing 1-5 of 5 results.

A379650 a(n) is the least number whose fifth power is an n-digit fifth power which has the maximum sum of digits (A374025(n)).

Original entry on oeis.org

1, 2, 3, 6, 9, 15, 18, 37, 58, 93, 156, 179, 368, 549, 756, 1379, 2139, 3965, 4956, 9746, 11156, 25046, 38779, 60006, 98746, 151446, 231755, 389658, 585516, 819199, 1584779, 1776339, 3803469, 5400759, 9744998, 11463799, 23936959, 28737498, 62943519, 95635199, 156373159, 225142779, 351816939, 595519999
Offset: 1

Views

Author

Zhining Yang, Jan 12 2025

Keywords

Examples

			a(7) = 18 because among all 7-digit fifth powers (16^5 to 25^5), 18^5=1889568 is the item which has the maximum sum of digits, 45 = A374025(7).
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Module[{s=Floor[(10^n-1)^(1/5)],max=0},
    For[k=s,k>=Ceiling[10^((n-1)/5)],k--,t=DigitSum[k^5];
    If[t>max,s=k;max=t]];s];
    For[n=1,n<=30,n++,Print[{n,a[n]}]]

A380566 a(n) = k is the largest k for which k^5 is n digits long and the sum of digits of k^5 is the maximum for any n digit 5th power (A374025).

Original entry on oeis.org

1, 2, 3, 6, 9, 15, 18, 37, 58, 93, 156, 179, 368, 579, 756, 1379, 2337, 3965, 6006, 9746, 14198, 25046, 38779, 60006, 98746, 151446, 231755, 389658, 585516, 819199, 1584779, 2452779, 3897999, 5400759, 9744998, 15517759, 23936959, 28737498, 62943519, 95635199, 156373159, 225142779, 351816939, 595519999
Offset: 1

Views

Author

Zhining Yang, Jan 26 2025

Keywords

Examples

			a(14) = 579 because among all 14-digit fifth powers(399^5-630^5), 549^5=49872566977749,579^5=65071799758899, both have the maximum sum of digits, 90 = A374025(14) and 579 is the largest.
		

Crossrefs

Programs

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

A373914 a(n) is the largest digit sum of all n-digit fourth powers.

Original entry on oeis.org

1, 9, 13, 19, 25, 37, 43, 52, 55, 70, 76, 79, 85, 99, 103, 108, 118, 127, 135, 142, 144, 153, 171, 166, 178, 181, 189, 198, 205, 211, 220, 232, 234, 243, 252, 261, 265, 274, 279, 283, 297, 298, 313, 316, 325, 334, 337, 346, 358
Offset: 1

Views

Author

Zhining Yang, Jun 22 2024

Keywords

Examples

			a(3) = 13 because 13 is the largest digital sum encountered among all 3-digit fourth powers (attained at both fourth powers: 256, 625).
		

Crossrefs

Programs

  • C
    /* See links. */
  • Mathematica
    Table[Max@Map[Total@IntegerDigits[#^4] &, Range[Ceiling[10^((n - 1)/4)], Floor[(10^n-1)^(1/4)]]], {n, 32}]
  • PARI
    a(n) = my(m=ceil(10^((n-1)/4)), M=sqrtint(sqrtint(10^n))); vecmax(apply(sumdigits, vector(M-m+1, i, (i+m-1)^4))); \\ Michel Marcus, Jun 23 2024
    
  • Python
    from sympy import integer_nthroot
    def A373914(n): return max(sum(int(d) for d in str(m**4)) for m in range((lambda x:x[0]+(x[1]^1))(integer_nthroot(10**(n-1),4)),1+integer_nthroot(10**n-1,4)[0])) # Chai Wah Wu, Jun 26 2024
    

A373727 a(n) is the largest number that is the digit sum of an n-digit cube.

Original entry on oeis.org

8, 10, 18, 28, 28, 44, 46, 54, 63, 73, 80, 82, 98, 100, 109, 118, 125, 136, 144, 154, 154, 163, 172, 181, 190, 190, 199, 208, 217, 226, 235, 243, 253, 260, 262, 278
Offset: 1

Views

Author

Zhining Yang, Jun 15 2024

Keywords

Examples

			a(7) = 46 because 46 is the largest digital sum encountered among all 7-digit cubes (attained at 3 cubes: 3869893, 7880599, 8998912).
		

Crossrefs

Other powers: A371728, A373914, A374025, A373994.

Programs

  • C
    /* See links. */
  • Mathematica
    Table[Max@
      Map[Total@IntegerDigits[#^3] &,
       Range[Ceiling@CubeRoot[10^(n - 1)], CubeRoot[10^n - 1]]], {n, 15}]
  • Python
    from sympy import integer_nthroot
    def A373727(n): return max(sum(int(d) for d in str(m**3)) for m in range(1+integer_nthroot(10**(n-1)-1,3)[0],1+integer_nthroot(10**n-1,3)[0])) # Chai Wah Wu, Jun 26 2024
    

A373994 a(n) is the largest digit sum of all n-digit sixth powers.

Original entry on oeis.org

1, 10, 18, 19, 27, 28, 45, 37, 46, 64, 64, 81, 82, 82, 91, 100, 100, 118, 117, 126, 136, 136, 154, 154, 163, 163, 172, 181, 181, 190, 199, 208, 217, 226, 235, 235, 243, 244, 261, 262, 280, 280, 280, 289, 298, 298, 307, 325, 325, 325, 334, 352, 352, 361, 370
Offset: 1

Views

Author

Zhining Yang, Jun 26 2024

Keywords

Examples

			a(6) = 28 because 28 is the largest digital sum encountered among all 6-digit sixth powers (117649, 262144, 531441).
		

Crossrefs

Programs

  • C
    /* See links. */
  • Mathematica
    Table[Max@Map[Total@IntegerDigits[#^6] &, Range[Ceiling[10^((n - 1)/6)], Floor[(10^n-1)^(1/6)]]], {n, 42}]
Showing 1-5 of 5 results.