### Search PI for missing sequence digits

Hi

I know there are plenty of places out there where a person can track down digit sequences within a sequence, BUT what I am looking to do and cannot seem to track down is track down sequences with some known and some unknown digits. eg.

In the sequence what are the unknown digits in the number sequence 111?222?333 - the list will obviously be quite extensive depending on the number lengths given. Any help will be hugely appreciated.
Last edited on
I don't know any sites, but you can just download the first few gigabytes of pi and search for the sequence yourself.
I have little programming knowledge so was hoping someone would give me some pointers please
0x3A28213A, 0x6339392C, 0x7363682E... okay, just kidding.

 ``1234567891011121314151617181920212223242526272829303132333435363738394041`` ``````#include #include #include using namespace std; bool match(const char* buf,const std::string& matchStr) { for (size_t i=0;i

 ```Enter a search string: 333?222?111 Found sequence 33372226111 at position 712885093 Searched 999998790 digits of pi in 2.436 seconds```

Or, if you're on Linux you could just `grep '333?222?111' pi.txt`.
Last edited on
OK now please for the programming idiot in the room, where in windows do I copy paste that to get it to work? and how do I get it to work, I am below novice level.
2) Create an empty project
4) Paste
5) Press the green play button
Thanks - great help
is there anywhere I can run this online without having to download visual?
There are online compilers ( for example : http://codepad.org/ )
But I'm not sure which one allows you to upload an input file ( pi.txt ) as well.

 In PI what are the unknown digits in the number sequence 111?222?333

Hmmm...

As PI is an infinite, irrational number I would think that all numbers will fill the ?s at some point, as long as you seek far enough.

So I am pretty sure that your answer is ? = {0, 1, ..., 9}

Of course, the offset at which each one occurs still need to be found!
PS Just checked out "The Pi-Search Page"
http://www.angio.net/pi/piquery.html

Apparently the chance of finding a given 11 digit pattern in first 100 million digits is just under 10%.

I found my Birthday with a 2 digit year at offset 327948, but not by Birthday with a 4 digit year.

Andy

 ``1234567891011`` ``````Chances of Finding Your Number in Pi Why can/can't I find my number in Pi? If we view Pi as a big, random string of numbers (which is close enough for our purposes), then we can figure out the odds of finding any string in the first 100 million digits of Pi: Number Length Chance of Finding 1-5 100% 6 Nearly 100% 7 99.995% 8 63% 9 9.5% 10 0.995%% 11 0.09995% ``````

327,948
OK

2. Add > New item > C++ File(.cpp)
3. Pasted your code and pressed green arrow -
results - window pops up saying "this project is out of date"
would you like yo build it? > yes

black window pops up saying "enter a search string"> I enterec a few numbers and nothing happened?

this message appeared

'TRY2.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'TRY2.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'TRY2.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'TRY2.exe': Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Cannot find or open the PDB file
'TRY2.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Cannot find or open the PDB file

Anyone know what I am doing wrong?

I am also looking for not only the first instance that the searched digits appear, but also the instances they might occur later in pi.

Thanks

You need a file pi.txt in the program directory that contains one billion digits of pi or more.
Ok so i download a pi calculator and saved digits of pi as a txt. document, and now how do I link it to that file? or place it in the program directory? once again thanks

Athar you are a star

Last edited on
You simply need to place it in the program's directory.
Can someone please give me a detailed explanation on how/where to create a directory and insert the digits of pi?
There's nothing to create. You find the .exe file somewhere in the project's directory after you compiled the program. That's where you place pi.txt.
Topic archived. No new replies allowed.