A072451 Number of odd terms in the reduced residue system of 2*n-1.
1, 1, 2, 3, 3, 5, 6, 4, 8, 9, 6, 11, 10, 9, 14, 15, 10, 12, 18, 12, 20, 21, 12, 23, 21, 16, 26, 20, 18, 29, 30, 18, 24, 33, 22, 35, 36, 20, 30, 39, 27, 41, 32, 28, 44, 36, 30, 36, 48, 30, 50, 51, 24, 53, 54, 36, 56, 44, 36, 48, 55, 40, 50, 63, 42, 65, 54, 36, 68, 69, 46, 60, 56
Offset: 1
Keywords
Examples
n=105: phi(105)=48 with 24 odd, 24 even; for even n=2k reduced residue system consists only of odd terms, so number of odd terms equals phi(n). With odd integer 33, A072451(17) = 10 = A003558(16) * A135303(16); or 10 = 5 * 2.
References
- Peter Hilton and Jean Pedersen, A Mathematical Tapestry, Demonstrating the Beautiful Unity of Mathematics, Cambridge University Press, 2010, p. 200.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10000
Programs
-
Maple
A072451 := n -> ceil(numtheory:-phi(2*n-1)/2): seq(A072451(n), n=1..73); # Peter Luschny, Feb 24 2020
-
Mathematica
gw[x_] := Table[GCD[x, w], {w, 1, x}] rrs[x_] := Flatten[Position[gw[x], 1]] Table[Count[OddQ[rrs[2*w-1]], True], {w, 1, 128}] (* Additional programs: *) Table[Count[Range[1, #, 2], k_ /; CoprimeQ[k, #]] &[2 n - 1], {n, 73}] (* or *) Array[If[# == 1, #, EulerPhi[2 # - 1]/2] &, 73] (* Michael De Vlieger, Jul 24 2017 *)
-
PARI
A072451(n) = if(1==n,n,eulerphi(n+n-1)/2); \\ (After Benoit Cloitre's formula) - Antti Karttunen, Jul 24 2017
Formula
a(1) = 1, and for n > 1, a(n) = phi(2n-1)/2. - Benoit Cloitre, Oct 11 2002
It would appear that a(n) = Sum_{k=0..n} abs(Jacobi(k, 2n-2k+1)). - Paul Barry, Jul 20 2005
a(n) = A055034(2*n-1), n >= 1. - Wolfdieter Lang, Feb 07 2020
G.f.: (x + Sum_{n>=1} mu(2n-1) * x^n * (1 + x^(2n-1)) / (1 - x^(2n-1))^2) / 2. - Mamuka Jibladze, Dec 13 2022
Sum_{k=1..n} a(k) ~ c * n^2, where c = 4/Pi^2 = 0.405284... (A185199). - Amiram Eldar, Feb 11 2023
Comments