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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A132724 Number of occurrences through n^2 of the longest gap between numbers relatively prime to n (A132468). 0
0, 1, 2, 7, 4, 6, 6, 31, 26, 10, 10, 24, 12, 14, 30, 127, 16, 54, 18, 40, 42, 22, 22, 96, 124, 26, 242, 56, 28, 60, 30, 511, 66, 34, 70, 216, 36, 38, 78, 160, 40, 84, 42, 88, 270, 46, 46, 384, 342, 250, 102, 104, 52, 486, 110, 224, 114, 58, 58, 240, 60, 62, 378, 2047, 130 (list; graph; refs; listen; history; internal format)
OFFSET

1,3

EXAMPLE

For n=3, the longest gap in 1, 2, 4, 5, 7, 8 is 1, between 2 and 4 and again between 5 and 7, so a(3) = 2.

For n=4, the longest gap in 1, 3, 5, 7, 9, 11, 13, 15 is 1, at (1,3), (3,5), (5,7), (7,9), (9,11), (11,13) and (13,15), so a(4) = 7.

The numbers coprime to 6 and smaller than 36 are {1, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35}, the largest distance between two consecutive terms is 4; 4 appears as a distance in the cases (1,5),(7,11),(13,17),(19,23),(25,29) and (31,35) - it appears 6 times. Therefore a(6)=6.

MATHEMATICA

a = {}; For[n = 1, n < 70, n++, b = Select[Range[1, n^2], GCD[ #, n] == 1 &]; m = 0; For[j = 1, j < Length[b], j++, If[b[[j + 1]] - b[[j]] > m, m = b[[j + 1]] - b[[j]]]]; c = 0; For[j = 1, j < Length[b], j++, If[b[[j + 1]] - b[[j]] == m, c++ ]]; AppendTo[a, c]]; a - Stefan Steinerberger (stefan.steinerberger(AT)gmail.com), Nov 20 2007

CROSSREFS

Cf. A132468.

Sequence in context: A049249 A198036 A197143 * A175641 A021368 A019968

Adjacent sequences:  A132721 A132722 A132723 * A132725 A132726 A132727

KEYWORD

easy,nonn

AUTHOR

Jonathan Vos Post (jvospost3(AT)gmail.com), Nov 16 2007

EXTENSIONS

Corrected and extended by Stefan Steinerberger (stefan.steinerberger(AT)gmail.com), Nov 20 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 14:37 EST 2012. Contains 205822 sequences.