The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A118000 a(0) = 0. a(n) = a(n-1) + (smallest integer >= n which is coprime to a(n-1)). 3

%I

%S 0,1,3,7,11,16,23,30,41,50,61,72,85,98,113,128,145,162,181,200,221,

%T 242,265,288,313,338,365,392,421,450,481,512,545,578,613,648,685,722,

%U 761,800,841,882,925,968,1013,1058,1105,1152,1201,1250,1301,1352,1405,1458

%N a(0) = 0. a(n) = a(n-1) + (smallest integer >= n which is coprime to a(n-1)).

%H Michael De Vlieger, <a href="/A118000/b118000.txt">Table of n, a(n) for n = 0..10000</a>

%e a(7) = 30. 8, 9 and 10 are each not coprime to 30. The smallest integer >= 8 which is coprime to 30 is 11 and so a(8) = a(7) + 11 = 41.

%p 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(100) ; # _R. J. Mathar_, Jun 06 2007

%t FoldList[Block[{k = 0}, While[! CoprimeQ[#1, #2 + k], k++]; #1 + #2 + k] &, 0, Range@ 53] (* _Michael De Vlieger_, Sep 30 2017 *)

%Y Cf. A118001, A118002.

%K nonn

%O 0,3

%A _Leroy Quet_, Apr 09 2006

%E More terms from _R. J. Mathar_, Jun 06 2007

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

Last modified September 26 14:45 EDT 2021. Contains 347668 sequences. (Running on oeis4.)