cp's OEIS Frontend

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.

A053674 Least number coprime to n, n+1, n+2, n+3, n+4 and n+5.

This page as a plain text file.
%I A053674 #23 Jul 02 2025 16:01:59
%S A053674 7,11,11,11,11,13,13,7,17,17,17,11,11,11,7,11,13,13,13,13,17,7,11,11,
%T A053674 11,11,11,13,7,13,13,13,13,11,11,7,11,11,17,13,13,13,7,13,11,11,11,11,
%U A053674 11,7,19,17,13,13,13,11,7,11,11,11,17,17,19,7,19,13,11,11,11,11,7,13
%N A053674 Least number coprime to n, n+1, n+2, n+3, n+4 and n+5.
%C A053674 All terms are primes greater than 5. Records: a(1) = 7, a(2) = 11, a(6) = 13, a(9) = 17, a(51) = 19, a(151) = 23, a(437) = 29, a(779) = 31, a(1766) = 37, a(60605) = 41, a(324596) = 43, a(3555107) = 47, a(14511250) = 53, a(65209022) = 59, a(764050703) = 61, .... - _Charles R Greathouse IV_, Feb 07 2017
%H A053674 Reinhard Zumkeller, <a href="/A053674/b053674.txt">Table of n, a(n) for n = 1..10000</a>
%t A053674 a[n_] := (k = 7; While[ ! And @@ (CoprimeQ[k, #] & ) /@ Range[n, n+5], k++]; k); Table[a[n], {n, 1, 72}] (* _Jean-François Alcover_, Nov 30 2011 *)
%t A053674 cpr[n_]:=Module[{k=7},While[Union[Boole[CoprimeQ[k,n+Range[0,5]]]]!={1},k = NextPrime[ k]];k](* _Harvey P. Dale_, May 12 2022 *)
%o A053674 (Haskell)
%o A053674 import Data.List (elemIndex)
%o A053674 import Data.Maybe (fromJust)
%o A053674 a053674 n = 2 + fromJust
%o A053674    (elemIndex 1 $ map (gcd $ foldl1 lcm $ take 6 [n..]) [2..])
%o A053674 -- _Reinhard Zumkeller_, Sep 25 2011
%o A053674 (PARI) a(n)=my(L=lcm([n..n+5])); forprime(p=7,, if(L%p, return(p))) \\ _Charles R Greathouse IV_, Feb 07 2017
%Y A053674 Cf. A053669-A053673.
%K A053674 nonn,easy,nice
%O A053674 1,1
%A A053674 _Henry Bottomley_, Feb 15 2000
%E A053674 More terms from Andrew Gacek (andrew(AT)dgi.net), Feb 21 2000 and _James Sellers_, Feb 22 2000