TOPICS
Search

Self-Locating String


A self-locating string in a decimal expansion is the string of decimal digits representing a positive integer n, without leading zeros, which occurs beginning at position n. The choice of indexing affects which strings have this property. For pi, three conventions give the following initial values (Andersen; Numberphile 2020).

index of first fractional digitOEISinitial values
0A0648106, 27, 13598, 43611, ...
1A0576801, 16470, 44899, ...
2A0576795, 242424, 271070, ...

In the last convention, the initial integer digit 3 has index 1. The occurrence at the matching position need not be the first occurrence. For example, with the first fractional digit indexed by 1, the string 16470 begins at position 16470 but also at the earlier position 1602 (OEIS A057680).

A related function p(n) assigns to a positive integer n the position of its first occurrence in the fractional part, using its first digit as position 1. Its domain consists of the positive integers whose decimal strings occur in pi. A fixed point p(n)=n gives a self-locating string, but the example 16470 shows that the converse fails. Where successive values are defined, iteration of p can produce cycles: starting at 40 gives 70, 96, 180, ... and returns to 40 after 20 steps, with no earlier return. Another chain is 211->93->14->1; since p(1)=1, it reaches a fixed point (Andersen).


See also

Decimal Expansion, Pi, String

Explore with Wolfram|Alpha

References

Andersen, D. G. "The Pi-Search Page." https://www.angio.net/pi/.Numberphile. "27 the Favourite Number." Featuring K. Steckles. Jul. 10, 2012. https://www.youtube.com/watch?v=euAHY9hqRN4.Numberphile. "Strings and Loops Within Pi." Feb. 20, 2020. https://www.youtube.com/watch?v=W20aT14t8Pw.Sloane, N. J. A. Sequences A057679, A057680, and A064810 in "The On-Line Encyclopedia of Integer Sequences."

Cite this as:

Weisstein, Eric W. "Self-Locating String." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/Self-LocatingString.html

Subject classifications