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.

Previous Showing 11-13 of 13 results.

A151961 Semiperimeter of the n-th Heronian triangle.

Original entry on oeis.org

3, 6, 21, 78, 291, 1086, 4053, 15126, 56451, 210678, 786261, 2934366, 10951203, 40870446, 152530581, 569251878, 2124476931, 7928655846, 29590146453, 110431929966, 412137573411, 1538118363678, 5740335881301, 21423225161526, 79952564764803, 298387033897686
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 13 2009

Keywords

Comments

The side lengths are consecutive integers (A016064) and the area is an integer (A011945).
Except for the first term, positive values of x (or y) satisfying x^2 - 4*x*y + y^2 + 27 = 0. - Colin Barker, Feb 08 2014
Except for the first term, positive values of x (or y) satisfying x^2 - 14*x*y + y^2 + 432 = 0. - Colin Barker, Feb 16 2014

Crossrefs

Programs

  • Magma
    I:=[3,6]; [n le 2 select I[n] else 4*Self(n-1)-Self(n-2): n in [1..30]]; // Vincenzo Librandi, Feb 11 2014
    
  • Mathematica
    CoefficientList[Series[3(1-2x)/(1-4x+x^2), {x,0,30}], x] (* Vincenzo Librandi, Feb 11 2014 *)
    3*ChebyshevT[Range[0, 40], 2] (* G. C. Greubel, Oct 10 2022 *)
    LinearRecurrence[{4,-1},{3,6},30] (* Harvey P. Dale, Dec 21 2022 *)
  • PARI
    Vec(3*x*(1-2*x)/(1-4*x+x^2) + O(x^40)) \\ Colin Barker, Oct 12 2015
    
  • SageMath
    [3*chebyshev_T(n, 2) for n in range(41)] # G. C. Greubel, Oct 10 2022

Formula

a(n) = 3 * A001075(n-1). - Joerg Arndt, Oct 10 2022
a(n) = 3*(A016064(n-1) + 1)/2 = 3*A003500(n-1)/2. - R. J. Mathar, Jul 27 2009
From Colin Barker, Mar 30 2012: (Start)
a(n) = 4*a(n-1) - a(n-2).
G.f.: 3*x*(1-2*x)/(1-4*x+x^2). (End)
a(n) = 3*( (2+sqrt(3))*(2-sqrt(3))^n + (2-sqrt(3))*(2+sqrt(3))^n )/2. - Colin Barker, Oct 12 2015

Extensions

More terms from R. J. Mathar, Jul 27 2009

A229098 Smallest area A of Heron triangles with sides (a, b, c) in arithmetic progression of the form b - d(n), b, b + d(n), where d(n) = A091998(n) = 12*n +- 1.

Original entry on oeis.org

6, 156, 126, 546, 3750, 7350, 570, 1176, 14406, 2046, 3216, 4740, 1554, 3354, 43350, 54150, 6180, 3924, 17556, 84966, 3294, 24174, 106134, 7446, 126150, 144150, 28236, 33174, 21294, 10374, 6006, 9264, 16716, 247254, 252150, 277350, 282534, 55944, 75894, 26676
Offset: 1

Views

Author

Michel Lagneau, Sep 13 2013

Keywords

Comments

a(1) = A011945(1).
According to the reference, d(n) is congruent (mod 12) to 1 or -1.
Let the sides be b - d, b, b + d where 1 <= d <= b. Then the semiperimeter s = 3b/2 and by Heron's formula, the area is A = b*sqrt(3*(b^2 - 4*d^2))/4.
The following table gives the first values (d(n), a, b, c, A):
+------+-----+-----+-----+-------+
| d(n) | a | b | c | A |
+------+-----+-----+-----+-------+
| 1 | 3 | 4 | 5 | 6 |
| 11 | 15 | 26 | 37 | 156 |
| 13 | 15 | 28 | 41 | 126 |
| 23 | 29 | 52 | 75 | 546 |
| 25 | 75 | 100 | 125 | 3750 |
| 35 | 105 | 140 | 175 | 7350 |
| 37 | 39 | 76 | 113 | 570 |
| 47 | 51 | 98 | 145 | 1176 |
| 49 | 147 | 196 | 245 | 14406 |

Examples

			a(2) = 156 is in the sequence because d(2) = A091998(2) = 11 and (a, b, c) = (15, 26, 37) => the semiperimeter is (15 + 26 + 37)/2 = 39, and A = sqrt(39*(39-15)*(39-26)*(39-37)) = 156.
		

Crossrefs

Programs

  • Maple
    with(numtheory):u:=0:nn:=1000:lst:={1}:for k from 1 to 10 do:x:=12*k-1:y:=12*k+1:lst:=lst union {x} union {y}:od:for n from 1 to 20 do:ii:=0:d:=lst[n]:for b from 1 to nn while(ii=0)do:s:= b*sqrt(3*(b^2-4*d^2))/4:if s>0 and s=floor(s) then ii:=1:u:=u+1:printf ( "%d %d %d %d \n",u,d,b,s):else fi:od:od:

