OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = phi(2*n-1) - A072454(n). [Corrected by Sean A. Irvine, Oct 04 2024]
EXAMPLE
For n=31: reduced residue system(31) = {1,...,30} with 15 odd and 15 even numbers. From the odd terms only the term 1 is totient, while from the 15 even terms, 2 terms, {14,26}, are nontotients, so 13 terms are totients. All totients count 1 + 13 = 14, thus a((31+1)/2) = a(16) = 14.
PROG
(PARI) a(n) = {my(m = 2*n-1); sum(k = 1, m, gcd(m, k) == 1 && istotient(k)); } \\ Amiram Eldar, Nov 07 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jun 19 2002
STATUS
approved