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.

A114322 Largest number whose 4th power has n digits.

Original entry on oeis.org

1, 3, 5, 9, 17, 31, 56, 99, 177, 316, 562, 999, 1778, 3162, 5623, 9999, 17782, 31622, 56234, 99999, 177827, 316227, 562341, 999999, 1778279, 3162277, 5623413, 9999999, 17782794, 31622776, 56234132, 99999999, 177827941, 316227766, 562341325, 999999999, 1778279410
Offset: 1

Views

Author

Jonathan Vos Post, Feb 06 2006

Keywords

Comments

This is to 4th powers as A061439 is to cubes and A049416 is to squares.
a(n) + A186649(n) + A186651(n) + A186653(n) + A186655(n) + A186657(n) + A186659(n) + A186661(n) + A186663(n) + A186665(n) + A186667(n) + A186669(n) + A186671(n) + A186673(n) + A186675(n) + A186677(n) + A186680(n) + A186682(n) + A186684(n) = A002283(n).

Examples

			a(10) = 316 because 316^4 = 9971220736 which has 10 digits, while 317^4 = 10098039121 has 11 digits.
a(35) = 562341325 because 562341325^4 = 99999999864602459914272843469140625 has 35 digits, while 562341326^4 = 100000000575914225104884587789852176 has 36.
		

Crossrefs

Programs

  • Magma
    [Ceiling((10^n)^(1/4))-1: n in [1..40]]; // Vincenzo Librandi, Oct 01 2011
  • Mathematica
    Ceiling[(10^Range[50])^(1/4)] - 1 (* Paolo Xausa, Jul 30 2024 *)

Formula

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

A049415 Number of squares (of positive integers) with n digits.

Original entry on oeis.org

3, 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

Ulrich Schimke (ulrschimke(AT)aol.com)

Keywords

Comments

a(n) + A180426(n) + A180429(n) + A180347(n) = A052268(n).
Lim_{n->infinity} a(2n)/10^n = 1 - 1/sqrt(10);
lim_{n->infinity} a(2n-1)/10^n = 1/sqrt(10) - 1/10. - Robert G. Wilson v, Aug 29 2012

Examples

			22 squares (100=10^2, 121=11^2, ...., 961=31^2) have 3 digits, hence a(3)=22.
		

Crossrefs

A049415(n) = A017936(n+1) - A017936(n) = A049416(n+1) - A049416(n).
Cf. A062940.

Programs

  • Magma
    [Ceiling(Sqrt(10^n))-Ceiling(Sqrt(10^(n-1))) : n in [1..30]]; // Vincenzo Librandi, Oct 01 2011
  • Mathematica
    f[n_] := Ceiling[Sqrt[10^n - 1]] - Ceiling[Sqrt[10^(n - 1)]]; f[1] = 3; Array[f, 24] (* Robert G. Wilson v, Aug 29 2012 *)

Formula

a(n) = ceiling(sqrt(10^n)) - ceiling(sqrt(10^(n-1))).
From Jon E. Schoenfield, Nov 30 2019: (Start)
a(2n) = floor(10^n * (1 - 1/sqrt(10))), so each even-indexed term a(2n) is given by the first n digits (after the decimal point) of 1 - 1/sqrt(10) = 0.68377223398316...;
a(2n-1) = ceiling(10^n * (1/sqrt(10) - 1/10)), so each odd-indexed term a(2n-1) is given by the first n digits (after the decimal point) of 1/sqrt(10) - 1/10 = 0.21622776601683..., plus 1. (End)

Extensions

More terms from Dean Hickerson, Jul 10 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

A180416 Number of positive integers below 10^n, excluding perfect squares, which have a representation as a sum of 2 positive squares.

Original entry on oeis.org

3, 33, 298, 2649, 23711, 215341, 1982296, 18447847, 173197435, 1637524156, 15570196516, 148735628858, 1426303768587, 13722207893214, 132387231596281, 1280309591127436
Offset: 1

Views

Author

Martin Renner, Jan 19 2011

Keywords

Comments

Numbers that can be represented as a sum of three or more positive squares but not as a sum of two positive squares (e.g., 3=1^2+1^2+1^2 or 6=1^2+1^2+2^2) are not counted. Numbers that can be represented as a sum of two positive squares and alternatively as a sum of three or more positive squares are counted (e.g., 18 = 9+9 = 1+1+16, 26, 41, ...).

Crossrefs

Programs

  • Maple
    isA000415 := proc(n) local x ,y2; if issqr(n) then false; else for x from 1 do y2 := n-x^2 ; if y2 < x^2 then return false; elif issqr(y2) then return true; end if; end do ; end if; end proc:
    A180416 := proc(n) a := 0 ; for k from 2 to 10^n-1 do if isA000415(k) then a := a+1 ; end if; end do: a ; end proc:
    for n from 1 do print(A180416(n)) ; end do; # R. J. Mathar, Jan 20 2011
  • Mathematica
    a[n_] := a[n] = Module[{k, xMax = Floor[Sqrt[10^n - 1]]}, Table[k = x^2 + y^2; If[IntegerQ[Sqrt[k]], Nothing, k], {x, 1, xMax}, {y, x, Floor[ Sqrt[10^n - 1 - x^2]]}] // Flatten // Union // Length];
    Table[Print[n, " ", a[n]]; a[n], {n, 1, 8}] (* Jean-François Alcover, Oct 31 2020 *)

Formula

a(n) = |{ 0A000415} }|.
a(n) = |{ 0A000404} \ {A000290}) }|.
a(n) = A002283(n) - A049416(n) - A167615(n) - A180425(n).

