Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A132468
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
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

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified August 29 17:54 EDT 2008. Contains 143238 sequences.


AT&T Labs Research