login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Index in A002193 of start of first occurrence of at least n consecutive equal digits in the decimal expansion of sqrt(2) after the decimal point.
0

%I #19 May 29 2024 06:58:35

%S 2,19,150,953,2708,32414,158810,4602784,472173970,472173970

%N Index in A002193 of start of first occurrence of at least n consecutive equal digits in the decimal expansion of sqrt(2) after the decimal point.

%C We index the digits of sqrt(2) = 1.4142135... starting with 1 (for the 1), 2 (for the 4), 3 (for the second 1), 4 (for the second 4), 5 (for the 2), and so on.

%C Find the index of the first digit of a run of n consecutive equal digits after the decimal point: this is a(n). For example, the "88" here 1414213562373095048801.. begins at the 19th digit, so a(2) = 19. - _N. J. A. Sloane_, Mar 20 2023

%H <a href="http://www.subidiom.com/pi/">Irrational Numbers Search Engine</a> (searches initial 2 x 10^9 digits of sqrt(2))

%t Module[{nn=160000,s2},s2=RealDigits[Sqrt[2],10,nn][[1]];Flatten[Table[ SequencePosition[ s2,PadRight[{},k,x_],1],{k,7}],1]][[;;,1]] (* _Harvey P. Dale_, Mar 20 2023 *)

%o (PARI) string(n) = default(realprecision, n+10); my(x=sqrt(2)); floor(x*10^n)

%o digit(n) = string(n)-10*string(n-1)

%o searchstrpos(n) = my(x=1, i=1); while(1, my(y=x+1); while(digit(y)==digit(x), y++; i++); if(i >= n, return(x+1)); i=1; x++)

%o a(n) = searchstrpos(n)

%Y Cf. A002193, A244601, A277259, A277532.

%K nonn,base,more

%O 1,1

%A _Felix Fröhlich_, Jan 05 2017