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

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

Original entry on oeis.org

1, 3, 4, 8, 16, 26, 47, 74, 118, 308, 518, 659, 1768, 2868, 5396, 8256, 14482, 28871, 55368, 97063, 147768, 228558, 562341, 835718, 1727156, 2878406, 5458722, 8175708, 16234882, 27831542, 53129506, 98665756, 166025442, 315265896, 510466356, 904245732, 1188893858, 2298249374, 5106312756
Offset: 1

Views

Author

Zhining Yang, Jan 12 2025

Keywords

Examples

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

Crossrefs

Other powers: A379869, A379650, A380567.

Programs

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

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}]

A055565 Sum of digits of n^4.

Original entry on oeis.org

0, 1, 7, 9, 13, 13, 18, 7, 19, 18, 1, 16, 18, 22, 22, 18, 25, 19, 27, 10, 7, 27, 22, 31, 27, 25, 37, 18, 28, 25, 9, 22, 31, 27, 25, 19, 36, 28, 25, 18, 13, 31, 27, 25, 37, 18, 37, 43, 27, 31, 13, 27, 25, 37, 27, 28, 43, 18, 31, 22, 18, 34, 37, 36, 37, 34, 45, 13, 31, 27, 7
Offset: 0

Views

Author

Henry Bottomley, Jun 19 2000

Keywords

Examples

			a(2) = 7 because 2^4 = 16 and 1+6 = 7.
		

Crossrefs

Cf. A000583, A007953, A055570, A055575 (fixed points), A373914.

Programs

  • Maple
    for i from 0 to 200 do printf(`%d,`,add(j, j=convert(i^4, base, 10))) od;
  • Mathematica
    a[n_Integer]:=Apply[Plus, IntegerDigits[n^4]]; Table[a[n], {n, 0, 100}] (* Vincenzo Librandi, Feb 23 2015 *)
  • PARI
    a(n) = sumdigits(n^4); \\ Seiichi Manyama, Nov 16 2021
  • Sage
    [sum((n^4).digits()) for n in (0..70)] # Bruno Berselli, Feb 23 2015
    

Formula

a(n) = A007953(A000583(n)). - Michel Marcus, Feb 23 2015

Extensions

More terms from James Sellers, Jul 04 2000

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
    

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}]

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