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 A155879 #16 Apr 09 2021 14:43:20 %S A155879 4,9,10,12,14,15,16,21,22,24,25,26,27,28,30,33,34,35,36,39,40,42,44, %T A155879 45,46,49,50,51,52,54,55,56,57,58,60,62,63,64,65,66,68,69,70,75,76,77, %U A155879 78,80,81,82,84,85,86,87,88,90,91,92,93,94,95,96,98,99,100,104,105,106,108 %N A155879 a(0) = 4; for n > 0, a(n) is the smallest composite number c > a(n-1) such that c - n is also composite. %e A155879 a(0) = 4. Subtracting n = 0 from a(0) gives 4-0 = 4, which is a composite number; subtracting n = 1 from a(1) gives 9-1 = 8, which is a composite number; subtracting n = 2 from a(2) gives 12-2 = 10, which is a composite number; subtracting n = 3 from a(3) gives 15-3 = 12, which is a composite number; etc. %p A155879 isA002808 := proc(n) option remember; RETURN(n>= 4 and not isprime(n)) ; end: A155879:= proc(n) option remember; local a; if n = 0 then 4; else for a from procname(n-1)+1 do if isA002808(a) and isA002808(a-n) then RETURN(a) ; fi; od: fi; end: seq(A155879(n),n=0..100) ; # _R. J. Mathar_, Jan 31 2009 %o A155879 (Python) %o A155879 from sympy import isprime %o A155879 def composite(n): return n >= 4 and not isprime(n) %o A155879 def aupton(nn): %o A155879 alst = [4] %o A155879 for n in range(1, nn+1): %o A155879 an = max(alst[-1] + 1, n + 4) %o A155879 while not (composite(an) and composite(an-n)): an += 1 %o A155879 alst.append(an) %o A155879 return alst %o A155879 print(aupton(68)) # _Michael S. Branicky_, Apr 09 2021 %Y A155879 Cf. A155875. %K A155879 base,easy,nonn %O A155879 0,1 %A A155879 _Eric Angelini_, Jan 29 2009 %E A155879 Corrected from a(2) on by _R. J. Mathar_, Jan 31 2009 %E A155879 Name edited by _Jon E. Schoenfield_, Jan 19 2019