Extensions

a(6)-a(8) from Alois P. Heinz, Jan 20 2011
a(9)-a(10) from Donovan Johnson, Feb 04 2011
a(10) corrected and a(11)-a(16) from Hiroaki Yamanouchi, Jul 13 2014

A083377 a(n) = the largest integer whose square has n digits and first digit 1.

Original entry on oeis.org

1, 4, 14, 44, 141, 447, 1414, 4472, 14142, 44721, 141421, 447213, 1414213, 4472135, 14142135, 44721359, 141421356, 447213595, 1414213562, 4472135954, 14142135623, 44721359549, 141421356237, 447213595499, 1414213562373, 4472135954999
Offset: 1

Views

Author

Werner S. Hürlimann (whurlimann(AT)bluewin.ch), Jun 05 2003

Keywords

Crossrefs

Programs

Formula

a(n) = floor(sqrt(10^n/5)).

Extensions

Edited by Don Reble, Nov 05 2005
Reference fixed by Charles R Greathouse IV, Oct 30 2009
More terms from Vincenzo Librandi, Oct 01 2011

A167615 Total number of positive integers below 10^n with 4 positive squares in their representation as sum of squares.

Original entry on oeis.org

1, 15, 165, 1665, 16664, 166664, 1666663, 16666663, 166666661, 1666666662, 16666666661, 166666666660, 1666666666661, 16666666666660, 166666666666659, 1666666666666660, 16666666666666658, 166666666666666657, 1666666666666666660, 16666666666666666656
Offset: 1

Views

Author

Martin Renner, Jan 18 2011

Keywords

Comments

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

Examples

			a(1) = 1 since 7 is the only natural number below 10 which is the sum of 4 but no fewer nonzero squares.
		

Crossrefs

Cf. A004215.

Programs

  • Maple
    a:=proc(n)
      local f,s,k;
      f:=(x,y)->ceil(10^y/2^(2*x+3)-7/8):
      s:=0:
      for k from 0 by 1 while not f(k,n)=0 do
        s:=s+f(k,n);
      od:
      return(s);
    end;
  • Mathematica
    a[n_] := Module[{f, s = 0, k}, f[x_, y_] := Ceiling[10^y/2^(2x+3) - 7/8]; For[k = 0, f[k, n] != 0, k++, s += f[k, n]]; Return[s]];
    Array[a, 20] (* Jean-François Alcover, Oct 31 2020, after Maple *)

Formula

a(n) = Sum_{i=0..k} ceiling(10^n/2^(2*i+3) - 7/8) with minimal k for which ceiling(10^n/2^(2*k+3) - 7/8) = 0.

A180425 Number of positive integers below 10^n requiring 3 positive squares in their representation as sum of squares.

Original entry on oeis.org

2, 42, 505, 5586, 59308, 616995, 6347878, 64875490, 660104281, 6695709182, 67762820595, 684596704482, 6907026402474, 69611115440126, 700946070114283, 7053023642205904
Offset: 1

Views

Author

Martin Renner, Jan 19 2011

Keywords

Crossrefs

Formula

a(n) = #{k: A000419(k) < 10^n}.
A049416(n) + A180416(n) + a(n) + A167615(n) = A002283(n).

Extensions

a(6)=616995 by Lars Blomberg, May 03 2011
a(7)-a(10) from Donovan Johnson, Jul 01 2011
a(10) corrected and a(11)-a(16) from Hiroaki Yamanouchi, Jul 13 2014

A114323 Largest number whose 5th power has n digits.

Original entry on oeis.org

1, 2, 3, 6, 9, 15, 25, 39, 63, 99, 158, 251, 398, 630, 999, 1584, 2511, 3981, 6309, 9999, 15848, 25118, 39810, 63095, 99999, 158489, 251188, 398107, 630957, 999999, 1584893, 2511886, 3981071, 6309573, 9999999, 15848931, 25118864, 39810717
Offset: 1

Views

Author

Jonathan Vos Post, Feb 06 2006

Keywords

Comments

Note that the rightmost digit of n and n^5 are identical. This is to 5th powers as A061439 is to cubes and A049416 is to squares.

Examples

			a(3) = 3 because 3^5 = 243 which has 3 digits, while 4^5 = 1024 has 3 digits.
a(32) = 2511886 because 2511886^5 = 99999914106500508412371346814176 has 32 digits, while 2511887^5 = 100000113160107495177704749808207 has 33 digits.
		

Crossrefs

Programs

Formula

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

Extensions

Data corrected by Vincenzo Librandi, Oct 11 2011
Showing 1-8 of 8 results.