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 A334067 #34 Dec 17 2024 10:31:52 %S A334067 1,2,3,5,6,7,11,13,14,15,16,17,18,19,23,29,31,37,41,43,44,45,46,47,48, %T A334067 49,50,51,52,53,54,59,60,62,63,64,65,67,68,69,70,71,72,73,79,83,89,97, %U A334067 101,103,107,109,113,127,131,132,133,134,135,137,139,140,149 %N A334067 a(n) is taken to be the smallest positive integer greater than a(n-1) which is consistent with the condition "n is a term of the sequence if and only if a(n) is prime" where indices start from 0. %C A334067 a(n) is the minimal sequence for which the sequence generated by the indices of primes in this sequence is equal to itself, where indices start from 0. %C A334067 So if f is a function on 0-indexed integer sequences with infinitely many primes where f returns the increasing sequence of indices of primes of the input sequence b(n), then a(n) is the lexicographically minimal fixed point of f. %C A334067 a(n) has almost the same definition as A079254, except that a(n) starts indices from 0 instead of 1. But the resulting sequences do not seem to have any correlation. %e A334067 a(0) cannot be 0, since then 0 should be prime, which it is not. %e A334067 a(0) = 1 is valid hence a(1) must be the next prime, which is a(1) = 2. %e A334067 Then a(2) should be the next prime, hence a(2) = 3. %e A334067 a(3) should be prime, hence a(3) = 5. %e A334067 Since 4 is not in the sequence so far, a(4) must be the next nonprime, which means a(4) = 6. %o A334067 (Python) %o A334067 # is_prime(n) is a Python function which returns True if n is prime, and returns False otherwise. In the form stated below runs with SageMath. %o A334067 def a_list(length): %o A334067 """Returns the list [a(0), ..., a(length-1)].""" %o A334067 num = 1 %o A334067 b = [1] %o A334067 for i in range(1, length): %o A334067 num += 1 %o A334067 if i in b: %o A334067 while not is_prime(num): %o A334067 num += 1 %o A334067 b.append(num) %o A334067 else: %o A334067 while is_prime(num): %o A334067 num += 1 %o A334067 b.append(num) %o A334067 return b %o A334067 print(a_list(63)) %Y A334067 The same definition as A079254 except here the indices start from 0 instead of 1. %Y A334067 Cf. A079000, A079313. %K A334067 nonn %O A334067 0,2 %A A334067 _Adnan Baysal_, Apr 13 2020