[go: up one dir, main page]

login
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.
4

%I #31 Nov 02 2019 08:47:33

%S 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,

%T 23,38,84,46,62,64,43,33,83,27,95,50,28,88,19,71,16,69,39,99,37,75,51,

%U 10,82,20,74,49,94,44,45,30,78,81,40,86,98,80,34,48,25

%N 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.

%C Note that (except for 0 itself), numbers may not begin with 0. So that when we reach ...795028..., this contributes 50 to the sequence but not "02". - _N. J. A. Sloane_, Feb 08 2017

%H Michael De Vlieger, <a href="/A105177/b105177.txt">Table of n, a(n) for n = 1..10000</a>

%H Zak Seidov, <a href="/A105177/a105177.txt">Digits in the order that they appear the n-th time</a>.

%e From _Michael De Vlieger_, Feb 09 2017: (Start)

%e Consider the decimal expansion of Pi=3.1415926535897932384626...

%e 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).

%e 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)

%t 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 *)

%Y Cf. A000796, A282171.

%K base,nonn,look

%O 1,1

%A _Zak Seidov_, Apr 29 2005

%E Changed definition to make it into an infinite sequence. - _N. J. A. Sloane_, Feb 08 2017