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

A104264 Number of n-digit squares with no zero digits.

Original entry on oeis.org

3, 6, 19, 44, 136, 376, 1061, 2985, 8431, 24009, 67983, 193359, 549697, 1563545, 4446173, 12650545, 35999714, 102439796, 291532841, 829634988, 2360947327, 6719171580, 19122499510, 54423038535, 154888366195
Offset: 1

Views

Author

Reinhard Zumkeller and Ron Knott, Feb 26 2005

Keywords

Comments

Comments from David W. Wilson, Feb 26 2005: (Start)
"There are approximately s(d) = (10^d)^(1/2) - (10^(d-1))^(1/2) d-digit squares. A random d-digit number has the probability p(d) = (9/10)^(d-1) of being zeroless (exponent d-1 as opposed to d because the first digit is not zero). So we expect p(d)s(d) zeroless d-digit squares.
"For d = 1 through 12, we get (truncating): 1, 5, 15, 44, 127, 363, 1034, 2943, 8377, 23841, 67854, 193117, ... The elements grow approximately geometrically with limit ratio (9/10)*10^(1/2) = 2.846+.
"The same naive estimate can easily be generalize to k-th powers, giving the estimate s(d) = (10^d)^(1/k) - (10^(d-1))^(1/k) for d-digit k-th powers. p(d) remains the same. The resulting estimates have ratio (9/10)*10^(1/k).
"We should expect an infinite number of zeroless k-th powers when this ratio is >= 1, which it is for k <= 21. For k >= 22, the ratio is < 1 and we should expect a finite number of zeroless k-th powers." (End)

Examples

			a(3) = #{121, 144, 169, 196, 225, 256, 289, 324, 361, 441, 484, 529, 576, 625, 676, 729, 784, 841, 961} = 19.
		

Crossrefs

Programs

  • Python
    def aupton(terms):
      c, k, kk = [0 for i in range(terms)], 1, 1
      while kk < 10**terms:
        s = str(kk)
        c[len(s)-1], k, kk = c[len(s)-1] + (s.count('0')==0), k+1, kk + 2*k + 1
      return c
    print(aupton(14)) # Michael S. Branicky, Mar 06 2021

Extensions

a(14)-a(18) from Donovan Johnson, Nov 05 2009
a(19)-a(21) from Donovan Johnson, Mar 23 2011
a(22)-a(25) from Donovan Johnson, Jan 29 2013

A104265 Smallest n-digit square with no zero digits.

Original entry on oeis.org

1, 16, 121, 1156, 11236, 111556, 1115136, 11115556, 111112681, 1111155556, 11111478921, 111111555556, 1111118377216, 11111115555556, 111111226346761, 1111111155555556, 11111112515384644, 111111111555555556, 1111111112398242916, 11111111115555555556, 111111111113333185156, 1111111111155555555556
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 26 2005

Keywords

Examples

			a(3) = Min{121, 144, 169, 196, ....} = 121.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = Ceiling[ Sqrt[10^n]]}, While[ Union[ IntegerDigits[ k^2]][[1]] == 0, k++ ]; k^2]; Table[ f[n], {n, 0, 20}] (* Robert G. Wilson v, Mar 02 2005 *)
    snds[n_]:=Module[{c=Ceiling[Sqrt[FromDigits[Join[PadRight[{},n-1,1], {0}]]]]^2},While[DigitCount[c,10,0]>0,c=(1+Sqrt[c])^2];c]; Array[ snds,22] (* Harvey P. Dale, Jun 12 2020 *)
  • Python
    from sympy import integer_nthroot
    def A104265(n):
        m, a = integer_nthroot((10**n-1)//9,2)
        if not a:
            m += 1
        k = m**2
        while '0' in str(k):
            m += 1
            k += 2*m-1
        return k # Chai Wah Wu, Mar 24 2020

Formula

From Chai Wah Wu, Mar 24 2020: (Start)
a(n) >= (10^n-1)/9.
a(2n) = (10^n+2)^2/9 = A102807(n). Proof: the smallest 2n-digit number without zero digits is (10^(2n)-1)/9. ((10^n-1)/3)^2 = (10^(2n)-2*10^n+1)/9 < (10^(2n)-1)/9 for n >= 1. Thus a(2n) > ((10^n-1)/3)^2. The next square is ((10^n+2)/3)^2 = (10^(2n)-1)/9 + 4*(10^(n)-1)/9 + 1, i.e. it is n 1's followed by n-1 5's followed by the digit 6, and has no zero digits.
(End)

Extensions

More terms from Robert G. Wilson v, Mar 02 2005
Two more terms from Jon E. Schoenfield, Mar 29 2015
a(21)-a(22) from Chai Wah Wu, Mar 24 2020
Showing 1-2 of 2 results.