cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A384924 #17 Jul 07 2025 15:43:30
%S A384924 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,
%T A384924 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,
%U A384924 4,5,21,2,5,24,17,3,6,19,16,5,3,4,11,17,7,19,9,2,4,16
%N 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.
%H A384924 Felix Huber, <a href="/A384924/b384924.txt">Table of n, a(n) for n = 1..10000</a>
%H A384924 Wikipedia, <a href="https://en.wikipedia.org/wiki/Significant_figures">Significant Figures</a>
%F A384924 2 <= a(n) <= A384923(n).
%e A384924 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.
%p A384924 A384924:=proc(n)
%p A384924     local m,b,k;
%p A384924     m:=n+floor(1/2+sqrt(n));
%p A384924     b:=floor(log10(sqrt(m)));
%p A384924     k:=1-b;
%p A384924     while not member(0,ListTools:-Reverse(convert(floor(10^k*sqrt(m)),'base',10))) do
%p A384924         k:=k+1
%p A384924     od;
%p A384924     return k+b+1
%p A384924 end proc;
%p A384924 seq(A384924(n),n=1..75);
%t A384924 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 *)
%o A384924 (Python)
%o A384924 from itertools import count
%o A384924 from math import isqrt
%o A384924 def A384924(n):
%o A384924     m = n+(k:=isqrt(n))+(n>k*(k+1))
%o A384924     return 1+next(n for n in count(1) if not isqrt(10**(n<<1)*m)%10) # _Chai Wah Wu_, Jul 01 2025
%Y A384924 Cf. A000037, A000196, A003285, A113507, A384923.
%K A384924 nonn,base
%O A384924 1,1
%A A384924 _Felix Huber_, Jun 26 2025