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.

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

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

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

A379298 Largest number k for which k^2 is n digits long and has the maximum sum of digits possible for such a square (A371728(n)).

Original entry on oeis.org

3, 7, 28, 83, 313, 937, 3114, 9417, 29614, 94863, 298327, 987917, 3162083, 9893887, 29983327, 99483667, 315432874, 994927133, 2999833327, 9486778167, 31464263856, 99497231067, 299998333327, 999949483667, 3160522105583, 9892825177313, 29999983333327
Offset: 1

Views

Author

Zhining Yang, Feb 05 2025

Keywords

Examples

			a(6) = 937 because among all 6-digit squares, 698896 = 836^2, 779689 = 883^2, 877969 = 937^2 have the maximum sum of digits 46 = A371728(6), and 937 is the largest.
		

Crossrefs

Other powers: A380052, A380797, A380566, A380193.

Programs

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

Formula

Conjecture: a(2*n) = A348303(n).

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