A307582 Position of the first occurrence of (0, 1, ..., n-1) in the digits of Pi written in base n.
2, 7, 188, 2264, 27931, 110808, 23489363, 97438020
Offset: 2
Examples
Pi written in base 2 is 11.001...[2], so the first "01" occurs at position a(2) = 2. Pi written in base 3 is 10.010211012...[3], we see that the first occurrence of the string "012" is at position a(3) = 7. Pi written in base 4 is 3.02100333...[4]; the string of digits "0123" does not occur until position a(4) = 188.
Crossrefs
Programs
-
PARI
A307582(n,x=Pi,m=Mod(sum(i=1,n-1,i*n^(n-1-i)),n^n))={for(k=0,oo,x\n^-k==m&&return(k-n+1))} \\ Ensure sufficient precision of the argument x = Pi.
Extensions
a(7)-a(9) from Chai Wah Wu, Apr 07 2020
Comments