login
In decimal expansion of Pi=3.1415...: smallest k > n such that the k-th digit equals the n-th digit.
1

%I #12 Apr 11 2021 04:51:51

%S 10,4,20,38,9,13,17,21,11,16,32,19,15,30,31,18,22,25,27,24,23,29,42,

%T 37,26,28,35,44,34,40,39,49,51,54,36,53,58,41,43,48,50,70,45,47,46,56,

%U 65,57,52,69,55,62,68,64,66,59,67,60,63,61,71,91,80,74,87,72,97,75,95

%N In decimal expansion of Pi=3.1415...: smallest k > n such that the k-th digit equals the n-th digit.

%F a(n) = Min{k: k>n and A000796(k)=A000796(n)}.

%F a(n) = A094581(n) + n.

%t nn=100;With[{pd=RealDigits[Pi,10,10nn][[1]]},Flatten[Table[Select[ Flatten[ Position[pd,pd[[i]]]],#>i&,1],{i,nn}]]] (* _Harvey P. Dale_, May 28 2013 *)

%Y Cf. A000796, A094581.

%K nonn,base

%O 1,1

%A _Reinhard Zumkeller_, May 13 2004