OFFSET
1,1
COMMENTS
See Formula section for exact formula for terms whose index n is divisible by 4, and upper bounds for other cases; see Links for additional information on those other cases. - Jon E. Schoenfield, Mar 30 2015
LINKS
Jon E. Schoenfield, Table of n, a(n) for n = 1..100
Jon E. Schoenfield, Odd-indexed terms with central digits aligned
Jon E. Schoenfield, Patterns and upper bound for terms for which n mod 4 = 2
FORMULA
From Jon E. Schoenfield, Mar 31 2015: (Start)
If n is divisible by 4, then a(n) = (10^(n/2) - ceiling(10^(n/4)/3))^2;
otherwise, if n is even, then a(n) < 10^(n) * (1 - (10^-((n-2)/4))* 2 / sqrt(90/1.000000000001026)) (see Links for derivation), except that a(2) = 81.
If n is odd, then a(n) ~ (floor(10^(n/2)))^2. (Although (floor(10*(n/2)))^2 gives an obvious upper bound for a(n) for all n, it seems to be a much tighter upper bound for odd values of n.) (End)
EXAMPLE
a(3) = Max{...., 729, 784, 841, 961} = 961.
MAPLE
f:= proc(n) local r;
r:= floor(sqrt(10^n));
while has(convert(r^2, base, 10), 0) do r:= r-1 od:
r^2
end proc:
seq(f(n), n=1..24); # Robert Israel, Mar 29 2015
MATHEMATICA
f[n_] := Block[{k = Floor[ Sqrt[10^n]]}, While[ Union[ IntegerDigits[ k^2]][[1]] == 0, k-- ]; k^2]; Table[ f[n], {n, 18}] (* Robert G. Wilson v, Mar 03 2005 *)
PROG
(PARI) a(n)=k=floor(sqrt(10^n)); while(k, if(type(k)=="t_INT"&&vecmin(digits(k^2)), return(k^2)); k--)
vector(20, n, a(n)) \\ Derek Orr, Mar 29 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Feb 26 2005
EXTENSIONS
More terms from Robert G. Wilson v, Mar 03 2005
More terms from Jon E. Schoenfield, Mar 29 2015
STATUS
approved