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.

A261463 Numbers n such that n is a twin prime and 2n + 1 is a twin prime.

Original entry on oeis.org

3, 5, 29, 659, 809, 2129, 2549, 3329, 3389, 5849, 6269, 10529, 33179, 41609, 44129, 53549, 55439, 57329, 63839, 65099, 70379, 70979, 72269, 74099, 74759, 78779, 80669, 81929, 87539, 93239, 102299, 115469, 124769, 133979, 136949, 156419, 161459, 168449
Offset: 1

Views

Author

Harvey P. Dale, Aug 20 2015

Keywords

Comments

n is a Sophie Germain prime and a twin prime, and 2*n+1 is also a twin prime.
Apparently this contains 3 and the members of A069142. - R. J. Mathar, Aug 23 2015

Examples

			809 is a term because 809 and 811 are twin primes, and 2*809+1 = 1619 is a prime and a twin prime with 1621.
		

Programs

  • Mathematica
    sgtpQ[n_]:=Module[{sgp=2n+1},PrimeQ[sgp]&&AnyTrue[sgp+{2,-2},PrimeQ]]; Select[Union[Flatten[Select[Partition[Prime[Range[25000]],2,1], #[[2]]- #[[1]] ==2&]]],sgtpQ] (* The program uses the AnyTrue function from Mathematica version 10 *)
    p=PrimeQ; Select[Prime@ Range[10^5], p[2#+1] && (p[#+2] || p[#-2]) && (p[2#+3] || p[2#-1]) &] (* Giovanni Resta, Aug 20 2015 *)

Formula

a(n+1) = A069142(n), n>=1. - G. C. Greubel, Aug 23 2015