login
Frequency of primes produced by the greedy algorithm of A091652.
1

%I #5 Mar 07 2022 13:56:18

%S 1,1,2,3,1,2,1,1,2,2,1,2,1,1,2,2,6,1,5,1,2,3,4,2,1,5,1,1,2,2,3,3,1,2,

%T 6,6,4,2,3,1,2,1,4,2,2,4,2,1,1,2,2,3,3,3,3,7,5,3,4,1,2,2,1,2,1,5,1,1,

%U 6,2,1,3,2,2,3,1,2,1,1,3,2,4,3,2,5,1,1,5,2,3,9,1,1,3,2,2,6,3,3,4,2,4,5,1,8

%N Frequency of primes produced by the greedy algorithm of A091652.

%t Needs["Statistics`DataManipulation`"]; n=1000; lst=Reverse[Range[2n]]; prms={}; Do[m=lst[[1]]; lst=Delete[lst, 1]; pos=1; While[Not[PrimeQ[m+lst[[pos]]]], pos++ ]; AppendTo[prms, m+lst[[pos]]]; lst=Delete[lst, pos], {i, n}]; First/@Frequencies[prms]

%Y Cf. A091652.

%K easy,nonn

%O 1,3

%A _T. D. Noe_, Jan 26 2004