|
|
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
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|