login
A variation on Flavius's sieves (A099204, A099243): Start with the Chen numbers; at the k-th sieving step, remove every p-th term of the sequence remaining after the (k-1)-st sieving step, where p is the k-th prime; iterate.
0

%I #15 Sep 23 2024 16:15:16

%S 2,5,17,23,53,83,127,167,181,211,281,347,449,467,499,509,641,677,821,

%T 887,941,953,1097,1193,1283,1327,1399,1471,1583,1721,1949,2029,2111,

%U 2213,2351,2381,2447,2549,2609,2777,3061,3137,3257,3307,3511,3539,3797

%N A variation on Flavius's sieves (A099204, A099243): Start with the Chen numbers; at the k-th sieving step, remove every p-th term of the sequence remaining after the (k-1)-st sieving step, where p is the k-th prime; iterate.

%H <a href="/index/J#Josephus">Index entries for sequences related to the Josephus Problem</a>

%e Start with

%e 2 3 5 7 11 13 17 19 23 29 31 37 41 47 53 59 67 71 83 89 101 107 109 113 127 131 ... and delete every second term, giving

%e 2 5 11 17 23 31 41 53 67 83 101 109 127 ... and delete every 3rd term, giving

%e 2 5 17 23 41 53 83 101 127 ... and delete every 5th term, giving

%e 2 5 17 23 53 83 101 127

%e .... Continue forever and what's left is the sequence.

%p ts_chen:= proc(n) local i, ans; ans:=[ ]: for i from 1 to n do if ( isprime(i) = 'true') then if ( isprime(i+2) = 'true' or numtheory[bigomega](i+2) = 2) then ans:=[ op(ans), i ] fi fi od: return ans end: S[1]:=convert(ts_chen(25000), set): for n from 2 to 390 do S[n]:=S[n-1] minus {seq(S[n-1][ithprime(n-1)*i], i=1..nops(S[n-1])/ithprime(n-1))} od: convert(S[390],list);

%t cp=SequencePosition[PrimeOmega[Range[3800]], {1, _, 1|2}][[All, 1]] ;s={}; ps=Prime[Range[100]]; l=Range[400]; Do[l=Drop[l, {First[ps], -1, First[ps]}]; ps=Rest[ps], {17}]; Do[AppendTo[s,cp[[l[[n]]]]] ,{n,47}];s (* _James C. McMahon_, Sep 19 2024 *)

%Y Cf. A099204, A099243, A109611.

%K nonn

%O 1,1

%A _Jani Melik_, May 05 2006