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 A342175 #38 Jul 07 2022 02:12:12 %S A342175 5,19,1,1,11,13,1,1,5,7,1,1,3,1,1,1,1,5,19,1,1,1,1,13,1,1,9,13,1,1,3, %T A342175 1,1,1,1,3,1,1,1,1,5,17,1,1,1,1,19,1,1,11,5,1,1,1,1,7,1,1,3,1,1,1,1,3, %U A342175 1,1,1,1,1,1,19,1,1,11,13,1,1,5,7,1,1,3,1 %N A342175 a(n) is the difference between the n-th composite number and the smallest larger composite to which it is relatively prime. %C A342175 Conjecture: The only nonprime terms are squares (based on checking the first 2 million terms). - _Ivan N. Ianakiev_, Mar 28 2021 %C A342175 The conjecture above is false (see A353203 for counterexamples). - _Ivan N. Ianakiev_, Jul 04 2022 %F A342175 a(n) = A113496(n) - A002808(n). - _Jon E. Schoenfield_, Mar 04 2021 %e A342175 The first composite number is 4, and the smallest larger composite to which it is coprime is 9, so a(1) = 9 - 4 = 5. %e A342175 The second composite number is 6, and the smallest larger composite to which it is coprime is 25, so a(2) = 25 - 6 = 19. %t A342175 Table[Block[{k = 1}, While[Nand[GCD[#, k] == 1, CompositeQ[# + k]], k++]; k] &@ FixedPoint[n + PrimePi@ # + 1 &, n + PrimePi@ n + 1], {n, 83}] (* _Michael De Vlieger_, Mar 19 2021 *) %o A342175 (PARI) lista(nn) = {forcomposite(c=1, nn, my(x=c+1); while (isprime(x) || (gcd(x,c) != 1), x++); print1(x - c, ", "););} \\ _Michel Marcus_, Mar 04 2021 %o A342175 (Python) %o A342175 from sympy import isprime, gcd, composite %o A342175 def A342175(n): %o A342175 m = composite(n) %o A342175 k = m+1 %o A342175 while gcd(k,m) != 1 or isprime(k): %o A342175 k += 1 %o A342175 return k-m # _Chai Wah Wu_, Mar 28 2021 %Y A342175 Cf. A002808, A113496, A353203. %K A342175 nonn %O A342175 1,1 %A A342175 _William C. Laursen_, Mar 04 2021