

A018851


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


21



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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


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)


LINKS

N. J. A. Sloane, Table of n, a(n) for n = 0..20000
Zak Seidov, Blog entry
Zak Seidov, Blog entry [Cached copy, pdf format, with permission]


FORMULA

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


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


PROG

(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


CROSSREFS

Cf. A018796 (the squares), A272677, A272678.
A265432 is a more complicated sequence in the same spirit.
Sequence in context: A201332 A049253 A072733 * A260463 A226533 A011499
Adjacent sequences: A018848 A018849 A018850 * A018852 A018853 A018854


KEYWORD

nonn,base,look


AUTHOR

David W. Wilson


EXTENSIONS

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


STATUS

approved



