login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A124741 a(n) = largest of those positive integers which are coprime to both n and n+1 and which are <= n. 5
1, 1, 1, 3, 1, 5, 5, 7, 7, 9, 7, 11, 11, 13, 13, 15, 13, 17, 17, 19, 19, 21, 19, 23, 23, 25, 25, 27, 23, 29, 29, 31, 31, 33, 31, 35, 35, 37, 37, 39, 37, 41, 41, 43, 43, 45, 43, 47, 47, 49, 49, 51, 49, 53, 53, 55, 55, 57, 53, 59, 59, 61, 61, 63, 61, 65, 65, 67, 67, 69, 67, 71, 71 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
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
Sequence in context: A327296 A213612 A186754 * A339419 A213952 A205873
KEYWORD
nonn
AUTHOR
Leroy Quet, Nov 06 2006
EXTENSIONS
Extended by Ray Chandler, Nov 10 2006
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 07:07 EDT 2024. Contains 371964 sequences. (Running on oeis4.)