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

A102831 Number of n-digit 4th powers.

Original entry on oeis.org

2, 2, 2, 4, 8, 14, 25, 43, 78, 139, 246, 437, 779, 1384, 2461, 4376, 7783, 13840, 24612, 43765, 77828, 138400, 246114, 437658, 778280, 1383998, 2461136, 4376586, 7782795, 13839982, 24611356, 43765867, 77827942, 138399825, 246113559
Offset: 1

Views

Author

James R. Buddenhagen, Feb 27 2005

Keywords

Comments

The number 0 is considered a 1-digit 4th power. This is consistent with A062941 which considers 0 a 1-digit cube, but is inconsistent with A049415 which does not consider 0 a 1-digit square.

Examples

			a(1)=2 because there are 2 1-digit 4th powers, 0 and 1.
		

Crossrefs

Column k=4 of A216653.

Programs

  • Maple
    r:= proc(n, k) local b; b:= iroot(n, k); b+`if`(b^k r(10^n, 4) -r(10^(n-1), 4) +`if`(n=1, 1, 0):
    seq(a(n), n=1..50);  # Alois P. Heinz, Sep 12 2012
  • Mathematica
    f[n_] := If[n == 1, 2, Ceiling[ Sqrt[ Sqrt[10^n]]] - Ceiling[ Sqrt[ Sqrt[10^(n - 1)]]]]; Table[ f[n], {n, 34}] (* Robert G. Wilson v, Mar 03 2005 *)

Extensions

More terms from Robert G. Wilson v, Mar 03 2005

A049416 Largest number whose square has n digits.

Original entry on oeis.org

3, 9, 31, 99, 316, 999, 3162, 9999, 31622, 99999, 316227, 999999, 3162277, 9999999, 31622776, 99999999, 316227766, 999999999, 3162277660, 9999999999, 31622776601, 99999999999, 316227766016, 999999999999, 3162277660168
Offset: 1

Views

Author

Ulrich Schimke (ulrschimke(AT)aol.com)

Keywords

Comments

a(n) + A180416(n) + A180425(n) + A167615(n) = A002283(n).

Examples

			31^2 = 961, but 32^2 = 1024, hence a(3) = 31.
a(4) = 99: 99^2 = 9801 has 4 digits, while 100^2 = 10000 has 5 digits.
		

Crossrefs

Cf. A061433, A049415. Equals A017936 - 1.

Programs

  • Magma
    [Ceiling(Sqrt(10^n))-1: n in [1..30]]; // Vincenzo Librandi, Oct 01 2011
  • Mathematica
    Ceiling[Sqrt[10^Range[40]]-1] (* Harvey P. Dale, Sep 30 2011 *)

Formula

a(n) = ceiling(sqrt(10^n)) - 1.

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), May 16 2001

A062940 Number of squares (including 0) with n digits.

Original entry on oeis.org

4, 6, 22, 68, 217, 683, 2163, 6837, 21623, 68377, 216228, 683772, 2162278, 6837722, 21622777, 68377223, 216227767, 683772233, 2162277661, 6837722339, 21622776602, 68377223398, 216227766017, 683772233983, 2162277660169
Offset: 1

Views

Author

Amarnath Murthy, Jul 07 2001

Keywords

Comments

Sum of first 2n terms = 10^n. - Zak Seidov, Aug 05 2006
a(n)/a(n-1) ~ 10^(1/2). For the sequence giving the number of members of the sequence a(k)=k^r with n digits we have a(n)/a(n-1) ~ 10^(1/r). - Ctibor O. Zizka, Mar 09 2008

Examples

			a(1)=4 because there are 4 one-digit squares: 0,1,4,9. - _Zak Seidov_, Aug 05 2006
a(2)=6 because there are 6 two-digit squares: 16,25,36,49,64,81. - _Zak Seidov_, Aug 05 2006
22 squares (100=10^2, 121=11^2, ..., 961=31^2) have 3 digits, hence a(3)=22.
		

Crossrefs

A variant of A049415. A049415(n) = A017936(n+1) - A017936(n) = A049416(n+1) - A049416(n). Cf. A000290, A062941.
Column k=2 of A216653.

