OFFSET
1,2
COMMENTS
This sequence contains all prime powers p^k where phi(p^k) and psi(p^k) are equidistant from p^k, and gcd(p^k, phi(p^k)) = gcd(p^k, psi(p^k)) = p^(k - 1). For the prime numbers themselves this is trivial since phi(p) and psi(p) differ from p by 1 and 1^0 = 1.
If prime p|k, then p*k is in the sequence if and only if k is in the sequence. - Robert Israel, Mar 05 2019
EXAMPLE
1 is a term because gcd(1, 1) = gcd(1, 1) = 1.
2 is a term because gcd(2, 1) = gcd(2, 3) = 1.
3 is a term because gcd(3, 2) = gcd(3, 4) = 1.
4 is a term because gcd(4, 2) = gcd(4, 6) = 2.
5 is a term because gcd(5, 4) = gcd(5, 6) = 1.
6 is not a term because gcd(6, 2) <> gcd(6, 12).
7 is a term because gcd(7, 6) = gcd(7, 8) = 1.
MAPLE
filter:= proc(n) local p, F;
F:= numtheory:-factorset(n);
igcd(n, n*mul(1-1/p, p=F)) = igcd(n, n*mul(1+1/p, p=F))
end proc:
select(filter, [$1..200]); # Robert Israel, Mar 05 2019
PROG
(PARI) dpsi(n) = n * sumdivmult(n, d, issquarefree(d)/d); \\ A001615
isok(k) = gcd(k, eulerphi(k)) == gcd(k, dpsi(k)); \\ Michel Marcus, Feb 27 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Torlach Rush, Feb 21 2019
STATUS
approved