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.

A241489 Least number k not divisible by 10 such that k^3 contains n zeros.

Original entry on oeis.org

16, 52, 101, 252, 1002, 1001, 10003, 10002, 10001, 100003, 100002, 100001, 1000003, 1000002, 1000001, 10000003, 10000002, 10000001, 100000003, 100000002, 100000001, 1000000003, 1000000002, 1000000001, 10000000003, 10000000002, 10000000001, 100000000003, 100000000002
Offset: 1

Views

Author

Derek Orr, Apr 23 2014

Keywords

Comments

It is believed that a(n) will have the pattern 1000...0003, 1000...0002, 1000...0001 after a(6).

Examples

			16 is not divisible by 10 and 16^3 = 4096, has 1 zero. So a(1) = 16.
52 is not divisible by 10 and 52^3 = 140608, has 2 zeros. So a(2) = 52.
		

Crossrefs

Cf. A134845.

Programs

  • PARI
    a(n) = {k = 1; while ((d = digits(k^3)) && (((k % 10) == 0) || (sum(i=1, #d, d[i] == 0) != n)), k++); k;} \\ Michel Marcus, Apr 30 2014
  • Python
    def Cu(n):
      for k in range(10**100):
        if k % 10 != 0:
          if str(k**3).count("0") == n:
            return k
    n = 1
    while n < 100:
      print(Cu(n))
      n += 1
    

Formula

For n > 6, a(n) = 10^(ceiling(n/3) + 1) + 3 - (n+2) mod 3.