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

A340207 Constant whose decimal expansion is the concatenation of the largest n-digit square A061433(n), for n = 1, 2, 3, ...

Original entry on oeis.org

9, 8, 1, 9, 6, 1, 9, 8, 0, 1, 9, 9, 8, 5, 6, 9, 9, 8, 0, 0, 1, 9, 9, 9, 8, 2, 4, 4, 9, 9, 9, 8, 0, 0, 0, 1, 9, 9, 9, 9, 5, 0, 8, 8, 4, 9, 9, 9, 9, 8, 0, 0, 0, 0, 1, 9, 9, 9, 9, 9, 5, 1, 5, 5, 2, 9, 9, 9, 9, 9, 9, 8, 0, 0, 0, 0, 0, 1, 9, 9, 9, 9, 9, 9, 5, 8
Offset: 0

Views

Author

M. F. Hasler, Jan 01 2021

Keywords

Comments

The terms of sequence A339978 converge to this sequence of digits, and to this constant, up to powers of 10.

Examples

			The largest square with 1, 2, 3, 4, ... digits is, respectively, 9 = 3^2, 81 = 9^2, 961 = 31^2, 9801 = 99^2, ....
Here we list the sequence of digits of these numbers: 9; 8, 1; 9, 6, 1; 9, 8, 0, 1; 9, 9, 8, 5, 6; ...
This can be considered, as for the Champernowne and Copeland-Erdős constants, as the decimal expansion of a real constant 0.98196198...
		

Crossrefs

Cf. A061433 (largest n-digit square), A339978 (has this as "limit"), A340208 (same with "smallest n-digit cube", limit of A215692), A340209 (same for cubes, limit of A340115), A340220 (same for primes), A340219 (similar, with smallest primes, limit of A215641), A340222 (same for semiprimes), A340221 (same for smallest semiprimes, limit of A215647).
Cf. A033307 (Champernowne constant), A030190 (binary), A001191 (concatenation of all squares), A134724 (cubes), A033308 (primes: Copeland-Erdős constant).

Programs

  • Mathematica
    lnds[k_]:=Module[{c=Sqrt[10^k]},If[IntegerQ[c],(c-1)^2,Floor[c]^2]]; Flatten[IntegerDigits/@(lnds/@Range[15])] (* Harvey P. Dale, Dec 16 2021 *)
  • PARI
    concat([digits(sqrtint(10^k-1)^2)|k<-[1..14]]) \\ as seq. of digits
    c(N=20)=sum(k=1,N,.1^(k*(k+1)/2)*sqrtint(10^k-1)^2) \\ as constant

Formula

c = 0.9819619801998569980019998244999800019999508849999800001999995155...
= Sum_{k >= 1} 10^(-k(k+1)/2)*floor(10^(k/2)-1)^2
a(-n(n+1)/2) = 9 for all n >= 2.

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

A339978 a(n) is the largest prime whose decimal expansion consists of the concatenation of a 1-digit square, a 2-digit square, a 3-digit square, ..., and an n-digit square, or 0 if there is no such prime.

Original entry on oeis.org

0, 449, 981961, 9819619801, 981961980196721, 981961980199856194481, 9819619801998569980018946081, 981961980199856998001999824499740169, 981961980199856998001999824499980001989039601, 9819619801998569980019998244999800019999508849977812321
Offset: 1

Views

Author

Bernard Schott, Dec 25 2020

Keywords

Comments

If a(n) exists it has A000217(n)= n*(n+1)/2 digits.
All the terms end with 1 or 9.

Examples

			a(1) = 0 because no 1-digit square {0, 1, 4, 9} is prime.
a(2) = 449 because 464, 481, 916, 925, 936, 949, 964, and 981 are not primes and 449, concatenation of 4 = 2^2 with 49 = 7^2, is prime.
a(4) = 9819619801, which is a prime is the concatenation of 9 = 3^2 with 81 = 9^2, then 961 = 31^2 and 9801 = 99^2. Observation, 9, 81, 961 and 9801 are the largest squares with respectively 1, 2, 3 and 4 digits.
		

Crossrefs

Cf. A000290, A003618, A061433 (largest squares), A338968 (concatenate primes).

Programs

  • Python
    from sympy import isprime
    from itertools import product
    def a(n):
      squares = [str(k*k) for k in range(1, int((10**n)**.5)+2)]
      revsqrs = [[kk for kk in squares if len(kk)==i+1][::-1] for i in range(n)]
      for t in product(*revsqrs):
        intt = int("".join(t))
        if isprime(intt): return intt
      return 0
    print([a(n) for n in range(1, 11)]) # Michael S. Branicky, Dec 25 2020

Extensions

a(5)-a(10) from Michael S. Branicky, Dec 25 2020

A061435 a(n) is the largest n-digit cube.

Original entry on oeis.org

8, 64, 729, 9261, 97336, 970299, 9938375, 99897344, 997002999, 9993948264, 99961946721, 999700029999, 9999516957184, 99994258523375, 999970000299999, 9999934692543307, 99999429057832312, 999997000002999999
Offset: 1

