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.

A229858 Consider all 120-degree triangles with sides A < B < C. The sequence gives the values of A.

Original entry on oeis.org

3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70
Offset: 1

Views

Author

Colin Barker, Oct 06 2013

Keywords

Comments

A229859 gives the values of B, and A050931 gives the values of C.
This sequence contains every integer larger than 8. - Nathaniel Johnston, Oct 06 2013

Examples

			12 appears in the sequence because there exists a 120-degree triangle with sides 12, 20 and 28.
		

Crossrefs

Programs

  • PARI
    \\ Gives values of A not exceeding amax.
    \\ e.g. t120a(20) gives [3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
    t120a(amax) = {
      v=pt120a(amax);
      s=[];
      for(i=1, #v,
        for(m=1, amax\v[i],
          if(v[i]*m<=amax, s=concat(s, v[i]*m))
        )
      );
      vecsort(s,,8)
    }
    \\ Gives values of A not exceeding amax in primitive triangles.
    \\ e.g. pt120a(20) gives [3, 5, 7, 9, 11, 13, 15, 16, 17, 19]
    pt120a(amax) = {
      s=[];
      for(m=1, (amax-1)\2,
        for(n=1, m-1,
          if((m-n)%3!=0 && gcd(m, n)==1,
            a=m*m-n*n;
            b=n*(2*m+n);
            if(a>b, a=b);
            if(a<=amax, s=concat(s, a))
          )
        )
      );
      vecsort(s,,8)
    }

Formula

a(n) = n+4 for n>4.
a(n) = 2*a(n-1)-a(n-2) for n>6.
G.f.: -x*(x^5-x^4+x^2+x-3) / (x-1)^2.