login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A132468 Longest gap between numbers relatively prime to n. 2
0, 1, 1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 3, 2, 1, 1, 3, 1, 3, 2, 3, 1, 3, 1, 3, 1, 3, 1, 5, 1, 1, 2, 3, 2, 3, 1, 3, 2, 3, 1, 5, 1, 3, 2, 3, 1, 3, 1, 3, 2, 3, 1, 3, 2, 3, 2, 3, 1, 5, 1, 3, 2, 1, 2, 5, 1, 3, 2, 5, 1, 3, 1, 3, 2, 3, 2, 5, 1, 3, 1, 3, 1, 5, 2, 3, 2, 3, 1, 5, 2, 3, 2, 3, 2, 3, 1, 3, 2, 3, 1, 5, 1, 3, 4 (list; graph; refs; listen; history; internal format)
OFFSET

1,6

COMMENTS

Here "gap" does not include the endpoints.

FORMULA

a(n) = 1 at every prime power, 3 at 2^a q^b and the unique 2 at 15.

EXAMPLE

E.g. n=3: the longest gap in 1, 2, 4, 5, 7, ... is 1, between 2 and 4, so a(3) = 1.

MATHEMATICA

a[ n_ ] := (Max[ Drop[ #, 1 ]-Drop[ #, -1 ] ]-1&)[ Select[ Range[ n+1 ], GCD[ #, n ]==1& ] ]

CROSSREFS

Equals A048669(n) - 1.

Sequence in context: A155744 A086869 A095345 * A090176 A102396 A095960

Adjacent sequences:  A132465 A132466 A132467 * A132469 A132470 A132471

KEYWORD

nonn

AUTHOR

Michael Kleber (michael.kleber(AT)gmail.com), Nov 16 2007

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 15 17:46 EST 2012. Contains 205835 sequences.