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-4 of 4 results.

A380193 a(n) is the largest number whose sixth power is an n-digit sixth power which has the maximum sum of digits (A373994(n)).

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 12, 19, 31, 46, 68, 96, 143, 206, 304, 461, 677, 977, 1194, 2136, 2896, 4633, 6373, 9763, 13817, 21542, 30643, 43693, 68123, 99812, 144083, 183967, 311296, 463976, 681017, 994333, 1441977, 2150104, 3022731, 4608562, 6765526, 9258023
Offset: 1

Views

Author

Zhining Yang, Jan 15 2025

Keywords

Examples

			a(11) = 68 because among all 11-digit sixth powers(47^6-68^6), 64^6=68719476736 and 68^6=98867482624 have the maximum sum of digits, 96 = A373994(11) and 68 is the largest number.
		

Crossrefs

Other powers: A379298, A380052, A380797, A380566.

Programs

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

A380567 a(n) = k the least number for which k^6 is n digits long and the sum of digits of k^6 is the maximum possible for a 6th power of that length (A373994(n)).

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 12, 16, 23, 46, 64, 96, 143, 202, 277, 461, 547, 977, 1194, 2136, 2896, 3707, 5762, 9763, 13817, 16474, 25847, 43693, 51967, 72539, 121624, 172988, 271427, 463976, 681017, 751204, 1387617, 1732027, 3018897, 3515477, 6765526, 9258023
Offset: 1

Views

Author

Zhining Yang, Jan 26 2025

Keywords

Examples

			a(11) = 64 because among all 11-digit sixth powers (47^6-68^6), 64^6=68719476736 and 68^6=98867482624 have the maximum sum of digits, 96 = A373994(11) and 64 is the least number.
		

Crossrefs

Other powers: A379869, A380111, A379650.

Programs

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

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
    
Showing 1-4 of 4 results.