|
Search: id:A132468
|
|
|
| A132468 |
|
Longest gap between numbers relatively prime to n. |
|
+0 3
|
|
| 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; listen)
|
|
|
OFFSET
|
1,6
|
|
|
COMMENT
|
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: A051997 A086869 A095345 this_sequence A090176 A102396 A095960
Adjacent sequences: A132465 A132466 A132467 this_sequence A132469 A132470 A132471
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Michael Kleber (michael.kleber(AT)gmail.com), Nov 16 2007
|
|
|
Search completed in 0.002 seconds
|