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 A344093 #29 Oct 02 2021 08:09:22 %S A344093 1,5,9,6,4,2,8,7,3,11,10,12,14,19,15,18,16,17,21,13,20,26,25,30,27,24, %T A344093 22,29,28,23,32,33,36,38,31,34,35,39,43,42,40,37,45,41,44,47,46,48,58, %U A344093 53,62,49,57,54,52,59,56,50,61,68,51,55,60,63,66,67,74,69,64 %N A344093 a(n) is the smallest positive integer not already in the sequence such that a(n) + a(n-1) is the product of two distinct primes, with a(1) = 1. %C A344093 This sequence is not to be confused with A243625 (similar but with "semiprime" instead of "product of two distinct primes"). This sequence omits squares of primes, whereas semiprimes include them. This sequence is also similar to A055625, in which sums of consecutive terms are primes instead of semiprimes. %C A344093 Interestingly, the first 9 terms are a permutation of the first 9 positive integers. This is also true for the first 12, 21, 30, and 48 terms, and possibly higher values as well. This suggests that every positive integer occurs, but this is unproved. %e A344093 a(4) = 6 because 6 is the smallest k such that a(3) + k is the product of two distinct primes. %t A344093 a[1]=1;a[n_]:=a[n]=(k=1;While[MemberQ[Array[a,n-1],k]||Last/@FactorInteger[a[n-1]+k]!={1,1},k++];k);Array[a,100] (* _Giorgos Kalogeropoulos_, Aug 16 2021 *) %o A344093 (Python) %o A344093 terms = [1] %o A344093 previous = 1 %o A344093 def isValid(num): %o A344093 counter = 0 %o A344093 for possibleDiv in range(1, int(math.sqrt(num)) + 1): %o A344093 if num % possibleDiv == 0: %o A344093 counter += 1 %o A344093 if num/possibleDiv % possibleDiv == 0 and possibleDiv != 1: %o A344093 return False %o A344093 if counter > 2: %o A344093 return False %o A344093 if counter == 2: %o A344093 return True %o A344093 return False %o A344093 def generateSequence(numOfTerms): %o A344093 for i in range(numOfTerms): %o A344093 testNum = 1 %o A344093 valid = False %o A344093 while not valid: %o A344093 if testNum not in terms: %o A344093 possibleNum = previous + testNum %o A344093 if isValid(num): %o A344093 valid = True %o A344093 terms.append(testNum) %o A344093 previous = testNum %o A344093 testNum += 1 %Y A344093 Cf. A243625, A055625, A006881. %K A344093 nonn %O A344093 1,2 %A A344093 _Atticus Stewart_, Aug 15 2021