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.

A380052 a(n) is the largest number whose cube is an n-digit cube which has the maximum sum of digits (A373727(n)).

Original entry on oeis.org

2, 4, 9, 19, 46, 92, 208, 453, 942, 1966, 4289, 9949, 12599, 43795, 99829, 215083, 446423, 989353, 2131842, 4081435, 9850783, 20714797, 43967926, 92827483, 190349299, 464110759, 989554129, 2132590453, 4559677342, 9654499999, 21253161559, 31037622999, 99594689449, 181610950229
Offset: 1

Views

Author

Zhining Yang, Jan 11 2025

Keywords

Examples

			For n=7, among cubes which are 7 digits long the maximum sum of digits is A373727(7) = 46 and this is attained by 3 cubes, the largest of which is 208^3 = 8998912 so that a(7) = 208.
		

Crossrefs

Other powers: A379298, A380797, A380566, A380193.

Programs

  • C
    /* See A373727. */
  • Mathematica
    Table[SortBy[Map[{#, Total@IntegerDigits[#^3]} &,
         Range[Ceiling@CubeRoot[10^(n - 1)], CubeRoot[10^n - 1]]],
        Last][[-1]][[1]], {n, 18}]

A379869 a(n) is the least number whose cube is an n-digit cube which has the maximum sum of digits (A373727(n)).

Original entry on oeis.org

2, 4, 9, 19, 31, 92, 157, 423, 927, 1966, 4289, 8782, 12599, 30355, 99829, 215083, 341075, 989353, 2131842, 4081435, 8334082, 20632999, 43967926, 88316866, 190349299, 364929616, 735501679, 1948602829, 3036548692, 9654499999, 17087193298, 31037622999, 99594689449, 181610950229, 426932901019, 956829383603
Offset: 1

Views

Author

Zhining Yang, Jan 11 2025

Keywords

Examples

			For n=7, the maximum sum of digits for a 7-digit cube is A373727(7) = 46 and this is attained by 3 cubes, the smallest of which is 157^3 = 3869893 so that a(7) = 157.
		

Crossrefs

Other powers: A380111, A379650, A380567.

Programs

  • C
    /* See A373727. */
  • Mathematica
    Table[t =SortBy[Map[{#, Total@IntegerDigits[#^3]} &,
        Range[Ceiling@CubeRoot[10^(n - 1)], CubeRoot[10^n - 1]]], Last];
     Select[t, #[[2]] == t[[-1]][[2]] &][[1, 1]], {n, 18}]

Extensions

a(26) and a(35) corrected by Kevin Ryde, Apr 03 2025

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
    

A374025 a(n) is the largest digit sum of all n-digit fifth powers.

Original entry on oeis.org

1, 5, 9, 27, 27, 36, 45, 46, 52, 63, 72, 80, 89, 90, 99, 104, 108, 119, 126, 143, 137, 152, 157, 162, 175, 180, 182, 189, 198, 208, 209, 216, 225, 234, 236, 250, 253, 270, 270, 284, 286, 288, 297, 310, 315, 323, 324, 334, 341, 346, 351, 364
Offset: 1

Views

Author

Zhining Yang, Jun 25 2024

Keywords

Examples

			a(5) = 27 because 27 is the largest digital sum encountered among all 5-digit fifth powers (16807, 32768, 59049).
		

Crossrefs

Programs

  • Mathematica
    Table[Max@Map[Total@IntegerDigits[#^5] &, Range[Ceiling[10^((n - 1)/5)], Floor[(10^n-1)^(1/5)]]], {n, 40}]
  • Python
    from sympy import integer_nthroot
    def A374025(n): return max(sum(int(d) for d in str(m**5)) for m in range((lambda x:x[0]+(x[1]^1))(integer_nthroot(10**(n-1),5)),1+integer_nthroot(10**n-1,5)[0])) # Chai Wah Wu, Jun 26 2024

Extensions

a(41)-a(49) from Chai Wah Wu, Jun 26 2024
a(50)-a(52) from Chai Wah Wu, Jun 27 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.