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

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

A253639 Lesser of twin primes of the form (k^2 + 2, k^2 + 4).

Original entry on oeis.org

3, 11, 227, 1091, 2027, 3251, 13691, 21611, 59051, 65027, 91811, 140627, 178931, 199811, 205211, 227531, 328331, 567011, 700571, 804611, 815411, 1071227, 2241011, 3629027, 4223027, 4347227, 4809251, 5212091, 5919491, 6185171, 6426227, 6671891, 7601051, 7969331, 8661251, 8732027, 9018011, 10323371
Offset: 1

Views

Author

M. F. Hasler, Jan 16 2015

Keywords

Comments

Companion sequence to A085554 (which yields the greater of the pair) and A086381 (which lists the x-values). Except for the first term, all values are a(n)=11 (mod 72). - M. F. Hasler, Jan 18 2015

Crossrefs

Programs

  • Mathematica
    Transpose[Select[Table[x^2+{2,4},{x,5000}],AllTrue[#,PrimeQ]&]][[1]] (* The program uses the AllTrue function from Mathematica version 10 *)
  • PARI
    forstep(x=1,9999,2,is_A086381(x)&&print1(x^2+2,",")) \\ M. F. Hasler, Jan 16 2015

Formula

Equals A059100 o A086381 = A023444 o A085554, i.e., a(n) = A086381(n)^2+2 = A085554(n)-2. - M. F. Hasler, Jan 18 2015

A086220 Numbers n such that p=n^2+2, p+2, p+6 and p+8 are four consecutive primes.

Original entry on oeis.org

3, 57, 32397, 54813, 61827, 62493, 98487, 98853, 119937, 213237, 254577, 306123, 322263, 328803, 438453, 603603, 619263, 656733, 671013, 675807, 821247, 875277, 1051173, 1121133, 1163697, 1230783, 1234317, 1337763, 1382223, 1388103, 1455927, 1538517, 1581237
Offset: 1

Views

Author

Zak Seidov, Sep 08 2003

Keywords

Crossrefs

Programs

  • PARI
    is(n)={my(p=n^2+2); isprime(p) && isprime(p+2) && isprime(p+6) && isprime(p+8)} \\ Andrew Howroyd, Jan 05 2020

Extensions

Terms a(15) and beyond from Andrew Howroyd, Jan 05 2020

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

A086509 Numbers n such that p=n^2+2, p+2, p+6, p+8 and p+12 are five consecutive primes.

Original entry on oeis.org

3, 32397, 213237, 254577, 1587597, 2305167, 3440307, 5622903, 6067893, 6895953, 7424157, 8304927, 8917707, 8936367
Offset: 1

Views

Author

Zak Seidov, Sep 09 2003

Keywords

Crossrefs

Extensions

John F. Brennen gives first 19575 terms of this sequence, n <= 165294372813.

A110970 Squares of the form 2*prime(n) - prime(n+1).

Original entry on oeis.org

1, 9, 25, 81, 225, 361, 441, 1089, 1225, 2025, 2601, 3249, 3721, 5041, 7569, 7921, 12321, 13689, 15129, 18225, 21609, 30625, 31329, 38809, 42025, 47961, 53361, 59049, 65025, 77841, 88209, 91809, 94249, 99225, 110889, 123201, 126025, 131769
Offset: 1

Views

Author

Giovanni Teofilatto, Sep 27 2005

Keywords

Comments

How is the upper limit for the search determined, which ensures that a square difference not previously made does not occur with much larger values? - Hugo Pfoertner, Mar 02 2020

Crossrefs

Contains n^2 for n in A086381.

Programs

  • Mathematica
    Union[Select[(2Prime[ # ] - Prime[ # + 1]) & /@ Range[13000], IntegerQ[Sqrt[ # ]] &]] (* Ray Chandler, Oct 07 2005 *)

Extensions

Corrected and extended by Ray Chandler, Oct 07 2005

A283698 Numbers k such that {k^2 + 2, k^2 + 4} and {k^3 + 2, k^3 + 4} are twin prime pairs.

Original entry on oeis.org

1, 3, 45, 2055, 39033, 48585, 101535, 104553, 112383, 117723, 129315, 152553, 170793, 178095, 234483, 246435, 258093, 272403, 304845, 306885, 365343, 372663, 375813, 405393, 405975, 436425, 456903, 494193, 538965, 551475, 559713, 569805, 570033, 767895, 792903
Offset: 1

Views

Author

K. D. Bajpai, Mar 14 2017

Keywords

Comments

Except a(1), all terms are multiples of 3.
a(n) == {3 or 15} (mod 30) for n>2.

Examples

			a(2) = 3, {3^2 + 2 = 11, 3^2 + 4 = 13 } and {3^3 + 2 = 29, 3^3 + 4 = 31} are twin prime pairs.
a(3) = 45, {45^2 + 2 = 2027, 45^2 + 4 = 2029 } and {45^3 + 2 = 91127, 45^3 + 4 = 91129} are twin prime pairs.
		

Crossrefs

Intersection of A086381 and A178337.

Programs

  • Mathematica
    Select[Range[1000000], PrimeQ[#^2 + 2] && PrimeQ[#^2 + 4] && PrimeQ[#^3 + 2] && PrimeQ[#^3 + 4] &]
  • PARI
    for(n=1, 100000, if(isprime(n^2+2) && isprime(n^2+4) && isprime(n^3+2) && isprime(n^3+4), print1(n, ", ")))

A284014 Numbers k such that {k + 2, k + 4} and {k^2 + 2, k^2 + 4} are both twin prime pairs.

Original entry on oeis.org

1, 3, 15, 57, 147, 2085, 6687, 6957, 11055, 15267, 17385, 17577, 20505, 20637, 23667, 26247, 31077, 31317, 32115, 32967, 34497, 39225, 47775, 52065, 53715, 55335, 56205, 58365, 62187, 63585, 66567, 67215, 70875, 77235, 77475, 82005, 85827, 89595, 89817, 107505
Offset: 1

Views

Author

K. D. Bajpai, Mar 18 2017

Keywords

Comments

After a(1), all the terms are multiples of 3.
After a(2), all the terms are congruent to 5 or 7 (mod 10).

Examples

			a(2) = 3, {3 + 2 = 5, 3 + 4 = 7} and {3^2 + 2 = 11, 3^2 + 4 = 13} are twin prime pairs.
a(3) = 15, {15 + 2 = 17, 15 + 4 = 19} and {15^2 + 2 = 227, 15^2 + 4 = 229} are twin prime pairs.
		

Crossrefs

Appears to be the intersection of A086381 and A256388, but that may be unproven.

Programs

  • Magma
    [n: n in [0..100000] | IsPrime(n+2) and IsPrime(n+4) and IsPrime(n^2+2) and IsPrime(n^2+4)];
    
  • Mathematica
    Select[Range[1000000], PrimeQ[# + 2] && PrimeQ[# + 4] && PrimeQ[#^2 + 2] && PrimeQ[#^2 + 4] &]
  • PARI
    for(n=1, 100000,2; if(isprime(n+2) && isprime(n+4) && isprime(n^2+2) &&isprime(n^2+4), print1(n, ", ")))
    
  • Scheme
    ;; With Antti Karttunen's IntSeq-library.
    (define A284014 (MATCHING-POS 1 1 (lambda (n) (and (= 1 (A010051 (+ n 2))) (= 1 (A010051 (+ n 4))) (= 1 (A010051 (+ (* n n) 2))) (= 1 (A010051 (+ (* n n) 4)))))))
    ;; Antti Karttunen, Apr 15 2017

A284058 Numbers k such that {k + 2, k + 4} and {k^3 + 2, k^3 + 4} are twin prime pairs.

Original entry on oeis.org

1, 3, 69, 1719, 3555, 8535, 8625, 9765, 10065, 17955, 27939, 32319, 34209, 35445, 39159, 44769, 47415, 55329, 56235, 75615, 85929, 91965, 96219, 97545, 98895, 122385, 122595, 138075, 142695, 143649, 145719, 152025, 191829, 192975, 197955, 200379, 201819, 202059
Offset: 1

Views

Author

K. D. Bajpai, Mar 19 2017

Keywords

Comments

After a(1), all the terms are multiples of 3.
After a(2), all the terms are congruent to 5 or 9 (mod 10).
a(n) == {9 or 15} (mod 30) for n>2. - Robert G. Wilson v, Mar 19 2017

Examples

			a(2) = 3, {3 + 2 = 5, 3 + 4 = 7} and {3^3 + 2 = 29, 3^3 + 4 = 31} are twin prime pairs.
a(3) = 69, {69 + 2 = 71, 69 + 4 = 73} and {69^3 + 2 = 328511, 69^3 + 4 = 328513} are twin prime pairs.
		

Crossrefs

Intersection of A256388 and A178337.

Programs

  • Mathematica
    Select[Range[1000000], PrimeQ[# + 2] && PrimeQ[# + 4] && PrimeQ[#^3 + 2] && PrimeQ[#^3 + 4] &]
  • PARI
    for(n=1, 100000,2; if(isprime(n+2) && isprime(n+4) && isprime(n^3+2) && isprime(n^3+4), print1(n, ", ")))

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