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.

A140317 Smallest n-digit number divisible by n^2.

Original entry on oeis.org

1, 12, 108, 1008, 10000, 100008, 1000041, 10000000, 100000008, 1000000000, 10000000109, 100000000080, 1000000000116, 10000000000144, 100000000000125, 1000000000000000, 10000000000000152, 100000000000000008
Offset: 1

Views

Author

Jonathan Vos Post, May 26 2008

Keywords

Examples

			a(7) = 1000041 because 1000041 has 7 digits, 1000041/49 = 20409 = 3 * 6803 and no integer between 1000000 and 1000041 is divisible by 7^2 = 49.
a(9) = 100000008 because 100000008 has 9 digits, 100000008/81 = 1234568 = 23 * 154321 and no integer between 100000000 and 100000008 is divisible by 9^2 = 81.
		

Crossrefs

Programs

  • Maple
    A140317 := proc(n) n^2*ceil(10^(n-1)/n^2) ; end: seq(A140317(n),n=1..30) ; # R. J. Mathar, May 31 2008
  • Mathematica
    snd[n_]:=Module[{c=n^2-PowerMod[10,n-1,n^2]},If[Divisible[10^(n-1), n^2], 10^(n-1),10^(n-1)+c]]; Array[snd,20] (* Harvey P. Dale, Dec 14 2012 *)

Formula

a(n) = n^2*ceiling(10^(n-1)/n^2). - Michel Marcus, Aug 25 2020

Extensions

More terms from R. J. Mathar, May 31 2008