OFFSET
1,1
LINKS
R. Tomás, From Farey sequences to resonance diagrams, Phys. Rev. ST Accel. Beams 17, 014001 - Published 29 January 2014.
R. Tomás, Asymptotic behavior of a series of Euler's Totient function times the cardinality of truncated Farey sequences, arXiv:1406.6991 [math.NT], 2014 (see Chapter 5, Evaluating ...).
FORMULA
MATHEMATICA
a[n_] := With[{f = FareySequence[n]}, Sum[EulerPhi[k] FirstPosition[f, 1/k ][[1]], {k, 1, n}]]; Array[a, 50] (* Jean-François Alcover, Sep 26 2018 *)
PROG
(PARI) farey(n) = {vf = [0]; for (k=1, n, for (m=1, k, vf = concat(vf, m/k); ); ); vecsort(Set(vf)); }
a(n) = my(row = farey(n)); sum(k=1, n, eulerphi(k)*vecsearch(row, 1/k));
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Jun 27 2014
STATUS
approved