OFFSET
1,4
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
The positive integers which are coprime to 8 and which are <= 8 are 1,3,5,7. The positive integers which are coprime to 9 and which are <= 9 are 1, 2,4,5,7,8. So a(8) = 7, which is the largest of those integers in both these sequences (1,5,7).
MATHEMATICA
f[n_] := Last @ Select[Range[n], GCD[n, # ] == GCD[n + 1, # ] == 1 &]; Table[f[n], {n, 75}] (* Ray Chandler, Nov 10 2006 *)
Join[{1}, Table[Max[Intersection[Select[Range[n-1], CoprimeQ[ #, n]&], Select[ Range[n-1], CoprimeQ[#, n+1]&]]], {n, 2, 80}]] (* Harvey P. Dale, Jul 08 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Nov 06 2006
EXTENSIONS
Extended by Ray Chandler, Nov 10 2006
STATUS
approved