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-8 of 8 results.

A055034 a(1) = 1, a(n) = phi(2*n)/2 for n > 1.

Original entry on oeis.org

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

Views

Author

Shawn Cokus (Cokus(AT)math.washington.edu)

Keywords

Comments

For n > 1, gives number of times n appears in A094192. - Lekraj Beedassy, Jun 04 2004
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

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
		

Crossrefs

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

A094193 Values y of the generator pairs (x, y), x>y of primitive Pythagorean triples, sorted on x.

Original entry on oeis.org

1, 2, 1, 3, 2, 4, 1, 5, 2, 4, 6, 1, 3, 5, 7, 2, 4, 8, 1, 3, 7, 9, 2, 4, 6, 8, 10, 1, 5, 7, 11, 2, 4, 6, 8, 10, 12, 1, 3, 5, 9, 11, 13, 2, 4, 8, 14, 1, 3, 5, 7, 9, 11, 13, 15, 2, 4, 6, 8, 10, 12, 14, 16, 1, 5, 7, 11, 13, 17, 2, 4, 6, 8, 10, 12, 14, 16, 18, 1, 3, 7, 9, 11, 13, 17, 19, 2, 4, 8, 10, 16
Offset: 1

Views

Author

Lekraj Beedassy, May 25 2004

Keywords

Comments

The generated primitive Pythagorean triple (X, Y, Z), with XA120098, Y=A120097, Z=A094194. - Lekraj Beedassy, Jul 12 2006

References

  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, page 145.

Crossrefs

A094194 Hypotenuses x^2 + y^2 of primitive Pythagorean triangles, sorted on values x of the generator pair (x, y), x>y.

Original entry on oeis.org

5, 13, 17, 25, 29, 41, 37, 61, 53, 65, 85, 65, 73, 89, 113, 85, 97, 145, 101, 109, 149, 181, 125, 137, 157, 185, 221, 145, 169, 193, 265, 173, 185, 205, 233, 269, 313, 197, 205, 221, 277, 317, 365, 229, 241, 289, 421, 257, 265, 281, 305, 337, 377, 425, 481, 293
Offset: 1

Views

Author

Lekraj Beedassy, May 25 2004

Keywords

Comments

For ordered hypotenuses of primitive Pythagorean triangles see A020882.
The hypotenuse Z of the primitive Pythagorean triple (X, Y, Z) with Xy (x and y coprime and not both odd) using the relation Z = x^2 + y^2. The even leg is 2*x*y and the odd leg is x^2 - y^2. [From Lekraj Beedassy, May 06 2010]

References

  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, page 145.

Crossrefs

Extensions

