%I #38 Jul 16 2022 12:28:21
%S 0,2,3,5,7,11,13,19,23,29,33,43,47,59,65,73,81,97,103,121,129,141,151,
%T 173,181,201,213,231,243,271,279,309,325,345,361,385,397,433,451,475,
%U 491,531,543,585,605,629,651,697,713,755,775,807,831,883
%N Number of fractions in Farey series of order n.
%C Essentially the same as A005728.
%H G. C. Greubel, <a href="/A049643/b049643.txt">Table of n, a(n) for n = 0..5000</a>
%H R. K. Guy, <a href="http://www.jstor.org/stable/2322249">The strong law of small numbers</a>. Amer. Math. Monthly 95 (1988), no. 8, 697-712.
%H N. J. A. Sloane, <a href="/A115004/a115004.txt">Families of Essentially Identical Sequences</a>, Mar 24 2021 (Includes this sequence)
%F a(n) = A049641(2*n).
%F From _G. C. Greubel_, Dec 13 2017: (Start)
%F a(n) = 1 + Sum_{k=1..n} phi(k), with a(0)=0.
%F a(n) = A005728(n) for n >= 1. (End)
%F a(n) = a(n-1) + phi(n) for n > 1. - _Robert G. Wilson v_, Dec 13 2017
%t a[0] = 0; a[n_] := 1 + Sum[EulerPhi[k], {k, 1, n}]; Table[a[n], {n, 0, 60}] (* _Jean-François Alcover_, Nov 27 2015 *)
%t a[0] = 0; a[1] = 2; a[n_] := a[n -1] + EulerPhi[n]; Array[a, 55, 0] (* _Robert G. Wilson v_, Dec 13 2017 *)
%t Join[{0},Rest[Accumulate[EulerPhi[Range[0,60]]]+1]] (* _Harvey P. Dale_, Oct 16 2018 *)
%t a[n_] := If[n == 0, 0, FareySequence[n] // Length];
%t Table[a[n], {n, 0, 100}] (* _Jean-François Alcover_, Jul 16 2022 *)
%o (PARI) for(n=0, 30, print1(if(n==0, 0, 1+sum(k=1, n, eulerphi(k))), ", ")) \\ _G. C. Greubel_, Dec 06 2017
%o (Magma) [0] cat [n le 1 select 2 else Self(n-1)+EulerPhi(n): n in [1..60]]; // _G. C. Greubel_, Dec 06 2017
%Y Cf. A000010.
%K nonn,easy,nice
%O 0,2
%A _Clark Kimberling_
|