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

A233231 a(n) = 10*a(n-3) - a(n-6) + 4 for n>5, a(0)=2, a(1)=3, a(2)=5, a(3)=12, a(4)=29, a(5)=51.

Original entry on oeis.org

2, 3, 5, 12, 29, 51, 122, 291, 509, 1212, 2885, 5043, 12002, 28563, 49925, 118812, 282749, 494211, 1176122, 2798931, 4892189, 11642412, 27706565, 48427683, 115248002, 274266723, 479384645, 1140837612, 2714960669, 4745418771, 11293128122, 26875339971
Offset: 0

Views

Author

Frank M Jackson, Dec 06 2013

Keywords

Comments

Apart from a(0), a(n) such that the triple (5,a(n),a(n)+1) forms a Heronian triangle. Equivalently, a(n) such that 6*(a(n)+3)*(a(n)-2) is a square. Note that this sequence generates all Heronian triples with a fixed side of 5 except (5,5,8) which is the only solution to Heronian triples of the form (5,x,x+3).

Examples

			a(5)=29 as the triangle with sides (5,29,30) has integer area 72.
		

Crossrefs

Programs

  • Mathematica
    seq[n_] := seq[n]=Which[n==0, 2, n==1, 3, n==2, 5, n==3, 12, n==4, 29, n==5, 51, True, 10seq[n-3]-seq[n-6]+4]; Table[seq[m], {m, 0, 100}]
    LinearRecurrence[{1, 0, 10, -10, 0, -1, 1}, {2, 3, 5, 12, 29, 51, 122}, 30] (* T. D. Noe, Dec 09 2013 *)

Formula

G.f.: (2 + x + 2*x^2 - 13*x^3 + 7*x^4 + 2*x^5 + 3*x^6)/((1 - x)*(1 - 10*x^3 + x^6)). [Bruno Berselli, Dec 09 2013]
a(n) = a(n-1) + 10*a(n-3) - 10*a(n-4) - a(n-6) + a(n-7) for n>6. [Bruno Berselli, Dec 09 2013]

A233232 Primes p such that a Heronian triangle with a fixed side length of 5 contains p as another side length.

Original entry on oeis.org

3, 5, 13, 29, 509, 1213, 4892189, 111790443613, 8585304626467575518951161931678989213, 196181078582773936644856635510156388051229, 18087581947968179558090719299773079036323829315869
Offset: 1

Views

Author

Frank M Jackson, Dec 06 2013

Keywords

Comments

The triangle inequality requires that any integer triangle with a fixed side length of 5 can have remaining side lengths of (x, x+1),...,(x, x+4). The constraint that primitive Heronian triangles have only one even side will just permit (x, x+1) and (x, x+3). Also there is only one solution for the triple (5, x, x+3) namely (5, 5, 8). So a(n) = x or x+1 whenever the Heronian triangle has x or x+1 as a prime and n is the ordered occurrence of this prime. The ordered sequence of x is given by A233231 where x(n) = 10x(n-3)-x(n-6)+4, x(0)=2, x(1)=3, x(2)=5, x(3)=12, x(4)=29, x(5)=51 starting at x(1).

Examples

			a(4)=29 because the triangle with sides (5, 29, 30) is Heronian, 29 is prime and is the 4th occurrence of such a prime.
		

Crossrefs

