# Wolfram Mathematica

## Find a Sequence in the Digits of π

The new functions SequenceCases, SequencePosition, and SequenceCount offer new functionality to extract sequences using pattern matching.

Find the occurrence of the first release date of Mathematica in the digits of .

In:= ```EntityValue[ Entity["ProgrammingLanguage", "WolframLanguage"], "DateIntroduced"]```
Out= Change this date to a format suited to the search.

In:= ```EntityValue[ Entity["ProgrammingLanguage", "WolframLanguage"], "DateIntroduced"]; date = Characters[DateString[%, {"Month", "Day", "YearShort"}]]```
Out= Generate the first three million digits of .

In:= `pi = Characters[ToString@N[Pi, 3000000]];`

SequencePosition gives the positions at which the formatted date starts and ends.

In:= `pos = SequencePosition[pi, date]`
Out= It appears only once in the first three million digits of . This occurrence can be represented in a simple way using a Grid object.

show complete Wolfram Language input
In:= ```chars = Join[ Take[pi, 21], Characters["..."], Take[pi, First@pos - {14, 6}], Style[#, Orange] & /@ Take[pi, First@pos], Take[pi, First@pos + {6, 4}] ];```
In:= `Grid[Partition[chars, 8]]`
Out= Try other dates and find your day here!