A105177 Single-digit numbers in the order in which they first appear in the decimal expansion of Pi, followed by the two-digit numbers in the order in which they appear, then the three-digit numbers, and so on.
3, 1, 4, 5, 9, 2, 6, 8, 7, 0, 31, 14, 41, 15, 59, 92, 26, 65, 53, 35, 58, 89, 97, 79, 93, 32, 23, 38, 84, 46, 62, 64, 43, 33, 83, 27, 95, 50, 28, 88, 19, 71, 16, 69, 39, 99, 37, 75, 51, 10, 82, 20, 74, 49, 94, 44, 45, 30, 78, 81, 40, 86, 98, 80, 34, 48, 25
Offset: 1
Examples
From _Michael De Vlieger_, Feb 09 2017: (Start) Consider the decimal expansion of Pi=3.1415926535897932384626... The first terms in the sequence are the 10 single digits in order of their appearance in the expansion above, thus, 3,1,4, skipping the second 1, then 5,9,2,6, then 8, then 7, followed by 0 (the 33rd digit in the expansion, ignoring the decimal point). a(11)=31 because "31" is the first two-digit group found, followed by a(12)=14, etc. Once we have exhausted the 90 two-digit combinations, we search for three-digit combinations, the first being a(101)=314, etc. (End)
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
- Zak Seidov, Digits in the order that they appear the n-th time.
Programs
-
Mathematica
p = First@ RealDigits@ N[Pi, 10^6]; MapIndexed[10^(First@ #2 - 1) - 1 - Boole[First@ #2 == 1] + Flatten@ Values@ KeySort@ PositionIndex@ #1 &, Table[SequencePosition[p, IntegerDigits@ k][[1, 1]], {n, 4}, {k, If[n == 1, 0, 10^(n - 1)], 10^n - 1}]] (* Michael De Vlieger, Feb 09 2017, Version 10.1 *)
Extensions
Changed definition to make it into an infinite sequence. - N. J. A. Sloane, Feb 08 2017
Comments