|
|
A055034
|
|
a(1) = 1, a(n) = phi(2*n)/2 for n > 1.
|
|
88
|
|
|
1, 1, 1, 2, 2, 2, 3, 4, 3, 4, 5, 4, 6, 6, 4, 8, 8, 6, 9, 8, 6, 10, 11, 8, 10, 12, 9, 12, 14, 8, 15, 16, 10, 16, 12, 12, 18, 18, 12, 16, 20, 12, 21, 20, 12, 22, 23, 16, 21, 20, 16, 24, 26, 18, 20, 24, 18, 28, 29, 16, 30, 30, 18, 32, 24, 20, 33, 32, 22, 24, 35, 24, 36, 36, 20, 36, 30
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
COMMENTS
|
Number of positive integers less than n that are relatively prime to n, and have opposite parity to n, for n >= 2. a(1) = 1. - Anne M. Donovan (anned3005(AT)aol.com), Jul 18 2005 [rewritten by Wolfdieter Lang, Apr 08 2020]
Degree of minimal polynomial of cos(Pi/n) over the rationals. For the minimal polynomials of 2*cos(Pi/n), n >= 1, see A187360. - Wolfdieter Lang, Jul 19 2011
a(n) is, for n >= 2, the number of (positive) odd numbers 2*k+1 < n satisfying gcd(2*k+1,n)=1. See the formula for the zeros of the minimal polynomials A187360. E.g., n=10: 1,3,7,9, hence a(10)=4. - Wolfdieter Lang, Aug 17 2011
a(n) is, for n >= 2, the number of nonzero entries in row n of the triangle A222946. See the Beedassy and Donovan comment. - Wolfdieter Lang, Mar 24 2013
Number of partitions of 2n into exactly two relatively prime parts. - Wesley Ivan Hurt, Dec 22 2013
For n > 1, a(n) is the number of pairs of complex embeddings of the (2n)-th cyclotomic field Q(zeta_(2n)) (there are no real embeddings). Note that Q(zeta_n) = Q(zeta_(2n)) for odd n. By Dirichlet's unit theorem, the group of units of Z[zeta_(2n)] is isomorphic to C_(2n) X Z^{a(n)-1}, where C_(2n) is the group of all (2n)-th roots of unity. - Jianing Song, May 17 2021
For n > 1, a(n) is the number of primitive Pythagorean triples (f,g,h) for which there exist positive integers n and k such that f = 2*n*k, g = n^2 - k^2, h = n^2 + k^2. Let U = {1,2,...,2*n-1}, V = {v element of U: v mod 2 = 0}, W = {w element of U\V: gcd(w,2*n) != 1} and X = {1,2,...,n-1}, Y = {y element of X: n == y (mod 2)}, Z = {z element of X\Y: gcd(z,n) != 1}. Then phi(2*n) = |U| - (|V| + |W|) = 2*n - 1 - (2*|Y| + 2*|Z| + 1) = 2*n - 2 - 2*|Y| - 2*|Z| and phi(2*n)/2 = n - 1 - |Y| - |Z|. This is equivalent to the number of primitive Pythagorean triples (f,g,h), where from n-1 pairs (n,k) the ones with n == k (mod 2) or gcd(n,k) != 1 have to be subtracted. - Felix Huber, Apr 17 2023
|
|
LINKS
|
|
|
FORMULA
|
G.f.: (x + Sum_{n>=1} mu(2n-1) * x^(2n-1) / (1-x^(2n-1))^2) / 2 . - Mamuka Jibladze, Dec 14 2022
Sum_{k=1..n} a(k) ~ c * n^2, where c = 2/Pi^2 = 0.202642... (A185197). - Amiram Eldar, Feb 11 2023
|
|
EXAMPLE
|
a(10) = 4 since the primitive Pythagorean triples generated by Euclid's formula (n, k) -> [2*n*k, n^2 - k^2, n^2 + k^2] are: (10, 1) -> [20, 99, 101]; (10, 3) -> [60, 91, 109]; (10, 7) -> [140, 51, 149]; (10, 9) -> [180, 19, 181]. - Peter Luschny, Apr 16 2023
|
|
MAPLE
|
with(numtheory); A055034:=n->ceil(phi(2*n)/2);
a := n -> if n = 1 then 1 else iquo(NumberTheory:-Totient(2*n), 2) fi:
|
|
MATHEMATICA
|
Join[{1}, EulerPhi[2*Range[2, 100]]/2] (* Harvey P. Dale, Aug 12 2011 *)
|
|
PROG
|
(Python)
from sympy import totient
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,changed
|
|
AUTHOR
|
Shawn Cokus (Cokus(AT)math.washington.edu)
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|