OFFSET
1,5
COMMENTS
P. Erdős conjectured that a(n) > 0 on a set of asymptotic density 1, then Luca and Pomerance proved this conjecture (see link).
REFERENCES
Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section B42, p. 150.
LINKS
Paul Erdős, Problem P. 294, Canad. Math. Bull., Vol. 23, No. 4 (1980), p. 505.
Florian Luca and Carl Pomerance, On some problems of Mąkowski-Schinzel and Erdős concerning the arithmetical functions phi and sigma, Colloq. Math., Vol. 92, No. 1 (2002), pp. 111-130.
FORMULA
MAPLE
with(numtheory):
A := seq(phi(n) - phi(n-phi(n)), n=1..100);
MATHEMATICA
a[n_] := (phi = EulerPhi[n]) - EulerPhi[n - phi]; Array[a, 100] (* Amiram Eldar, Jul 29 2021 *)
PROG
(PARI) a(n) = if (n==1, 1, eulerphi(n) - eulerphi(n-eulerphi(n))); \\ Michel Marcus, Jul 29 2021
(Python)
from sympy import totient as phi
def a(n):
if n == 1: return 1
phin = phi(n)
return phin - phi(n - phin)
print([a(n) for n in range(1, 81)]) # Michael S. Branicky, Jul 29 2021
CROSSREFS
KEYWORD
sign
AUTHOR
Bernard Schott, Jul 29 2021
STATUS
approved