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

A230515 Numbers n such that n*(n+1)-1 is a Sophie Germain prime.

Original entry on oeis.org

2, 3, 5, 6, 9, 11, 15, 20, 38, 39, 45, 48, 50, 54, 59, 93, 126, 131, 144, 149, 153, 174, 176, 218, 231, 236, 240, 246, 248, 263, 285, 306, 309, 330, 335, 374, 380, 395, 396, 401, 419, 423, 449, 455, 468, 471, 474, 495, 501, 506, 549, 551, 560, 588
Offset: 1

Views

Author

Zhi-Wei Sun, Oct 21 2013

Keywords

Comments

This sequence is interesting because of the conjecture associated with A230514.

Examples

			a(1) = 2 since 2*3 - 1 = 5 is a Sophie Germain prime.
a(2) = 3 since 3*4 - 1 = 11 is a Sophie Germain prime.
a(3) = 5 since 5*6 - 1 = 29 is a Sophie Germain prime but 4*5 - 1 = 19 is not.
		

Crossrefs

Subsequence of A045546.

Programs

  • Magma
    [n: n in [1..600] | IsPrime(n*(n+1)-1) and IsPrime(2*n*(n+1)-1)]; // Bruno Berselli, Oct 22 2013
  • Mathematica
    q[n_]:=PrimeQ[n(n+1)-1]&&PrimeQ[2n(n+1)-1]
    m=0
    Do[If[q[n],m=m+1;Print[m," ",n]],{n,1,506}]
    Select[Range[600],AllTrue[{#^2+#-1,2#^2+2#-1},PrimeQ]&] (* Harvey P. Dale, Dec 02 2021 *)

A230516 Number of ways to write n = a + b + c with 0 < a <= b <= c such that {a^2+a-1, a^2+a+1}, {b^2+b-1, b^2+b+1}, {c^2+c-1, c^2+c+1} are twin prime pairs.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 2, 3, 3, 2, 2, 2, 2, 3, 4, 4, 3, 5, 5, 4, 6, 6, 4, 4, 4, 3, 3, 4, 1, 2, 3, 4, 4, 5, 6, 6, 7, 6, 6, 7, 6, 4, 3, 5, 4, 4, 3, 5, 5, 6, 8, 6, 7, 11, 7, 6, 9, 8, 4, 8, 6, 5, 7, 5, 4, 8, 10, 5, 7, 9, 6, 10, 6, 7, 7, 7, 4, 4, 8, 5, 5, 4, 6, 9, 7, 7, 7, 7, 7, 8
Offset: 1

Views

Author

Zhi-Wei Sun, Oct 22 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 5.
Conjecture verified for n up to 10^9. - Mauro Fiorentini, Sep 22 2023
This implies that there are infinitely many twin prime pairs of the form {x^2 + x - 1, x^2 + x + 1}.
See also A230514 for a similar conjecture.

Examples

			a(8) = 1 since 8 = 2 + 3 + 3, and {2*3 - 1, 2*3 + 1} = {5, 7} and {3*4 - 1, 3*4 + 1} = {11, 13} are twin prime pairs.
a(39) = 1 since 39 = 3 + 15 + 21, and {3*4 - 1, 3*4 + 1} = {11, 13}, {15*16 - 1, 15*16 + 1} = {239, 241}, {21*22 - 1, 21*22 + 1} = {461, 463} are twin prime pairs.
		

Crossrefs

Programs

  • Mathematica
    pp[n_]:=PrimeQ[n(n+1)-1]&&PrimeQ[n(n+1)+1]
    a[n_]:=Sum[If[pp[i]&&pp[j]&&pp[n-i-j],1,0],{i,1,n/3},{j,i,(n-i)/2}]
    Table[a[n],{n,1,100}]
Showing 1-2 of 2 results.