Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A128707
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A128707 Least number having the maximal distance between consecutive integers coprime to n. +0
3
1, 1, 2, 1, 4, 1, 6, 1, 2, 3, 10, 1, 12, 5, 4, 1, 16, 1, 18, 3, 5, 9, 22, 1, 4, 11, 2, 5, 28, 1, 30, 1, 10, 15, 13, 1, 36, 17, 11, 3, 40, 5, 42, 9, 4, 21, 46, 1, 6, 3, 16, 11, 52, 1, 9, 5, 17, 27, 58, 1, 60, 29, 5, 1, 24, 7, 66, 15, 22, 3, 70, 1, 72, 35, 4, 17, 20, 11, 78, 3, 2, 39, 82, 5, 33 (list; graph; listen)
OFFSET

1,3

COMMENT

Let j(n) be the Jacobsthal function (A048669): maximal distance between consecutive integers coprime to n. Then a(n) is the least k>0 such that k+1,k+2,...k+j(n)-1 are not coprime to n. If n is prime and e>0, then j(n^e)=2 and a(n^e)=n-1. If n>2 is prime, then a(2n)=n-2. If m is the squarefree kernal of n (A007947), then j(n)=j(m) and a(n)=a(m). For composite n, a(n)<n/2. Note that a(n)=1 iff n is in sequence A055932. When n is the product of the first r primes (A002110), then a(n)+1 begins (or is inside) a prime gap of size at least A048670(r).

LINKS

T. D. Noe, Table of n, a(n) for n=1..10000

EXAMPLE

The numbers coprime to 10 are 1,3,7,9,11,13,17,19,... Observe that the differences are periodic: 2,4,2,2,2,4,2,... The largest distance between the coprime numbers is 4, which first occurs between 3 and 7. Hence j(10)=4 and a(10)=3.

MATHEMATICA

JacobsthalPos[n_] := Module[{g, d, mx, pos}, g=Select[Range[n+1], GCD[n, # ]==1&]; d=Rest[g]-Most[g]; mx=Max@@d; pos=Position[d, mx, 1, 1][[1, 1]]; g[[pos]]]; Table[JacobsthalPos[n], {n, 100}]

CROSSREFS

Cf. A128708 (number of times the maximal value occurs).

Adjacent sequences: A128704 A128705 A128706 this_sequence A128708 A128709 A128710

Sequence in context: A049559 A063994 A076512 this_sequence A083258 A083259 A009531

KEYWORD

nonn

AUTHOR

T. D. Noe (noe(AT)sspectra.com), Mar 24 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 October 16 00:31 EDT 2008. Contains 145098 sequences.


AT&T Labs Research