A286328 Least integer k such that the area of the triangle (prime(n), k, k+1) is an integer.

Original entry on oeis.org

4, 3, 24, 60, 14, 9, 180, 264, 20, 480, 19, 84, 924, 1104, 51, 1740, 155, 2244, 2520, 2664, 3120, 3444, 99, 51, 51, 5304, 5724, 65, 399, 8064, 8580, 9384, 9660, 221, 11400, 12324, 13284, 13944, 14964, 16020, 819, 18240, 194, 99, 19800, 22260, 24864, 25764, 26220
Offset: 2

Views

Author

Michel Lagneau, May 07 2017

Keywords

Comments

The area A of a triangle whose sides have lengths a, b, and c is given by Heron's formula : A = sqrt(s*(s-a)*(s-b)*(s-c)), where s = (a+b+c)/2.
The corresponding areas are 6, 6, 84, 330, 84, 36, 1710, 3036, 210,...
The following table gives the first values of n, the sides (prime(n), k, k+1) and the area A of each triangle.
+-----+---------+------+------+-------+
| n | prime(n)| k | k+1 | A |
+-----+---------+------+------+-------+
| 2 | 3 | 4 | 5 | 6 |
| 3 | 5 | 3 | 4 | 6 |
| 4 | 7 | 24 | 25 | 84 |
| 5 | 11 | 60 | 61 | 330 |
| 6 | 13 | 14 | 15 | 84 |
| 7 | 17 | 9 | 10 | 36 |
| 8 | 19 | 180 | 181 | 1710 |
| 9 | 23 | 264 | 265 | 3036 |
| 10 | 29 | 20 | 21 | 210 |
.......................................
We observe triangles of sides (prime(m), prime(m)+1, prime(m)+2) = (3, 4, 5), (13, 14, 15), (193, 194, 195), (37633, 37634, 37635), ... with the corresponding areas 6, 84, 16296, 613283664, ... (subsequence of A011945).
We observe Pythagorean triangles for n = 2, 3, 4, 5, 8, 9, 10, ....
In this case, if prime(n) < k, the numbers k of the sequence such that prime(n) = sqrt(2k+1) are given by the numbers {4, 24, 60, 180, 264, ...}, subsequence of {A084921} = {4, 12, 24, 60, 84, 144, 180, 264, ...}. If prime(n) > k, the numbers k of the sequence such that prime(n) = sqrt(2k^2+2k+1) are given by the numbers 3, 20, 4059, 23660, ....
From Chai Wah Wu, May 15 2017: (Start)
Assumes triangle has positive area.
Let p = prime(n). Then
(p+1)/2 <= a(n) <= (p^2-1)/2.
a(n) = (p+1)/2 if n > 1 is a term in A062325, i.e. p is of the form m^2+1 (A002496); otherwise, a(n) > (p+1)/2.
a(n) is the smallest k >= (p+1)/2 such that sum_{i=(p+1)/2}^{k} i*(p^2-1)/2 is a square.
These statements follow from the fact that the area of a triangle with sides of length p, k and k+1 is equal to (p^2-1)*((2k+1)^2-p^2)/16.
(End)

Examples

			a(4) = 24 because the area of the triangle (prime(4), 24, 25) = (7, 24, 25) = sqrt(28*(28-7)*(28-24)*(28-25)) = 84, where the semiperimeter 28 = (7+24+25)/2.
		

Crossrefs

Programs

  • Maple
    nn:=10^7:
    for n from 2 to 50 do:
    a:=ithprime(n):ii:=0:
    for k from 1 to nn while(ii=0) do:
    p:=(a+2*k+1)/2:q:=p*(p-a)*(p-k)*(p-k-1):
    if q>0 and floor(sqrt(q))=sqrt(q) then
           ii:=1: printf(`%d, `,k):
          else
          fi:
         od:
        od:
  • Mathematica
    Do[kk=0;Do[s=(Prime[n]+2k+1)/2;If[IntegerQ[s],area2=s(s-Prime[n])(s-k)(s-k-1);If[area2>0&&kk==0&&IntegerQ[Sqrt[area2]],Print[n," ",k];kk=1]],{k,1,3*10^4}],{n,2,10}] (* or *)
    a[n_] := Block[{p = Prime@n, k}, k = (p + 1)/2; While[! IntegerQ@ Sqrt[(4 k^2 - p^2 + 4 k + 1) (p^2 - 1)/16], k++]; k]; a /@ Range[2, 50] (* Giovanni Resta, May 07 2017 *)
  • Python
    from _future_ import division
    from sympy import prime
    from gmpy2 import is_square
    def A286328(n): # assumes n >= 2
        p, area = prime(n), 0
        k, q, kq = (p + 1)//2, (p**2 - 1)//2, (p - 1)*(p + 1)**2//4
        while True:
            area += kq
            if is_square(area):
                return k
            k += 1
            kq += q # Chai Wah Wu, May 15 2017
Previous Showing 11-13 of 13 results.