Programs

  • Maple
    r:= proc(n, k) local b; b:= iroot(n, k); b+`if`(b^k r(10^n, 2) -r(10^(n-1), 2) +`if`(n=1, 1, 0):
    seq(a(n), n=1..40);  # Alois P. Heinz, Sep 12 2012
  • PARI
    je=[4]; for(n=2, 45, je=concat(je, ceil(sqrt(10^n))-ceil(sqrt(10^(n-1))))); je
    
  • PARI
    { default(realprecision, 200); for (n=1, 200, b=ceil(10^(n/2)); if (n>1, a=b - c, a=4); c=b; write("b062940.txt", n, " ", a) ) } \\ Harry J. Smith, Aug 14 2009

Formula

a(n) = ceiling(sqrt(10^n)) - ceiling(sqrt(10^(n-1))), n > 1.
a(n) = A017934(n) - A017934(n-1) - (-1)^n, n >= 2. - R. J. Mathar, Mar 17 2008

Extensions

Corrected and extended by Dean Hickerson and Jason Earls, Jul 10 2001
Edited by R. J. Mathar, Aug 07 2008

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

A180347 The number of n-digit numbers requiring 4 nonzero squares in their representation as sum of squares.

Original entry on oeis.org

1, 14, 150, 1500, 14999, 150000, 1499999, 15000000, 149999998, 1500000001, 14999999999, 149999999999, 1500000000001, 14999999999999, 149999999999999, 1500000000000001, 14999999999999998, 149999999999999999, 1500000000000000003, 14999999999999999996
Offset: 1

Views

Author

Martin Renner, Jan 18 2011

Keywords

Comments

A049415(n) + A180426(n) + A180429(n) + a(n) = A052268(n).

Crossrefs

Formula

a(n) = A167615(n)-A167615(n-1).

A180426 The number of n-digit numbers requiring 2 nonzero squares in their representation as sum of squares.

Original entry on oeis.org

3, 30, 265, 2351, 21062, 191630, 1766955, 16465551, 154749588, 1464326721, 13932672360, 133165432342, 1277568139729, 12295904124627, 118665023703067, 1147922359531155
Offset: 1

Views

Author

Martin Renner, Jan 19 2011

Keywords

Comments

A049415(n) + a(n) + A180429(n) + A180347(n) = A052268(n)

Crossrefs

Formula

a(n) = A180416(n)-A180416(n-1) for n>1.

Extensions

a(5)-a(8) from Alois P. Heinz, Jan 20 2011
a(9)-a(10) from Donovan Johnson, Jul 01 2011
a(10) corrected and a(11)-a(16) added by Hiroaki Yamanouchi, Aug 30 2014

A180429 The number of n-digit numbers requiring 3 nonzero squares in their representation as sum of squares.

Original entry on oeis.org

2, 40, 463, 5081, 53722, 557687, 5730883, 58527612, 595228791, 6035604901, 61067111413, 616833883887, 6222429697992, 62704089037652, 631334954674157, 6352077572091621
Offset: 1

Views

Author

Martin Renner, Jan 19 2011

Keywords

Comments

A049415(n) + A180426(n) + a(n) + A180347(n) = A052268(n)

Crossrefs

Formula

a(n) = A180425(n)-A180425(n-1) for n>1.

Extensions

a(6) from Lars Blomberg, Jun 29 2011
a(7)-a(10) from Donovan Johnson, Jul 01 2011
a(10) corrected and a(11)-a(16) added by Hiroaki Yamanouchi, Aug 30 2014

A177952 a(n) = number of n-digit squares in base 10 such that there is at least one permutation that is also a square in base 10. Initial zeros are not allowed for any square.

Original entry on oeis.org

0, 0, 7, 13, 86, 293, 1212, 4699, 17380, 60623, 203799, 664953, 2135649, 6800449, 21572602, 68311990, 216144075, 683666674
Offset: 1

Views

Author

Roger Bilisoly (bilisolyr(AT)ccsu.edu), May 15 2010

Keywords

Comments

The ratio of a(n) to the n-th entry of sequence A049415 goes to 1. Bilisoly (2008), listed below, has a proof of this. Squares of this type are called "anasquares" in this reference (short for "anagram of squares").

Examples

			For instance, a(3) = 7 because (1) 144, 441 are both squares and permutations of each other as is 256, 625 and 169, 196, 961 and (2) there are no other 3 digit squares that can be permuted to another square (because initial zeros are forbidden, 100 and 001, etc., do not count).
		

Crossrefs

a(n) converges to A049415 in the sense that the ratio of the two sequences goes to 1 as n goes to infinity.

Programs

  • Mathematica
    nAnasquares[ndigits_] := Module[{nsquares = 0, nkeys = 0, nanapat = 0, upper, lower, square, key, dictionary}, lower = Sqrt[10^(ndigits - 1)] // Ceiling; upper = Sqrt[10^ndigits - 1] // Floor; Do[ ++nsquares; square = i^2; key = ToString[FromDigits[Sort[IntegerDigits[square]]]]; If[StringQ[ dictionary[ key]] && (Length[StringPosition[dictionary[key], ","]] == 0), ++nanapat, Null] If[StringQ[dictionary[key]], dictionary[key] = dictionary[key] <> "," <> ToString[square], dictionary[key] = ToString[square]; ++nkeys], {i, lower, upper}]; Return[nsquares - nkeys + nanapat] ] Table[nAnasquares[n], {n, 1, 10}]

Extensions

a(16)-a(18) from Donovan Johnson, Jun 10 2010

A366940 a(n) is the number of positive squares with n digits, all distinct.

Original entry on oeis.org

3, 6, 13, 36, 66, 96, 123, 97, 83, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Tanya Khovanova, Oct 29 2023

Keywords

Comments

a(n) = 0, for n > 10.

Examples

			a(1)=3 because all three 1-digit squares, 1, 4, and 9, have trivially distinct digits.
a(2)=6 because all six 2-digit squares, 16, 25, 36, 49, 64, and 81, have distinct digits.
158407396 = 12586^2: has 9 distinct digits. Thus, this number contributes to a(9). On the other hand, 158382225 = 12585^2 has repeated digits. Thus, it doesn't contribute.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Range[100000], Length[Union[IntegerDigits[#^2]]] == k &&  Length[IntegerDigits[#^2]] == k &]], {k, 10}]
  • Python
    from math import isqrt
    from itertools import permutations
    def sqr(n): return isqrt(n)**2 == n
    def a(n):
        if n > 10: return 0
        return sum(1 for p in permutations("0123456789", n) if p[0] != '0' and sqr(int("".join(p))))
    print([a(n) for n in range(1, 31)]) # Michael S. Branicky, Oct 29 2023
Showing 1-9 of 9 results.