OFFSET
0,3
COMMENTS
Conjecture: lim_{n->infinity} a(n) = infinity. If true, convergence is very slow, since a(1183893) = 1. Sequence is certainly unbounded, since for n >= 4, there is always a square between n*n! and (n+1)!.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..20954
EXAMPLE
4^2 = 16 = 2*6+2*2 = 220(factorial base), so a(4) = max(2,2,0) = 2.
MAPLE
b:= proc(n, i) local r; `if`(n<i, n,
max(b(iquo(n, i, 'r'), i+1), r))
end:
a:= n-> b(n^2, 2):
seq(a(n), n=0..188); # Alois P. Heinz, Mar 28 2018
MATHEMATICA
Block[{nn = 105^2, r}, r = Reverse@ Most@ NestWhileList[# + 1 &, 2, #! < nn &]; Array[Max@ IntegerDigits[#^2, MixedRadix@ r] &, Sqrt@ nn, 0]] (* Michael De Vlieger, Jan 01 2019 *)
PROG
(PARI) f(n, p=2) = if( n<p, n, f( n\p, p+1 )*10 + n%p ); \\ A007623
a(n) = my(dfb=digits(f(n^2))); if (#dfb, vecmax(dfb), 0); \\ Michel Marcus, Mar 28 2018
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Franklin T. Adams-Watters, Aug 25 2005
STATUS
approved