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!)
A118000 a(0) = 0. a(n) = a(n-1) + (smallest integer >= n which is coprime to a(n-1)). 3
0, 1, 3, 7, 11, 16, 23, 30, 41, 50, 61, 72, 85, 98, 113, 128, 145, 162, 181, 200, 221, 242, 265, 288, 313, 338, 365, 392, 421, 450, 481, 512, 545, 578, 613, 648, 685, 722, 761, 800, 841, 882, 925, 968, 1013, 1058, 1105, 1152, 1201, 1250, 1301, 1352, 1405, 1458 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
EXAMPLE
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.
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(100) ; # R. J. Mathar, Jun 06 2007
MATHEMATICA
FoldList[Block[{k = 0}, While[! CoprimeQ[#1, #2 + k], k++]; #1 + #2 + k] &, 0, Range@ 53] (* Michael De Vlieger, Sep 30 2017 *)
CROSSREFS
Sequence in context: A082644 A131024 A053982 * A121640 A319258 A112786
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 March 28 10:31 EDT 2024. Contains 371240 sequences. (Running on oeis4.)