%I #64 May 30 2024 15:55:11
%S 1,7,13,19,23,29,37,43,47,53,61,71,73,79,89,97,101,103,107,113,131,
%T 137,139,149,151,163,167,173,181,193,197,199,223,227,229,233,239,251,
%U 257,263
%N Sieved recursive primeth recurrence (see Comments for precise definition).
%C This is a sieve constructed on the baise of A007097 (the "primeth recurrence"). Delete the elements of A007097 in the list of the prime numbers and take the smallest remaining prime and call it a(2). Start a new primeth recurrence series with a(2) as starting element instead of 1. Take b(1) to be a(2), then b(2) is the b(1)-th prime, then b(3) is the b(2)-th prime and so on. Delete also the numbers b(i) of this new sequence from the primes. Again take the smallest remaining prime and callit a(3). Start a new primeth recurrence series with this number a(3) as starting element. Continue this process and retain all smallest elements 1, a(2), a(3), a(4), ... The resulting sequence is 1, 7, 13, 19, 23, 29, 37, 43, 47, 53, 61, 71, 73, 79, 89, 97, 101, 103, 107, 113, 131, 137, 139, 149, 151, 163, 167, 173, 181, 193, 197, 199, 223, 227, 229, 233, 239, 251, 257, 263, ...
%C Appears to be essentially the same as A088982 and A007821. - _R. J. Mathar_, Aug 22 2019
%e First term a(1)=1.
%e For the 2nd term: take all primes and delete the primes from the sequence A007097 : 1,2,3,5,11,31,127, ..
%e This gives: 7,13,17,19, .. (1)
%e The smallest term is 7. Our a(2)=7.
%e Now construct an A007097 series with the starting term 7 instead of 1.
%e The 7th prime is 17. The 17th prime is 59. the 59th prime is 277. The numbers to delete from series (1) are 7,17,59,277 ..
%e This gives: 13,19,23,29,.. (2)
%e The smallest term now is 13. Our a(3)=13.
%e The next A007097 like series starting with 13 is the following.
%e 13,41,179,.. which we delete from (2).
%e This gives: 19,23,29,.. (3)
%e The smallest term now is 19. Our a(4)=19.
%e And so on.
%o (Visual Basic)
%o ' Array a(1229,2) filled with the primes under 10000 in the first column.
%o ' Second column for bookkeeping: 1 present, 0 deleted
%o ' Array b receives dynamically the sequence A007097(sta)
%o n=1229
%o sta = 1
%o s = "1"
%o k = 0
%o For k = 1 To 40 ' find 40 terms of A309649
%o ' calculate the A007097(sta) sequence
%o b(1) = sta
%o For i = 2 To 100
%o If b(i - 1) > n Then GoTo 99
%o b(i) = a(b(i - 1), 1)
%o Next i
%o 99:
%o ' delete the A007097(sta) sequence
%o m = i
%o For i = 1 To m - 1
%o For j = 1 To n
%o If a(j, 1) = b(i) Then a(j, 2) = 0
%o Next j
%o Next i
%o ' find smallest left
%o For i = 1 To n
%o If a(i, 2) = 1 Then GoTo 98
%o Next i
%o 98:
%o sta = a(i, 1)
%o s = s & "," & sta
%o Next k
%o ' This can be done certainly much more elegantly in Mathematica.
%Y Cf. A007097.
%K nonn,more
%O 1,2
%A _Eduard Baumann_, Aug 17 2019