login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A072455
Number of totients in the reduced residue system of 2n-1.
3
1, 2, 3, 4, 4, 6, 7, 4, 8, 9, 7, 11, 10, 8, 13, 14, 9, 11, 16, 10, 17, 18, 9, 20, 19, 13, 22, 17, 15, 25, 26, 14, 21, 28, 16, 29, 30, 14, 23, 31, 19, 33, 27, 19, 35, 28, 22, 29, 37, 19, 38, 39, 16, 41, 42, 26, 44, 33, 26, 38, 41, 27, 36, 47, 29, 49, 43, 22, 51, 52, 32, 43, 40, 27
OFFSET
1,2
LINKS
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