login
Number of nonprimes (1 and composites) in the reduced residue system of n-th primorial number (A002110).
8

%I #23 Sep 03 2024 08:25:03

%S 1,1,1,1,6,142,2518,49836,1012859,24211838,721500294,22627459401,

%T 844130935668,34729870646918,1491483322755274,69890000837179157,

%U 3692723747920861125,217158823263305180123,13182405032836651359192,879055475442725460400606

%N Number of nonprimes (1 and composites) in the reduced residue system of n-th primorial number (A002110).

%H Kim Walisch, <a href="https://github.com/kimwalisch/primecount">Fast C++ prime counting function implementation (primecount)</a>.

%F a(n) = A005867(n) - A000849(n) + n.

%F a(n) = A000010(A002110(n)) - A000720(A002110(n)) + A001221(A002110(n)).

%e For n = 3, the 3rd primorial is 30, phi(30) = 8, a(3) = 1 since 1 is nonprime. See A048597.

%e For n = 4, the 4th primorial is 210, the size of its reduced residue system (RRS) is 48 of which 6 are either composite numbers or 1: {1, 121, 143, 169, 187, 209}.

%t Table[Function[P, EulerPhi@ P - # &[PrimePi@ P - n]]@ Product[Prime@ i, {i, n}], {n, 0, 12}] (* _Michael De Vlieger_, May 08 2017 *)

%Y Cf. A000010 (phi), A000720, A002110, A005867, A007625, A048597, A048862.

%K nonn,more

%O 0,5

%A _Labos Elemer_

%E a(14)-a(15) from _Max Alekseyev_, Aug 21 2013

%E a(0) prepended, a(15) corrected, a(16)-a(17) computed from A000849 by _Max Alekseyev_, Feb 21 2016

%E a(18)-a(19) calculated using Kim Walisch's primecount and added by _Amiram Eldar_, Sep 03 2024