OFFSET
1,2
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..1000
EXAMPLE
a(6)=1 as 2,3,4 and 10 all have gcd(6,x)>1.
MATHEMATICA
a = {1, 2}; Do[AppendTo[a, Total@Select[a, GCD[n, #] == 1 &]], {n, 3, 44}]; a (* Ivan Neretin, Apr 27 2017 *)
PROG
(PARI) { v=vector(100, i, 0); v[1]=1; v[2]=2; print1("1, 2, "); for (i=3, 100, for (j=1, i-1, if (gcd(i, v[j]) == 1, v[i]+=v[j])); print1(v[i]", ")) }
CROSSREFS
KEYWORD
nonn
AUTHOR
Jon Perry, May 24 2003
STATUS
approved