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

A086381 Numbers n such that p=n^2+2 and p+2 are primes.

Original entry on oeis.org

1, 3, 15, 33, 45, 57, 117, 147, 243, 255, 303, 375, 423, 447, 453, 477, 573, 753, 837, 897, 903, 1035, 1497, 1905, 2055, 2085, 2193, 2283, 2433, 2487, 2535, 2583, 2757, 2823, 2943, 2955, 3003, 3213, 3285, 3345, 3603, 3657, 3687, 4407, 4575, 4977, 5037, 5043, 5325, 5355, 5367, 5403, 5727
Offset: 1

Views

Author

Zak Seidov, Sep 07 2003

Keywords

Comments

The twin primes are given by A253639 and A085554. Except for the initial term, all a(n)=3 (mod 6). - M. F. Hasler, Jan 16 2015

Crossrefs

Programs

  • Magma
    [n: n in [0..10000]|IsPrime(n^2+2) and IsPrime(n^2+4)] // Vincenzo Librandi, Dec 16 2010
    
  • PARI
    is_A086381(x)=ispseudoprime(x^2+2)&&ispseudoprime(x^2+4)
    forstep(x=1,9999,2,is_A086381(x)&&print1(x",")) \\ M. F. Hasler, Jan 16 2015

Formula

Intersection of A067201 and A007591. - M. F. Hasler, Jan 19 2015

Extensions

More terms from Vincenzo Librandi, Dec 16 2010

A085554 Greater of twin primes of the form x^2+2, x^2+4.

Original entry on oeis.org

5, 13, 229, 1093, 2029, 3253, 13693, 21613, 59053, 65029, 91813, 140629, 178933, 199813, 205213, 227533, 328333, 567013, 700573, 804613, 815413, 1071229, 2241013, 3629029, 4223029, 4347229, 4809253, 5212093, 5919493, 6185173
Offset: 1

Views

Author

Cino Hilliard, Jul 04 2003

Keywords

Comments

Except for the first term, all a(n)=13 (mod 72) with x=3 (mod 6). The lesser of the twin prime pair is given by A253639, the x-values in A086381. - M. F. Hasler, Jan 18 2015

Crossrefs

