|
| |
|
|
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
|
| |
|
|