OFFSET
1,14
COMMENTS
Semitotatives m < n have a regular factor that is the product of prime divisors of n, and a coprime factor that is the product of primes q that are coprime to n.
The unit fractions of semitotatives have a mixed recurrent expansion in base n (See Hardy & Wright).
REFERENCES
G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Sixth Edition, Oxford University Press, 2008, pages 144-145 (last part of Theorem 136).
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
M. De Vlieger, Exploring Number Bases as Tools, ACM Inroads, March 2012, Vol. 3, No. 1, pp. 4-12.
FORMULA
a(n) = n + 1 - phi(n) - Sum_{1 <= k <= n, gcd(n, k) = 1} mu(k)*floor(n/k). - Michael De Vlieger, May 10 2016, after Benoit Cloitre at A010846.
EXAMPLE
For n = 10 with prime divisors {2, 5} and prime totatives {3, 7}, the only semitotative is 6. For n = 16, with the prime divisor 2 and the prime totatives {3, 5, 7, 11, 13}, there are four semitotatives {6, 10, 12, 14}.
MAPLE
f:= n -> n + 1 - numtheory:-phi(n) - add(numtheory:-mobius(k)*floor(n/k), k=select(t -> igcd(n, t)=1, [$1..n])):
map(f, [$1..100]); # Robert Israel, May 10 2016
MATHEMATICA
Table[n + 1 - EulerPhi@ n - Total[MoebiusMu[#] Floor[n/#] &@ Select[Range@ n, CoprimeQ[#, n] &]], {n, 120}] (* Michael De Vlieger, May 10 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael De Vlieger, Jun 11 2014
STATUS
approved