A384924 a(n) is the position of the first occurrence of the digit 0 among the leading significant decimal digits of the square root of the n-th nonsquare.
14, 5, 5, 17, 11, 16, 10, 10, 6, 3, 36, 12, 6, 7, 13, 37, 16, 4, 26, 52, 2, 12, 6, 9, 11, 13, 16, 14, 4, 5, 2, 8, 18, 10, 3, 4, 12, 10, 3, 20, 9, 6, 2, 48, 6, 4, 49, 11, 32, 13, 9, 15, 19, 4, 5, 21, 2, 5, 24, 17, 3, 6, 19, 16, 5, 3, 4, 11, 17, 7, 19, 9, 2, 4, 16
Offset: 1
Examples
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.
Links
- Felix Huber, Table of n, a(n) for n = 1..10000
- Wikipedia, Significant Figures
Programs
-
Maple
A384924:=proc(n) local m,b,k; m:=n+floor(1/2+sqrt(n)); b:=floor(log10(sqrt(m))); k:=1-b; while not member(0,ListTools:-Reverse(convert(floor(10^k*sqrt(m)),'base',10))) do k:=k+1 od; return k+b+1 end proc; seq(A384924(n),n=1..75);
-
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 *)
-
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
Formula
2 <= a(n) <= A384923(n).