login
Starting positions of strings of three 4's in the decimal expansion of Pi.
1

%I #18 Apr 11 2022 10:40:04

%S 2707,2928,3476,3809,3866,4175,4923,5290,5675,6327,6346,9384,9445,

%T 13565,18912,21929,23157,23223,25937,26531,27887,28220,28872,34587,

%U 35496,36878,37072,37758,37989,39388,39826,42220,42424,45136,45796,46495

%N Starting positions of strings of three 4's in the decimal expansion of Pi.

%H <a href="/index/Ph#Pi314">Index entries for sequences related to the number Pi</a>

%H Dave Andersen, <a href="http://www.angio.net/pi/piquery">Pi-Search Page</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PiDigits.html">Pi Digits.</a>

%t q=9!;z=4;a=RealDigits[Pi,10,q];lst={};Do[b=a[[1]][[n]];c=a[[1]][[n+1]];d=a[[1]][[n+2]];If[b==z&&c==z&&d==z,AppendTo[lst,n-1]],{n,q-2}];lst (* _Vladimir Joseph Stephan Orlovsky_, Jun 19 2009 *)

%t With[{p=Partition[RealDigits[Pi,10,50000][[1]],3,1]},Flatten[Position[ p,_?(# == {4,4,4}&)]]-1] (* _Harvey P. Dale_, Nov 22 2014 *)

%t SequencePosition[RealDigits[Pi,10,50000][[1]],{4,4,4}][[All,1]]-1 (* _Harvey P. Dale_, Apr 11 2022 *)

%Y Cf. A050230 (two 4's), A083616 (four 4's).

%K base,nonn

%O 1,1

%A _Rick L. Shepherd_, May 02 2003