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.

A246918 The length of the shortest nontrivial integral cevian of an equilateral triangle of side n that divides an edge into two integral parts, or 0 if no such cevian exists.

This page as a plain text file.
%I A246918 #23 Dec 10 2016 19:35:15
%S A246918 0,0,7,0,7,14,13,7,21,14,31,28,43,26,13,14,73,42,91,28,19,62,133,21,
%T A246918 35,86,63,52,211,26,241,28,37,146,31,84,343,182,49,35,421,38,463,124,
%U A246918 39,266,553,42,91,70,79,172,703,126,49,49,97,422,871,52,931,482
%N A246918 The length of the shortest nontrivial integral cevian of an equilateral triangle of side n that divides an edge into two integral parts, or 0 if no such cevian exists.
%C A246918 A cevian is a line segment which joins a vertex of a triangle with a point on the opposite side (or its extension).
%C A246918 A nontrivial cevian is one that does not coincide with a side of the triangle.
%C A246918 For an equilateral triangle of side n, the lengths of its cevians are the values of y in the solutions to x^2-y^2-n*x+n^2=0.
%H A246918 Colin Barker, <a href="/A246918/b246918.txt">Table of n, a(n) for n = 1..10000</a>
%H A246918 Wikipedia, <a href="http://en.wikipedia.org/wiki/Cevian">Cevian</a>
%o A246918 (PARI)
%o A246918 \\ Returns the length of the shortest integral cevian of an equilateral triangle of side n.
%o A246918 shortest(n) = {
%o A246918   s=[];
%o A246918   m=12*n^2;
%o A246918   fordiv(m, f,
%o A246918     g=m\f;
%o A246918     if(f<=g && (f+g)%2==0,
%o A246918       x=(f+g)\2;
%o A246918       if(x%4==0,
%o A246918         s=concat(s, x\4)
%o A246918       )
%o A246918     )
%o A246918   );
%o A246918   s=Colrev(s)~;
%o A246918   if(#s==1, return(0));
%o A246918   for(i=1, #s, if(s[i]!=n, return(s[i])))
%o A246918 }
%o A246918 vector(100, n, shortest(n))
%Y A246918 Cf. A229839, A246919, A246920.
%K A246918 nonn
%O A246918 1,3
%A A246918 _Colin Barker_, Sep 07 2014