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 A053670 #26 Jul 02 2025 16:01:59 %S A053670 3,5,5,3,7,5,3,5,7,3,5,5,3,11,7,3,5,5,3,11,5,3,5,7,3,5,5,3,7,7,3,5,5, %T A053670 3,11,5,3,5,7,3,5,5,3,7,7,3,5,5,3,7,5,3,5,7,3,5,5,3,7,7,3,5,5,3,7,5,3, %U A053670 5,11,3,5,5,3,7,7,3,5,5,3,7,5,3,5,11,3,5,5,3,7,11,3,5,5,3,7,5,3,5,7,3,5 %N A053670 Least number coprime to n and n+1. %C A053670 A179675(n) = smallest m such that a(m) = n-th odd prime. - _Reinhard Zumkeller_, Jul 23 2010 %H A053670 Reinhard Zumkeller, <a href="/A053670/b053670.txt">Table of n, a(n) for n = 1..10000</a> %t A053670 a[n_] := For[k = 3, True, k++, If[CoprimeQ[k, n, n+1], Return[k]]]; Table[a[n], {n, 1, 101}] (* _Jean-François Alcover_, Sep 20 2012 *) %o A053670 (Haskell) %o A053670 a053670 n = head [x | x <- [3, 5 ..], %o A053670 n `gcd` x == 1, (n + 1) `gcd` x == 1] %o A053670 -- _Reinhard Zumkeller_, Dec 28 2012 %o A053670 (PARI) a(n)=my(N=n*(n+1),k=2); while(gcd(k++,N)>1,); k \\ _Charles R Greathouse IV_, Nov 10 2015 %o A053670 (Python) %o A053670 from math import gcd %o A053670 def a(n): %o A053670 k, m = 3, n*(n+1) %o A053670 while gcd(k, m) != 1: k += 2 %o A053670 return k %o A053670 print([a(n) for n in range(1, 102)]) # _Michael S. Branicky_, Sep 25 2021 %Y A053670 Cf. A053669-A053674. %K A053670 nonn,nice,easy %O A053670 1,1 %A A053670 _Henry Bottomley_, Feb 15 2000 %E A053670 More terms from Andrew Gacek (andrew(AT)dgi.net), Feb 21 2000 and _James Sellers_, Feb 22 2000