Programs

  • Mathematica
    Transpose[Select[Table[x^2+{2,4},{x,5000}],AllTrue[#,PrimeQ]&]][[2]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jan 15 2015 *)
  • PARI
    is_A086381(x)=ispseudoprime(x^2+2)&&ispseudoprime(x^2+4) \\ or is_A067201(x)&&is_A007591(x)
    A085554 = apply(A087475,select(is_A086381,vector(9999,n,n))) \\ A087475=x->x^2+4.
    write(f="b085554.txt",c=1," 5"); forstep(x=3,1e6,6,is_A086381(x)&&write(f,c++" "x^2+4))
    \\ M. F. Hasler, Jan 18 2015

Formula

A085554 = A087475 o A086381 = A020725^2 o A253639, i.e., a(n) = A087475(A086381(n)) = A253639(n)+2. - M. F. Hasler, Jan 18 2015

Extensions

Edited by Don Reble, May 03 2006
Definition corrected by Harvey P. Dale and Franklin T. Adams-Watters, Jan 15 2015

A257049 Integer area of integer-sided triangle such that two sides are twin primes.

Original entry on oeis.org

6, 66, 6810, 72006, 182430, 370614, 3203694, 6353634, 28698786, 33163770, 55637466, 105470250, 151375626, 178631034, 185921166, 217064574, 376267326, 853918566, 1172755854, 1443472134, 1472632266, 2217439890, 6709586934, 13826592870, 17356640970, 18127936590
Offset: 1

Views

Author

Michel Lagneau, Apr 23 2015

Keywords

Comments

The area of a triangle (a,b,c) is given by Heron's formula A = sqrt(s(s-a)(s-b)(s-c)) where its side lengths are a, b, c and semiperimeter s = (a+b+c)/2.
Property of the sequence:
We observe that the sides of each triangle are of the form (k^2+2, k^2+4, 2k^2+2) and Heron's formula gives immediately the area k(2k^2+4) => a(n)= 2*A086381(n)*A253639(n).
Let the triangle (a,b,c) = (p,p+2,q) with p prime. Because q = 2t is even, Heron's formula gives the area A = sqrt((p+t+1)(p-t+1)(t-1)(t+1)). Suppose p = t+1, so p-t+1 = 2 and A = 2p*sqrt(t-1). We must have t-1 = k^2 a square, hence p=k^2+2 and q= 2t = 2(k^2+1) = 2p-2.
Consequence: the greatest prime divisor of a(n) is the length of the smallest side of the corresponding triangle if and only if p and p+2 are primes.
This statement is false if we consider a triangle of sides (p,p+2,q) where p and p+2 are composite, or p prime and p+2 composite, or p composite and p+2 prime. Example: the area of the triangle (145, 147, 194) is 10584, but the greatest prime divisor of 10584 = 2^3*3^3*7^2 is 7, and 7 is not the smallest side of the triangle, and 145 is different from 2*194-2.
The following table gives the first values (A, a, b, c) where A is the integer area, a=p, b=p+2 and c are the sides with p prime.
+---------+-------+--------+------+
| A | a=p | b= p+2 | c |
+---------+-------+--------+------+
| 6 | 3 | 5 | 4 |
| 66 | 11 | 13 | 20 |
| 6810 | 227 | 229 | 452 |
| 72006 | 1091 | 1093 | 2180 |
| 182430 | 2027 | 2029 | 4052 |
| 370614 | 3251 | 3253 | 6500 |
+---------+-------+--------+------+

Crossrefs

Programs

  • Mathematica
    nn=40000; lst={}; Do[s=(2*Prime[c]-2+Prime[c+1]+Prime[c])/2; If[IntegerQ[s], area2=s (s-2*Prime[c]+2)(s-Prime[c+1])(s-Prime[c]); If[area2>0 && IntegerQ[Sqrt[area2]] && Prime[c+1]==Prime[c]+2, AppendTo[lst, Sqrt[area2]]]], {c, nn}]; Union[lst]

Formula

a(n) = 2*A086381(n)*A253639(n). - Zak Seidov, Apr 27 2015

A253640 Greater of twin primes of the form (k^2 + 4, k^2 + 6).

Original entry on oeis.org

7, 31, 1231, 4231, 366031, 819031, 1155631, 1311031, 1575031, 3822031, 4389031, 4515631, 5880631, 7102231, 9333031, 9954031, 13213231, 13432231, 16120231, 19140631, 25654231, 34987231, 37393231, 38875231, 39375631, 41152231, 47955631, 52345231, 53655631, 62647231, 67486231
Offset: 1

Views

Author

M. F. Hasler, Jan 25 2015

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[8215]^2 + 6, And @@ PrimeQ[# - {0, 2}] &] (* Amiram Eldar, Jan 05 2020 *)
  • PARI
    for(x=1,9999,ispseudoprime(x^2+4)&&ispseudoprime(x^2+6)&&print1(x^2+6","))

A283222 Integer area of integer-sided triangle such that the sides are of the form p, p+2, 2(p-1), where p, p+2 and (p-1)/2 are prime numbers.

Original entry on oeis.org

66, 6810, 182430, 105470250, 17356640970, 678676246650, 1879504308930, 4491035717130, 10618004862030, 21136679055030, 23751520478010, 27081671511090, 27596192489190, 31721097756750, 115248550935750, 133303609919430, 140838829659930, 182797297112430, 197799116497230
Offset: 1

Views

Author

Michel Lagneau, Mar 03 2017

Keywords

Comments

Subsequence of A257049.
The area of a triangle (a,b,c) is given by Heron's formula A = sqrt(s(s-a)(s-b)(s-c)) where its side lengths are a, b, c and semiperimeter s = (a+b+c)/2.
We observe that the sides of each triangle are of the form (k^2+2, k^2+4, 2k^2+2) and Heron's formula gives immediately the area k(2k^2+4) => a(n)= 2*A086381(n)*A253639(n).
The corresponding primes p are a subsequence of A056899 (primes of the form n^2+2): 11, 227, 2027, 140627, 4223027, 48650627, 95942027, 171479027, ...
We observe that p == 11 mod 72, or p == 11, 83 mod 144. For p>11, p == 27, 227, 627 mod 1000.
An interesting property: the greatest prime divisor of a(n) is equal to p. For instance, the prime divisors of 6810 are {2, 3, 5, 227} => p = 227 is the length of the smallest side of the triangle (227, 229, 452).
The following table gives the first values of A, the sides of the triangles and the primes (p-1)/2.
+-----------+--------+--------+--------+---------+
| A | p | p+2 | 2(p-1)| (p-1)/2 |
+-----------+--------+--------+--------+---------+
| 66 | 11 | 13 | 20 | 5 |
| 6810 | 227 | 229 | 452 | 113 |
| 182430 | 2027 | 2029 | 4052 | 1013 |
| 105470250 | 140627 | 140629 | 281252 | 70313 |
+-----------+--------+--------+--------+---------+

Examples

			66 is in the sequence because the area of the triangle (11, 13, 20) is given by Heron's formula with s = 22 and A = sqrt(22(22-11)(22-13)(22-20)) = 66. The numbers 11, 13 and 5 = (11-1)/2 are primes.
		

Crossrefs

Programs

  • Maple
    nn:=100000:
    for n from 1 by 2 to nn do:
    if isprime(n^2+2) and isprime(n^2+4) and isprime((n^2+1)/2)
    then
    printf(`%d, `,n*(2*n^2+4)):
    else
    fi:
    od:
  • Mathematica
    nn=10000;lst={};Do[s=(2*Prime[c]-2+Prime[c+1]+Prime[c])/2;If[IntegerQ[s],area2=s (s-2*Prime[c]+2)(s-Prime[c+1])(s-Prime[c]); If[area2>0&&IntegerQ[Sqrt[area2]] &&Prime[c+1] ==Prime[c]+2 && PrimeQ[(Prime[c]-1)/2], AppendTo[lst,Sqrt[area2]]]], {c,nn}];Union[lst]
  • PARI
    lista(nn) = {forprime(p=2, nn, if (isprime(p+2) && isprime((p-1)/2), ca = p; cb = p+2; cc = 2*(p-1); sp = (ca+cb+cc)/2; a2 = sp*(sp-ca)*(sp-cb)*(sp-cc); if (issquare(a2), print1(sqrtint(a2), ", "));););} \\ Michel Marcus, Mar 04 2017

Formula

a(n) == 6 mod 30.
Showing 1-5 of 5 results.