OFFSET
1,2
COMMENTS
FORMULA
a(100^q*n) = a(n), q > 0. - Bernard Schott, Jul 29 2021
EXAMPLE
MATHEMATICA
Table[If[IntegerQ@ Sqrt@ n, -1, Function[s, Max@ Array[FirstPosition[s, #][[1]] &, 10, 0]]@ RealDigits[Sqrt[n], 10, 120][[1]]], {n, 65}] (* Michael De Vlieger, Jul 06 2021 *)
PROG
(Python 3.8+)
from math import isqrt
def A343740(n):
i = isqrt(n)
if i**2 == n:
return -1
m, dset, pos = n, set(), 0
for d in (int(s) for s in str(i)):
dset.add(d)
pos += 1
if len(dset) == 10:
return pos
while len(dset) < 10:
m *= 100
d = isqrt(m) % 10
dset.add(d)
pos += 1
return pos # Chai Wah Wu, Jul 07 2021
CROSSREFS
KEYWORD
sign,base
AUTHOR
Jon E. Schoenfield, Jul 05 2021
STATUS
approved