Inserted a sqrt(.) operation in the definition - R. J. Mathar, Apr 12 2010
Deleted incorrect sqrt in definition (based on author's initial comment) - Aaron Kastel, Oct 30 2012

A126611 Sum x+y of generator pairs (x, y) {x and y coprime and not both odd} of primitive Pythagorean triangles, sorted.

Original entry on oeis.org

3, 5, 5, 7, 7, 7, 9, 9, 9, 11, 11, 11, 11, 11, 13, 13, 13, 13, 13, 13, 15, 15, 15, 15, 17, 17, 17, 17, 17, 17, 17, 17, 19, 19, 19, 19, 19, 19, 19, 19, 19, 21, 21, 21, 21, 21, 21, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 27, 27, 27, 27
Offset: 1

Views

Author

Lekraj Beedassy, Feb 07 2007

Keywords

Comments

Also, the square root of the sum of even leg and hypotenuse of primitive Pythagorean triangles, sorted.

Crossrefs

Formula

2n-1 appears A072451(n) times.

A147847 Concerning hypotenuses of triangles such that the sum of the two legs is a perfect square.

Original entry on oeis.org

2, 3, 4, 4, 5, 6, 5, 6, 7, 8, 7, 7, 8, 9, 8, 10, 8, 9, 10, 9, 11, 12, 10, 11, 10, 13, 11, 14, 11, 12, 11, 13, 12, 14, 15, 12, 16, 13, 14, 13, 13, 15, 13, 16, 17, 18, 14, 14, 14, 16, 15, 17, 16, 19, 20, 15, 17, 16, 18, 16, 19, 17, 16
Offset: 0

Views

Author

Paul Curtz, Nov 15 2008

Keywords

Comments

The sequence of b's considered in A145906.
A094192 is apparently derived by sorting into natural order.

Examples

			(a,b,c,d,e,f,g,h) = (1,2,1,3,1,5,4,9) with N=7 or (1,3,2,5,7,13,6,19) with N=17 or (3,4,1,5,7,17,10,27) with N=23 or (1,4,3,7,17,25,8,33) with N=31.
		

Crossrefs

Cf. A143732.

A309424 Sum x+y of generator pairs (x, y) {x and y coprime and not both odd} of primitive Pythagorean triangles, sorted by x and y (for same x).

Original entry on oeis.org

3, 5, 5, 7, 7, 9, 7, 11, 9, 11, 13, 9, 11, 13, 15, 11, 13, 17, 11, 13, 17, 19, 13, 15, 17, 19, 21, 13, 17, 19, 23, 15, 17, 19, 21, 23, 25, 15, 17, 19, 23, 25, 27, 17, 19, 23, 29, 17, 19, 21, 23, 25, 27, 29, 31, 19, 21, 23, 25, 27, 29, 31, 33, 19, 23, 25, 29, 31, 35, 21, 23, 25, 27, 29, 31, 33, 35, 37, 21, 23, 27, 29, 31, 33, 37, 39
Offset: 1

Views

Author

Rui Lin, Jul 31 2019

Keywords

Comments

This sequence is based on x and y (for same x) in increasing order, directly mapping to A094192 and A094193, while A126611 is sorted by the sum x+y.
Given any 2 of below 4 sequences, primitive Pythagorean triangles can be generated.
A094192: the bigger one in generator pairs;
A094193: the smaller one in generator pairs;
A309424: the sum of generator pairs;
A309425: the difference of generator pairs.

Crossrefs

Formula

a(n) = A094192(n) + A094193(n).

A309425 Difference x-y of generator pairs (x,y) {x and y coprime and not both odd, x > y} of primitive Pythagorean triangles, sorted by x and y (for same x).

Original entry on oeis.org

1, 1, 3, 1, 3, 1, 5, 1, 5, 3, 1, 7, 5, 3, 1, 7, 5, 1, 9, 7, 3, 1, 9, 7, 5, 3, 1, 11, 7, 5, 1, 11, 9, 7, 5, 3, 1, 13, 11, 9, 5, 3, 1, 13, 11, 7, 1, 15, 13, 11, 9, 7, 5, 3, 1, 15, 13, 11, 9, 7, 5, 3, 1, 17, 13, 11, 7, 5, 1, 17, 15, 13, 11, 9, 7, 5, 3, 1, 19, 17, 13, 11, 9, 7, 3, 1
Offset: 1

Views

Author

Rui Lin, Jul 31 2019

Keywords

Comments

This sequence is based on x and y (for same x) in increasing order, directly mapping to A094192 and A094193, while A126637 is sorted by the sum x+y.
Given any two of the four sequences below, primitive Pythagorean triangles can be generated.
A094192: the bigger one in generator pairs;
A094193: the smaller one in generator pairs;
A309424: the sum of generator pairs;
A309425: the difference of generator pairs.

Crossrefs

Formula

a(n) = A094192(n) - A094193(n).

A126637 Difference x-y of generator pairs (x,y) {x and y coprime and not both odd, x>y} of primitive Pythagorean triangles, sorted on values x+y (A126611), then on x-y.

Original entry on oeis.org

1, 1, 3, 1, 3, 5, 1, 5, 7, 1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 11, 1, 7, 11, 13, 1, 3, 5, 7, 9, 11, 13, 15, 1, 3, 5, 7, 9, 11, 13, 15, 17, 1, 5, 11, 13, 17, 19, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 1, 3, 7, 9, 11, 13, 17, 19, 21, 23, 1, 5, 7, 11
Offset: 1

Views

Author

Lekraj Beedassy, Feb 08 2007

Keywords

Comments

This sequence gives the consecutive rows n = 2*m + 1, for m >= 1, of the array A216319. See the example. - Wolfdieter Lang, Oct 24 2019

Examples

			From _Wolfdieter Lang_, Oct 24 2019: (Start)
From the array A216319 with n = 2*m + 1 = x + y, for m >= 1, the (x, y) values giving the terms of the present sequence as values x-y are:
m, n \ k    1      2      3      4      5      6 ...   x-y values
--------------------------------------------------------------------
1,  3:   (2,1)                                         1
2,  5:   (3,2) (4,1)                                   1 3
3,  7:   (4,3) (5,2)   (6,1)                           1 3  5
4,  9:   (5,4) (7,2)   (8,1)                           1 5  7
5, 11:   (6,5) (7,4)   (8,3)  (9,2) (10,1)             1 3  5  7  9
6, 13:   (7,6) (8,5)   (9,4) (10,3) (11,2) (12,1)      1 3  5  7  9  11
7, 15:   (8,7) (11,4) (13,2) (14,1)                    1 7 11 13
... (End)
		

Crossrefs

Showing 1-8 of 8 results.