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.

A018851 a(n)^2 is smallest square beginning with n.

Original entry on oeis.org

0, 1, 5, 6, 2, 23, 8, 27, 9, 3, 10, 34, 11, 37, 12, 39, 4, 42, 43, 14, 45, 46, 15, 48, 49, 5, 51, 52, 17, 54, 55, 56, 18, 58, 59, 188, 6, 61, 62, 63, 20, 203, 65, 66, 21, 213, 68, 69, 22, 7, 71, 72, 23, 73, 74, 235, 75, 24, 241, 77, 78, 247, 25, 251, 8, 81, 257, 26, 83, 263, 84, 267, 27
Offset: 0

Views

Author

Keywords

Comments

The following discussion is based on comments from David A. Corneth, Robert Israel, N. J. A. Sloane, and Chai Wah Wu. (Start)
As the graph shows, the points belong to various "curves". For each n there is a value d = d(n) such that n*10^d <= a(n)^2 < (n+1)*10^d, and so on this curve, a(n) ~ sqrt(n)*10^(d/2). The values of d(n) are given in A272677.
For a given n, d can range from 0 (if n is a square) to d_max, where it appears that d_max approx. equals 3 + floor( log_10(n/25) ). The successive points where d_max increases are given in A272678, and that entry contains more precise conjectures about the values.
For example, in the range 2600 = A272678(5) <= n < 25317 = A272678(6), d_max is 5. This is the upper curve in the graph that is seen if the "graph" button is clicked, and on this curve a(n) is about sqrt(n)*10^(5/2). (End)

Crossrefs

Cf. A018796 (the squares), A272677, A272678.
A265432 is a more complicated sequence in the same spirit.

Programs

  • Maple
    f:= proc(n) local d,m;
      for d from 0 do
        m:= ceil(sqrt(10^d*n));
        if m^2 < 10^d*(n+1) then return m fi
      od
    end proc:
    map(f, [$1..100]); # Robert Israel, Jul 26 2015
  • PARI
    a(n)=k=1; while(k,d=digits(k^2); D=digits(n); if(#D<=#d,c=1; for(i=1,#D,if(D[i]!=d[i],c=0;break));if(c,return(k)));k++)
    vector(100,n,a(n)) \\ Derek Orr, Jul 26 2015

Formula

a(n) >= sqrt(n), for all n >= 0 with equality when n is a square. - Derek Orr, Jul 26 2015

Extensions

Added initial 0. - N. J. A. Sloane, May 21 2016
Comments revised by N. J. A. Sloane, Jul 17 2016