login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A053671
Least number coprime to n, n+1 and n+2.
7
5, 5, 7, 7, 11, 5, 5, 7, 7, 7, 5, 5, 11, 11, 7, 5, 5, 7, 11, 13, 5, 5, 7, 7, 7, 5, 5, 11, 7, 7, 5, 5, 13, 11, 11, 5, 5, 7, 7, 11, 5, 5, 7, 7, 7, 5, 5, 11, 11, 7, 5, 5, 7, 13, 13, 5, 5, 7, 7, 7, 5, 5, 11, 7, 7, 5, 5, 11, 11, 11, 5, 5, 7, 7, 13, 5, 5, 7, 7, 7, 5, 5, 11, 11, 7, 5, 5, 7, 11, 11, 5, 5
OFFSET
1,1
LINKS
MATHEMATICA
a[n_] := (k = 5; While[! (CoprimeQ[k, n] && CoprimeQ[k, n+1] && CoprimeQ[k, n+2]), k++]; k); Table[a[n], {n, 1, 92}] (* Jean-François Alcover, Nov 30 2011 *)
lnc[n_]:=Module[{k=5, c=n+{0, 1, 2}}, While[!And@@CoprimeQ[k, c], k=k+2]; k]; Array[lnc, 100] (* Harvey P. Dale, Mar 01 2015 *)
PROG
(Haskell)
a053671 n = f $ drop 2 a000040_list where
f (p:ps) | (n `mod` p) * ((n+1) `mod` p) * ((n+2) `mod` p) > 0 = p
| otherwise = f ps
-- Reinhard Zumkeller, Mar 19 2011
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
Henry Bottomley, Feb 15 2000
EXTENSIONS
More terms from James A. Sellers, Feb 22 2000
STATUS
approved