Programs

  • Mathematica
    seq[n_] := seq[n]=Which[n==0, 2, n==1, 3, n==2, 5, n==3, 12, n==4, 29, n==5, 51, True, 10seq[n-3]-seq[n-6]+4]; lst={}; Do[Which[PrimeQ[seq[m]], AppendTo[lst, seq[m]], PrimeQ[seq[m]+1], AppendTo[lst, seq[m]+1], True, Null], {m, 1, 400}]; lst
    t = LinearRecurrence[{1, 0, 10, -10, 0, -1, 1}, {2, 3, 5, 12, 29, 51, 122}, 400]; Select[Union[t, t + 1], PrimeQ[#] &] (* T. D. Noe, Dec 09 2013 *)

Formula

Primes of the form x(m) or x(m)+1 where x(m) is given by x(m) = 10x(m-3)-x(m-6)+4, x(0)=2, x(1)=3, x(2)=5, x(3)=12, x(4)=29, x(5)=51 starting at x(1).

A237518 Least primes that together with prime(n) forms a Heronian triangle, starting at n = 2.

Original entry on oeis.org

5, 3, 4729, 13, 5, 17, 37, 5280071830550089, 5, 97, 13, 17, 61, 1824001, 53, 109, 11, 3301, 1009, 19, 241, 241, 17, 11, 29, 409, 6841, 11, 17, 3169, 181, 41, 157, 3, 457, 13, 10369, 231781748893580717709514473745694370721, 173, 277, 19, 7297, 31, 53, 3049, 373
Offset: 2

Views

Author

Frank M Jackson, Feb 08 2014

Keywords

Comments

It has been proved that for every integer i > 2 there exists an infinite series of side pairs (j, k) that together with i form a Heronian triangle. It is conjectured that for every prime(n) where n > 1 there exists an infinite series of side pairs (p, q) that together with prime(n) form a Heronian triangle such that either p or q is also prime. See A230666 and A233232 for prime(2) and prime(3). a(n) is the sequence of least such primes for prime(n).

Examples

			a(18)=11 as prime(18)=61, the triple (11, 60, 61) is Heronian and right angled with area=330 and 61 is the least such prime. prime(18)=61==1 mod 4 and a(18)=11==3 mod 4 and prime(18)>a(18).
		

Crossrefs

Programs

  • Mathematica
    maxn = 150000; nn=Prime[Range[maxn]]; lst={}; nn1=Prime[Range[2, 100]]; Do[Do[s=(a+b+c)/2; If[IntegerQ[s], area2=s(s-a)(s-b)(s-c); If[area2>0 && IntegerQ[Sqrt[area2]], (AppendTo[lst, b]; Break[])]]; If[b==Prime[maxn], AppendTo[lst, 0]; Break[]], {b, nn}, {a, b-c+2, b+c-2, 2}], {c, nn1}]; lst
    (* 1st Program *)
    q=23; d=1; nextpair[{y0_, x0_}] := (y=23; x=4; y1=y*y0+x*x0*33; x1=x0*y+y0*x; {y1, x1}); pair=nextpair[{0, q}]; While[!PrimeQ[(pair[[2]]-d)/2] && !PrimeQ[(pair[[2]]-d)/2+d], pair=nextpair[pair]]; primepair={(pair[[2]]-d)/2, (pair[[2]]-d)/2+d}; primepair(* 2nd Program *)
    q=167; d=25; y=88751; x=2150; nextpair[{y0_, x0_}] := (If[IntegerQ[(q^2-d^2)/16], k=(q^2-d^2)/16, k=(q^2-d^2)/4]; y1=y*y0+x*x0*k; x1=x0*y+y0*x; {y1, x1}); pair=nextpair[{0, q}]; While[!PrimeQ[(pair[[2]]-d)/2] && !PrimeQ[(pair[[2]]+d)/2], pair=nextpair[pair]]; primepair={(pair[[2]]-d)/2, (pair[[2]]+d)/2}; primepair(* 3rd Program *)

Formula

Apart from searching through the first 150000 prime numbers for each prime(n) to form a Heronian triangle (1st Mathematica program), more difficult primes e.g. prime(9)=23 and prime(39)=167 require Pell-type equations to be solved and searched for these least primes (2nd and 3rd Mathematica programs). If a Heronian triangle has side length triples of the form (q, p, p+d) where q = prime(n) and d is odd such that 0 > d > p, then the Pell-type equation is of the form Y^2 - K*X^2 = -J with Y^2 = 4*Area^2/g, X = 2p+d, K = (q^2-d^2)/(4g), J = q^2(q^2-d^2)/(4g) and g = 4 if 16|(q^2-d^2) else g = 1. Other constraints on these primes (see Links) will only permit the following valid pairings:-
prime(n) == 3 mod 4 and a(n) == 1 mod 4
prime(n) == 1 mod 4 and a(n) == 3 mod 4 and prime(n) > a(n)
prime(n) == 1 mod 4 and a(n) == 1 mod 4.
Showing 1-3 of 3 results.