A055034 a(1) = 1, a(n) = phi(2*n)/2 for n > 1.
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
Offset: 1
Examples
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
Links
- T. D. Noe, Table of n, a(n) for n = 1..2000
- Sameen Ahmed Khan, Trigonometric Ratios Using Algebraic Methods, Mathematics and Statistics, Vol. 9, No. 6 (2021), 899-907.
- Wolfdieter Lang, On the Equivalence of Three Complete Cyclic Systems of Integers, arXiv:2008.04300 [math.NT], 2020.
- Eric Weisstein's World of Mathematics, Trigonometry Angles.
- Wikipedia, Pythagorean triple, Euclid's formula.
Programs
-
Maple
with(numtheory); A055034:=n->ceil(phi(2*n)/2); seq(A055034(k), k=1..100); # Wesley Ivan Hurt, Oct 24 2013 a := n -> if n = 1 then 1 else iquo(NumberTheory:-Totient(2*n), 2) fi: seq(a(k), k = 1..100); # Peter Luschny, Apr 16 2023
-
Mathematica
Join[{1}, EulerPhi[2*Range[2,100]]/2] (* Harvey P. Dale, Aug 12 2011 *)
-
PARI
a(n)=ceil(eulerphi(2*n)/2) \\ Charles R Greathouse IV, Feb 21 2013
-
Python
from sympy import totient def A055034(n): return totient(n<<1)>>1 if n>1 else 1 # Chai Wah Wu, Nov 24 2023
Formula
a(n) = ceiling( phi(2n)/2 ). - Wesley Ivan Hurt, Jun 16 2013
a(n) = Sum_{i=1..n} floor(1 / gcd(2n-i, i)). - Wesley Ivan Hurt, Dec 22 2013
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
Extensions
Better description from Benoit Cloitre, Feb 01 2002
Edited by Ray Chandler, Jul 20 2005
Comments