OFFSET
1,5
COMMENTS
When calculating the sequence, GCD(0,m) = m, so 0 is to be considered coprime only to 1.
EXAMPLE
Array b(n,m) (of which this sequence in the main diagonal) begins like this:
1,1,2,2,4,2,6,2,7,... (sequence A096216)
2,0,1,1,3,2,5,4,6,... (sequence A097559)
3,1,1,3,4,2,6,4,5,... (sequence A097560)
4,0,1,1,3,2,5,4,6,... (sequence A097559 except for first term)
5,1,2,2,3,2,6,3,5,... (sequence A097562)
6,0,0,0,1,1,3,3,2,... (sequence A097606)
MATHEMATICA
b[n_] := Module[{a}, a[1] = n; a[k_] := a[k] = Count[ GCD[ Table[ a[i], {i, k - 1}], k], 1]; a[n]]; Array[b, 76] (* Robert G. Wilson v, Dec 27 2005 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Dec 25 2005
EXTENSIONS
a(17)-a(76) from Robert G. Wilson v, Dec 27 2005
STATUS
approved