OFFSET
1,1
LINKS
Felix Huber, Table of n, a(n) for n = 1..10000
Wikipedia, Significant Figures
FORMULA
2 <= a(n) <= A384923(n).
EXAMPLE
The leading 14 significant digits of sqrt(2) are [1, 4, 1, 4, 2, 1, 3, 5, 6, 2, 3, 7, 3, 0], with the digit '0' appearing for the first time at position 14. Since 2 is the first nonsquare, it follows that a(1) = 14.
MAPLE
MATHEMATICA
b[n_] := (n + Floor[Sqrt[n + Floor[Sqrt[n]]]]); a[n_]:=Position[RealDigits[N[Sqrt[b[n]], 100]][[1]], 0][[1]]; Array[a, 75]//Flatten (* Increase precision for n>23000 *) (* James C. McMahon, Jul 05 2025 *)
PROG
(Python)
from itertools import count
from math import isqrt
def A384924(n):
m = n+(k:=isqrt(n))+(n>k*(k+1))
return 1+next(n for n in count(1) if not isqrt(10**(n<<1)*m)%10) # Chai Wah Wu, Jul 01 2025
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Felix Huber, Jun 26 2025
STATUS
approved
