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 A308598 #65 Jun 08 2024 00:08:57 %S A308598 2,4,3,6,5,8,7,12,11,14,13,18,17,20,19,24,23,30,29,32,31,38,37,42,41, %T A308598 44,43,48,47,54,53,60,59,62,61,68,67,72,71,74,73,80,79,84,83,90,89,98, %U A308598 97,102,101,104,103,108,107,110,109,114,113,128,127,132,131,138,137,140,139,150,149 %N A308598 The smaller term of the pair (a(n), a(n+1)) is always prime and in each pair there is a composite number; a(1) = 2 and the sequence is always extended with the smallest integer not yet present and not leading to a contradiction. %C A308598 The idea of this sequence comes from A282649 where "larger" replaces "smaller". %C A308598 The sequence is not a permutation of the positive integers. %C A308598 The 1st bisection is A000040 (the primes) and the 2nd bisection is A008864 \ {3} (prime(n) + 1). %C A308598 Consecutive primes p < q separated by composites c = q + 1. - _Michael De Vlieger_, Jun 09 2019 %F A308598 n odd: a(n) = prime((n+1)/2) = A000040((n+1)/2). %F A308598 n even: a(n) = a(n+1) + 1 = prime(n/2 + 1) + 1 = A008864(n/2 + 1). %F A308598 Alternatively, if a(n-1) is prime, a(n) = 1 + min prime > a(n-1) else a(n) = a(n-1) - 1. - _Bill McEachen_, May 16 2024 %e A308598 In the 1st pair of integers (2,4) the smaller term is (2), which is prime; %e A308598 In the 2nd pair of integers (4,3) the smaller term is (3), which is prime; %e A308598 In the 3rd pair of integers (3,6) the smaller term is (3), which is prime; %e A308598 In the 4th pair of integers (6,5) the smaller term is (5), which is prime; %e A308598 In the 5th pair of integers (5,8) the smaller term is (5), which is prime; etc. %t A308598 Fold[Join[#1, {#2, NextPrime@ #2 + 1}] &, {#, NextPrime@ # + 1} &@ 2, Prime@ Range[2, 35]] (* _Michael De Vlieger_, Jun 09 2019 *) %Y A308598 Cf. A000040 (prime numbers), A002808 (composite numbers), A008864 (prime(n) + 1). %Y A308598 Cf. A282649 (similar, with larger term). %Y A308598 Cf. A067747, A073846, A073898 (sequences with same start). %K A308598 nonn %O A308598 1,1 %A A308598 _Bernard Schott_, Jun 09 2019