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 A354154 #17 May 29 2022 01:38:34 %S A354154 0,0,0,0,3,4,4,6,6,6,21,12,14,16,22,18,22,22,20,24,24,20,63,24,28,30, %T A354154 30,30,52,30,86,78,48,48,42,48,48,50,54,54,46,48,44,52,44,46,173,54, %U A354154 60,60,56,54,58,50,58,60,64,58,186,156,58,56,236,78,150,80,78,90,86,90,86,84,88,90,92,96,90,82,86,88,92,88,84,84,84,86,84,82,84 %N A354154 a(1) = 0; for n>1, a(n) = prime(n-1) - A090252(n). %C A354154 Theorem: a(n) >= 0 for all n. %H A354154 N. J. A. Sloane, <a href="/A354154/b354154.txt">Table of n, a(n) for n = 1..10000</a> %e A354154 A090252 begins %e A354154 1, 2, 3, 5, 4, 7, 9, 11, 13, ... %e A354154 and we subtract these numbers from %e A354154 1, 2, 3, 5, 7, 11, 13, 17, 19, ... %e A354154 to get %e A354154 0, 0, 0, 0, 3, 4, 4, 6, 6, ... %o A354154 (Python) %o A354154 from math import gcd, prod %o A354154 from sympy import isprime, nextprime %o A354154 from itertools import count, islice %o A354154 def agen(): # generator of terms %o A354154 alst, aset, mink, p = [1], {1}, 2, 1 %o A354154 yield 0 %o A354154 for n in count(2): %o A354154 k, s, p = mink, n - n//2, nextprime(p) %o A354154 prodall = prod(alst[n-n//2-1:n-1]) %o A354154 while k in aset or gcd(prodall, k) != 1: k += 1 %o A354154 alst.append(k); aset.add(k); yield p - k %o A354154 while mink in aset: mink += 1 %o A354154 print(list(islice(agen(), 89))) # _Michael S. Branicky_, May 28 2022 %Y A354154 Cf. A090252. %K A354154 nonn %O A354154 1,5 %A A354154 _N. J. A. Sloane_, May 28 2022