OFFSET
1,2
COMMENTS
Limit_{n->oo} a(n)/A002110(n) = 1 because (in the limit) the quotient is the probability that a randomly selected integer contains at least one of the first n primes in its factorization. - Geoffrey Critzer, Apr 08 2010
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..350
FORMULA
EXAMPLE
In the reduced residue system of q(4) = 2*3*5*7 - 210 the number of coprimes to 210 is 48, while a(4) = 210 - 48 = 162 is the number of values divisible by one of the prime factors of q(4).
MATHEMATICA
Abs[Table[ Total[Table[(-1)^(k + 1)* Total[Apply[Times, Subsets[Table[Prime[n], {n, 1, m}], {k}], 2]], {k, 0, m - 1}]], {m, 1, 22}]] (* Geoffrey Critzer, Apr 08 2010 *)
Array[# - EulerPhi@ # &@ Product[Prime@ i, {i, #}] &, 17] (* Michael De Vlieger, Feb 17 2019 *)
PROG
(PARI) a(n) = prod(k=1, n, prime(k)) - prod(k=1, n, prime(k)-1); \\ Michel Marcus, Feb 08 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Feb 28 2000
STATUS
approved