The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A118003 a(n) = largest integer <= n which is coprime to A118002(n-1). a(n) = A118002(n) - A118002(n-1). 2
1, 2, 2, 4, 5, 5, 7, 7, 8, 10, 11, 11, 13, 13, 14, 16, 17, 17, 19, 19, 20, 22, 23, 23, 25, 25, 26, 28, 29, 29, 31, 31, 32, 34, 35, 35, 37, 37, 38, 40, 41, 41, 43, 43, 44, 46, 47, 47, 49, 49, 50, 52, 53, 53, 55, 55, 56, 58, 59, 59, 61, 61, 62, 64, 65, 65, 67, 67, 68, 70, 71, 71 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
MAPLE
A118002 := proc(nmax) local a, n ; a := [0] ; while nops(a) < nmax do n := nops(a) ; while gcd(n, op(-1, a)) <> 1 do n := n-1 ; od ; a := [op(a), op(-1, a)+n] ; od ; RETURN(a) ; end: a118002 := A118002(100) : for n from 1 to nops(a118002)-1 do printf("%d, ", op(n+1, a118002)-op(n, a118002)) ; od ; # R. J. Mathar, Jun 06 2007
MATHEMATICA
A110802[n_] := A110802[n] = If[n == 0, 0, Module[{a1 = A110802[n-1], k}, For[k = n, True, k--, If[CoprimeQ[a1, k], Return[a1+k]]]]];
a[n_] := A110802[n] - A110802[n-1];
Table[a[n], {n, 1, 72}] (* Jean-François Alcover, Apr 08 2024 *)
CROSSREFS
Sequence in context: A122543 A334149 A369452 * A159296 A277191 A335129
KEYWORD
nonn
AUTHOR
Leroy Quet, Apr 09 2006
EXTENSIONS
More terms from R. J. Mathar, Jun 06 2007
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 5 04:27 EDT 2024. Contains 373102 sequences. (Running on oeis4.)