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.

A229838 Consider all primitive 60-degree triangles with sides A < B < C. The sequence gives the values of A.

Original entry on oeis.org

3, 5, 7, 8, 9, 11, 13, 15, 16, 17, 19, 21, 23, 24, 25, 27, 29, 31, 32, 33, 35, 37, 39, 40, 41, 43, 45, 47, 48, 49, 51, 53, 55, 56, 57, 59, 61, 63, 64, 65, 67, 69, 71, 72, 73, 75, 77, 79, 80, 81, 83, 85, 87, 88, 89, 91, 93, 95, 96, 97, 99, 101, 103, 104, 105
Offset: 1

Views

Author

Colin Barker, Oct 01 2013

Keywords

Comments

A primitive triangle is one for which the sides have no common factor.
A004611 gives the values of B, and A089025 gives the values of C.

Examples

			7 appears in the sequence because there exists a primitive 60-degree triangle with sides 7, 37 and 40.
		

Crossrefs

Programs

  • PARI
    \\ Gives terms not exceeding amax
    \\ e.g. pt60a(25) gives [3,5,7,8,9,11,13,15,16,17,19,21,23,24,25]
    pt60a(amax) = {
      s=[];
      for(m=1, amax\2,
        for(n=1, m-1,
          if((m-n)%3!=0 && gcd(m, n)==1,
            if(2*m*n+n*n<=amax, s=concat(s, 2*m*n+n*n));
            if(m*m-n*n<=amax, s=concat(s, m*m-n*n))
          )
        )
      );
      vecsort(s,,8)
    }

Formula

Empirical g.f.: -x*(x^5-x^4-x^3-2*x^2-2*x-3) / ((x-1)^2*(x^4+x^3+x^2+x+1)).