cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A072455 Number of totients in the reduced residue system of 2n-1.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Jun 19 2002

Keywords

Examples

			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.
		

Crossrefs

Programs

  • PARI
    a(n) = {my(m = 2*n-1); sum(k = 1, m, gcd(m, k) == 1 && istotient(k));} \\ Amiram Eldar, Nov 07 2024

Formula

a(n) = phi(2*n-1) - A072454(n). [Corrected by Sean A. Irvine, Oct 04 2024]
Showing 1-1 of 1 results.