cp's OEIS Frontend

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.

A309649 Sieved recursive primeth recurrence (see Comments for precise definition).

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