login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
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