This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A383732 #47 May 22 2025 09:53:42 %S A383732 32,50,54,65,71,77,96,99,120,139,156,166,209,224,232,235,242,288,299, %T A383732 301,306,320,343,351,405,407,412,429,439,452,458,463,468,475,478,486, %U A383732 506,538,540,544,548,556,559,560,567,569,575,577,584,591,609,621,622,625,626,631,633,634,641 %N A383732 a(n) is the smallest k such that every digit from 0 to 9 appears at least n times among the first k digits of Pi (after the decimal point). %C A383732 The first 6 terms also appear in A037008, the position of the digit 0 in the decimal expansion of Pi. %C A383732 From _Pontus von Brömssen_, May 13 2025: (Start) %C A383732 If the digit "3" before the decimal point is included (but a(n) still represents the number of digits after the decimal point), the first difference to this sequence (i.e., the first time the extra "3" is useful) would be a(229) = 2583 instead of 2597. %C A383732 For d = 0, 1, ..., 9, the smallest n >= 1 for which d is the last digit to occur n times is 1, 146359, 2100, 229, 94, 61, 118, 7, 794, 9734, respectively. %C A383732 (End) %H A383732 Guy Amit, <a href="/A383732/b383732.txt">Table of n, a(n) for n = 1..10000</a> %e A383732 For n = 1, a(1) = 32 since this is the first position in the decimal expansion of Pi such that every digit from 0 to 9 has appeared at least once among the first 32 digits. %e A383732 For n = 2, a(2) = 50 since this is the first position in the decimal expansion of Pi such that every digit from 0 to 9 has appeared at least twice among the first 50 digits. %t A383732 piDigit = Rest[RealDigits[Pi, 10, 700][[1]]]; %t A383732 f[pd_List]:=Module[{res,len,count,n=1},count=CreateDataStructure["FixedArray",ConstantArray[0,10]];res=CreateDataStructure["Queue"];len=Length[pd]; Do[Do[If[pd[[i]]==j-1,count["SetPart",j,1+count["Part",j]]],{j,10}];If[Total[Boole[#>=n]&/@(count["Elements"])]==10,res["Push",i];n++],{i,len}];res["Elements"]];f[piDigit] (* _Shenghui Yang_, May 19 2025 *) (* or *) %t A383732 upto[nd_] := Block[{pi=Rest@ RealDigits[Pi,10,nd][[1]], cnt=0 Range[10], n=1}, Reap[Do[cnt[[pi[[j]] + 1]]++; If[Min[cnt-n] == 0, n++; Sow@j], {j, Length@ pi}]][[2,1]]]; upto[700] (* for older Mma, _Giovanni Resta_, May 22 2025 *) %o A383732 (MATLAB) %o A383732 % Assuming x contains the digits of Pi, x = [1, 4, 1, 5, 9, ...] %o A383732 a = nan(1); %o A383732 counts = zeros(10, 1); %o A383732 n = 1; %o A383732 for i = 1:length(x) %o A383732 for j = 1:10 %o A383732 if x(i) == (j-1) %o A383732 counts(j) = counts(j) + 1; %o A383732 end %o A383732 end %o A383732 if sum(counts>=n) == 10 %o A383732 a(n) = i; %o A383732 n = n + 1; %o A383732 end %o A383732 end %Y A383732 Cf. A000796, A037008. %K A383732 nonn,base %O A383732 1,1 %A A383732 _Guy Amit_, May 07 2025