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.

A231652 Lesser twin prime p such that p^2-p-2 is the average of a larger twin prime pair.

Original entry on oeis.org

5, 11, 17, 29, 71, 197, 269, 1277, 1289, 1607, 2027, 2111, 2267, 2687, 3467, 4649, 6359, 6761, 6827, 7877, 9461, 10529, 12917, 13337, 13691, 13829, 13931, 17291, 17579, 20441, 20771, 26249, 29021, 29129, 34589, 34649, 38237, 39239, 44027, 47417, 49547, 51347
Offset: 1

Views

Author

Michael G. Kaarhus, Nov 12 2013

Keywords

Comments

There are 265364 members of this sequence up to 10^10, so about 1% of twin primes with fewer than 10 digits are in this sequence. - Charles R Greathouse IV, Nov 12 2013

Examples

			17 is in this sequence because 17 is a lesser twin prime and 17^2 - 17 - 2 is the average of 269 and 271 which is a pair of twin primes.
		

Crossrefs

Subsequence of A001359.

Programs

  • Maxima
    y:0$ p:0$ c:0$ f(p):= p^2-p-2$ for p:5 thru 100000 step 6 do (if(primep(p) and primep(p+2)) then (y:f(p), if(primep(y-1) and primep(y+1)) then (c:c+1, print(c,", ",p,", ", y))));
    
  • PARI
    is(n)=isprime(n^2-n-3) && isprime(n^2-n-1) && isprime(n+2) && isprime(n) && n>3 \\ Charles R Greathouse IV, Nov 12 2013