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 A382091 #10 Mar 15 2025 11:29:29 %S A382091 1,2,4,6,8,10,5,15,3,9,12,14,16,18,20,22,24,21,27,30,25,35,28,26,13, %T A382091 39,33,11,44,32,34,17,51,36,38,19,57,42,40,45,48,46,50,52,54,56,49,63, %U A382091 60,55,65,70,58,29,87,66,62,31,93,69,72,64,68,74,37,111 %N A382091 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest unused positive number such that a(n) shares a factor with a(n-1) while the total number of prime terms of the form 4*k + 1 is never less than those of the form 4*k + 3. %C A382091 Unlike the EKG sequence A064413 the primes do not occur in their natural order, and the terms proceeding and following a prime can be more than two and three times respectively the value of the prime term. In the first 100000 terms the largest ratio found is a(75) = 84, a(76) = 7, with 84/7 = 12. %C A382091 Like the EKG sequence the terms are predominantly concentrated along three lines, but with the addition of at least four more sparsely populated lines; see the attached image. %C A382091 In the first 100000 terms the fixed points are 1, 2, 77, 121; it is likely no more exist. The sequence is conjectured to be a permutation of the positive integers. %C A382091 Note that if the prime form selection rule is reversed so that the total number of primes of the form 4*k + 1 is never more than those of the form 4*k + 3 then the sequence will match the EKG sequence for the first 52082 terms, beyond which a(52083) = 53724 while for the EKG sequence a(52083) = 26861, this later value being the first prime where the prime-race leader changes; see A007350. %H A382091 Scott R. Shannon, <a href="/A382091/b382091.txt">Table of n, a(n) for n = 1..10000</a>. %H A382091 Scott R. Shannon, <a href="/A382091/a382091.png">Image of the first 100000 terms</a>. The green line is a(n) = n. %H A382091 Wikipedia, <a href="https://en.wikipedia.org/wiki/Chebyshev's_bias">Chebyshev's bias</a>. %e A382091 a(5) = 8 as a(4) = 6 and 8 is unused and shares a factor with 6. Note that 3 cannot be chosen as 3 is of the form 4*k + 3, and no primes of form 4*k + 1 have yet occurred. This is the first term to differ from A064413. %e A382091 a(7) = 5 as a(6) = 10 and 5 is unused and shares a factor with 10. This is the first prime of the form 4*k + 1 to occur. %e A382091 a(9) = 3 as a(8) = 15 and 3 is unused and shares a factor with 15. As a prime of the form 4*k + 1 has occurred, one of the form 4*k + 3 is now allowed. %Y A382091 Cf. A064413, A007350, A038698, A027748. %K A382091 nonn %O A382091 1,2 %A A382091 _Scott R. Shannon_, Mar 15 2025