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!)
A118001 a(n) = smallest integer >= n which is coprime to A118000(n-1). a(n) = A118000(n) - A118000(n-1). 2
1, 2, 4, 4, 5, 7, 7, 11, 9, 11, 11, 13, 13, 15, 15, 17, 17, 19, 19, 21, 21, 23, 23, 25, 25, 27, 27, 29, 29, 31, 31, 33, 33, 35, 35, 37, 37, 39, 39, 41, 41, 43, 43, 45, 45, 47, 47, 49, 49, 51, 51, 53, 53, 55, 55, 57, 57, 59, 59, 61, 61, 63, 63, 65, 65, 67, 67, 69, 69, 71, 71, 73 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
MAPLE
A118000 := 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: a118000 := A118000(100) : for n from 1 to nops(a118000)-1 do printf("%d, ", op(n+1, a118000)- op(n, a118000)) ; od ; # R. J. Mathar, Jun 06 2007
MATHEMATICA
A110800[n_] := A110800[n] = If[n == 0, 0, Module[{a1 = A110800[n-1], k}, For[k = n, True, k++, If[CoprimeQ[a1, k], Return[a1+k]]]]];
a[n_] := A110800[n] - A110800[n-1];
Table[a[n], {n, 1, 72}] (* Jean-François Alcover, Apr 08 2024 *)
CROSSREFS
Sequence in context: A058568 A339769 A147534 * A182414 A256984 A111138
KEYWORD
nonn
AUTHOR
Leroy Quet, Apr 09 2006
EXTENSIONS
Corrected and extended by 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 April 23 19:56 EDT 2024. Contains 371916 sequences. (Running on oeis4.)