login
A362719
Number of numbers k, 1 <= k <= n, such that phi(k) = phi(n-k+1).
1
1, 2, 1, 0, 1, 2, 1, 2, 3, 0, 1, 2, 1, 2, 3, 2, 3, 0, 3, 2, 3, 2, 1, 2, 1, 2, 1, 0, 1, 2, 3, 2, 3, 2, 3, 0, 1, 4, 3, 2, 1, 0, 3, 2, 5, 2, 1, 6, 3, 2, 1, 0, 5, 2, 1, 6, 3, 0, 1, 0, 3, 2, 3, 4, 3, 0, 3, 4, 3, 0, 3, 2, 5, 2, 1, 4, 3, 0, 5, 2, 3, 2, 3, 0, 1, 4, 3, 0, 1, 6, 7, 2, 7, 2, 3
OFFSET
1,2
FORMULA
a(n) = Sum_{k=1..n} [phi(k) = phi(n-k+1)], where phi is the Euler phi function (A000010) and [ ] is the Iverson bracket.
EXAMPLE
a(9) = 3, since phi(4) = phi(9-4+1), phi(5) = phi(9-5+1), and phi(6) = phi(9-6+1).
MATHEMATICA
Table[Sum[KroneckerDelta[EulerPhi[n - k + 1], EulerPhi[k]], {k, n}], {n, 100}]
PROG
(PARI) a(n) = sum(k=1, n, eulerphi(k) == eulerphi(n-k+1)); \\ Michel Marcus, May 01 2023
CROSSREFS
Cf. A000010 (phi).
Sequence in context: A366074 A293439 A144095 * A076092 A080468 A321863
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Apr 30 2023
STATUS
approved