Views

Author

Amarnath Murthy, May 03 2001

Keywords

Examples

			a(4) = 9261 = 21^3 has 4 digits while 22^3 = 10648 has 5 digits.
		

Crossrefs

Programs

  • Maple
    A061435 := n->(ceil(10^(n/3))-1)^3;
  • Mathematica
    Table[Floor[Surd[10^n-1,3]]^3,{n,20}] (* Harvey P. Dale, Apr 02 2020 *)

Formula

a(n) = (ceiling(10^(n/3)) - 1)^3. - Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 30 2003

Extensions

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

A061434 a(n) is the smallest n-digit cube.

Original entry on oeis.org

1, 27, 125, 1000, 10648, 103823, 1000000, 10077696, 100544625, 1000000000, 10007873875, 100026577288, 1000000000000, 10000909453625, 100000721719296, 1000000000000000, 10000073940248384, 100000075387171679, 1000000000000000000, 10000004316234262875
Offset: 1

Views

Author

Amarnath Murthy, May 03 2001

Keywords

Examples

			a(4) = 1000 = 10^3 has 4 digits while 9^3 = 729 has 3 digits.
		

Crossrefs

Programs

  • Maple
    A061434 := n->ceil(10^((n-1)/3))^3;
  • Mathematica
    Table[Ceiling[Surd[10^n,3]]^3,{n,0,20}] (* Harvey P. Dale, Oct 09 2023 *)
  • PARI
    a(n) = ceil(10^((n-1)/3))^3; \\ Michel Marcus, Jan 27 2021
  • Python
    from sympy import integer_nthroot
    def a(n):
      r, exact = integer_nthroot(10**(n-1), 3)
      return 10**(n-1) if exact else (r+1)**3
    print([a(n) for n in range(1, 21)]) # Michael S. Branicky, Jan 27 2021
    

Formula

a(n) = ceiling(10^((n-1)/3))^3. - Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 30 2003

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), May 16 2001
More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 30 2003

A128826 a(n) = 10^(2n-1) minus largest square less than 10^(2n-1).

Original entry on oeis.org

1, 39, 144, 1756, 49116, 484471, 4175271, 38053824, 10649244, 1064924400, 43246886799, 529955487744, 2399106211776, 50173961567511, 590207432515431, 2099745368512359, 20237877241133151, 126421128012287511
Offset: 1

Views

Author

Zak Seidov, Apr 12 2007

Keywords

Comments

For even indices a(2k) = 2*10^k-1, hence only odd powers of 10 are considered in this sequence.

Examples

			a(1) = 1 because 10 - 3^2 = 1.
a(2) = 39 because 1000 - 31^2 = 39.
a(3) = 144 because 100000 - 316^2 = 144.
		

Crossrefs

Programs

  • Mathematica
    Table[10^n-Floor[(10^n-1)^(1/2)]^2,{n,1,40,2}]

Formula

a(n)=10^(2n-1)-A061433(2n-1).
a(n) = 10^(2*n-1) - floor(sqrt(10^(2*n-1)))^2.

A069659 Largest n-digit perfect power.

Original entry on oeis.org

9, 81, 961, 9801, 99856, 998001, 9998244, 99980001, 999950884, 9999800001, 99999515529, 999998000001, 9999995824729, 99999980000001, 999999961946176, 9999999800000001, 99999999989350756, 999999998000000001
Offset: 1

Views

Author

Amarnath Murthy, Apr 04 2002

Keywords

Comments

Are there terms which are not perfect squares? In other words, when (if ever) does this differ from A061433.
Trivially, 81 is both a square and a fourth power. Assuming my program works, there are no differences in the first 1500 terms. - Hans Havermann, Aug 06 2006

Crossrefs

Cf. A061433.

Extensions

More terms from Ryan Propper, Oct 10 2005

A119273 Absolute value of the difference between largest square and largest cube each with n decimal digits.

Original entry on oeis.org

1, 17, 232, 540, 2520, 27702, 59869, 82657, 2947885, 5851737, 37568808, 297970002, 478867545, 5721476626, 29961646177, 65107456694, 570931518444, 2997997000002, 9607464857096, 53858918990529, 299956723113202, 1253472906066265, 2171966135005184
Offset: 1

Views

Author

Zak Seidov, May 12 2006

Keywords

Comments

a(n) = |A061433(n) - A061435(n)|, where A061433 and A061435 are the largest n-digit square and cube.

Crossrefs

Programs

  • Mathematica
    Table[Abs[Floor[Sqrt[10^n-1]]^2-Floor[Surd[10^n-1,3]]^3],{n,30}] (* Harvey P. Dale, Apr 24 2022 *)

Formula

a(n) = (ceiling(10^(n/2)) - 1)^2 - (ceiling(10^(n/3)) - 1)^3.

Extensions

Corrected, extended, and definition clarified by Harvey P. Dale, Apr 24 2022
Showing 1-8 of 8 results.