|
|
A112620
|
|
If b(n,1) = n; b(n,m) is number of terms among {b(n,1), b(n,2), ..., b(n,m-1)} which are coprime to m, then a(n) = b(n,n).
|
|
0
|
|
|
1, 0, 1, 1, 3, 1, 5, 4, 5, 3, 9, 3, 11, 8, 6, 9, 15, 5, 17, 8, 12, 11, 21, 7, 18, 13, 12, 12, 27, 7, 29, 19, 15, 18, 24, 12, 35, 23, 23, 17, 39, 12, 41, 20, 19, 25, 45, 18, 38, 24, 23, 26, 51, 21, 40, 30, 35, 31, 57, 18, 59, 38, 37, 38, 47, 24, 65, 36, 38, 27, 69, 24, 71, 41, 36, 43
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
COMMENTS
|
When calculating the sequence, GCD(0,m) = m, so 0 is to be considered coprime only to 1.
|
|
LINKS
|
|
|
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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|