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.

A348303 a(n) is the largest n-digit number whose square has a digital sum equal to A348300(n).

Original entry on oeis.org

7, 83, 937, 9417, 94863, 987917, 9893887, 99483667, 994927133, 9486778167, 99497231067, 999949483667, 9892825177313
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Array[#1 + Position[#2, Max[#2]][[-1, -1]] - 1 & @@ {#1, Map[Total@ IntegerDigits[#^2] &, Range[#1, #2]]} & @@ {10^(# - 1), 10^# - 1} &, 8] (* Michael De Vlieger, Oct 12 2021 *)

Extensions

a(11) from Chai Wah Wu, Nov 18 2021
a(12)-a(13) from Martin Ehrenstein, Nov 20 2021

A370522 a(n) is the least n-digit number whose square has the maximum sum of digits (A348300(n)).

Original entry on oeis.org

7, 83, 836, 8937, 94863, 987917, 9893887, 99477133, 994927133, 9380293167, 99497231067, 926174913167, 9892825177313, 89324067192437, 943291047332683, 9949874270443813, 83066231922477313, 707106074079263583, 9429681807356492126, 94180040294109027313, 888142995231510436417, 8882505274864168010583
Offset: 1

Views

Author

Zhining Yang, Feb 21 2024

Keywords

Comments

a(n) is the last n-digit term in A067179.
As the last two of the only nine known numbers whose square has a digit mean above 8.25 (see A164841), there is a high probability that a(30)=314610537013606681884298837387 and a(31)=9984988582817657883693383344833.

Examples

			a(3) = 836 because among all 3-digit numbers, 836 is the smallest whose square 698896 has the maximum sum of digits, 46 = A348300(3).
		

Crossrefs

Programs

  • Mathematica
    A348300={13,31,46,63,81,97,112,130,148,162,180};
    A370522[n_]:=Do[If[Total@IntegerDigits[k^2]==A348300[[n]],Return[k];],{k,10^(n-1),10^n-1}];
    Table[A370522[n],{n,8}]
  • Python
    def A370522(n):
        A348300=[0,13,31,46,63,81,97,112,130,148,162,180]
        for k in range(10**(n-1), 10**n):
            if sum(int(d) for d in str(k**2))==A348300[n]:
                return(k)
    print([A370522(n) for n in range(1,9)])

Extensions

a(11)-a(24) from Zhao Hui Du, Feb 23 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}]

A371728 a(n) is the largest number that is the digit sum of an n-digit square number.

Original entry on oeis.org

9, 13, 19, 31, 40, 46, 54, 63, 70, 81, 88, 97, 106, 112, 121, 130, 136, 148, 154, 162, 171, 180, 187, 193, 205, 211, 220, 229, 235, 244, 253, 262, 271, 277, 286, 297, 301, 310, 319, 331, 334, 343, 355, 360, 367, 378, 388, 396
Offset: 1

Views

Author

Zhining Yang, Apr 04 2024

Keywords

Comments

a(n) appears to be approximately equal to (33*n-11)/4.

Examples

			a(6) = 46 because 46 is the largest digital sum encountered among all 6-digit squares (698896, 779689, 877969).
		

Crossrefs

Programs

  • Mathematica
    Array[Max@Map[Total@IntegerDigits[#^2] &, Range[Floor@Sqrt[10^(#)]], Floor@Sqrt[10^(# + 1) - 1]] &, 15]

Extensions

a(22)-a(48) from Zhao Hui Du, Apr 05 2024
a(49)-a(62) from Zhining Yang, May 08 2024
a(63)-a(64) from Zhining Yang, May 23 2024
Incorrect a(61) and unverified a(49) onward deleted by Zhining Yang, Mar 03 2025
Showing 1-5 of 5 results.