A277533
Value of decimal number corresponding to the string of equal digits starting at position A277532(n) after the decimal point in the decimal expansion of the Euler-Mascheroni constant.
Original entry on oeis.org
5, 77, 777, 0, 0, 333333
Offset: 1
-
emstring(n) = default(realprecision, n+10); my(x=Euler); floor(x*10^n)
emdigit(n) = emstring(n)-10*emstring(n-1)
searchstrval(n) = my(x=1, i=1); while(1, my(y=x+1); while(emdigit(y)==emdigit(x), y++; i++); if(i >= n, return(emdigit(x)*(10^n-1)/9)); i=1; x++)
a(n) = searchstrval(n)
A280546
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.
Original entry on oeis.org
2, 19, 150, 953, 2708, 32414, 158810, 4602784, 472173970, 472173970
Offset: 1
-
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 *)
-
string(n) = default(realprecision, n+10); my(x=sqrt(2)); floor(x*10^n)
digit(n) = string(n)-10*string(n-1)
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++)
a(n) = searchstrpos(n)
Showing 1-2 of 2 results.
Comments