OFFSET
1,2
COMMENTS
EXAMPLE
The first terms, alongside the earlier terms coprime to n, are:
n a(n) Earlier terms coprime to n
-- ---- --------------------------
1 1 {}
2 2 {1}
3 3 {1, 2}
4 3 {1, 3}
5 4 {1, 2, 3}
6 2 {1}
7 5 {1, 2, 3, 4}
8 4 {1, 3, 5}
9 5 {1, 2, 4, 5}
10 3 {1, 3}
11 6 {1, 2, 3, 4, 5}
12 3 {1, 5}
13 7 {1, 2, 3, 4, 5, 6}
14 4 {1, 3, 5}
15 5 {1, 2, 4, 7}
16 5 {1, 3, 5, 7}
17 8 {1, 2, 3, 4, 5, 6, 7}
18 4 {1, 5, 7}
19 9 {1, 2, 3, 4, 5, 6, 7, 8}
20 5 {1, 3, 7, 9}
PROG
(PARI) pv = Set(); for (n=1, 77, v = 1 + sum(i=1, #pv, gcd(pv[i], n)==1); print1 (v ", "); pv = setunion(pv, Set(v)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Nov 19 2017
STATUS
approved