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.

A136009 Primes p for which the least pentagonal number q=n(3n+/-1)/2 which makes p+q prime satisfies 2q > p.

Original entry on oeis.org

3, 7, 13, 19, 23, 37, 43, 73, 103, 233, 359, 503
Offset: 1

Views

Author

Chris K. Caldwell, Mar 18 2008

Keywords

Comments

Is the list complete?
For each prime p, the author is looking for the least generalized pentagonal number (A001318) q such that p+q is prime. The list of such q begins with: 1, 2, 2, 12, 2, 40, 2, 12, 126, 2, 12, 22, 2, 40, 12. In this list, most q's are much smaller than their corresponding p. The current sequence gives the primes p for which q is greater than p/2. - Michel Marcus, Aug 21 2013
No more terms up to 10^10. Heuristics suggest there are no more terms. - Charles R Greathouse IV, Aug 21 2013

Examples

			For p=23, q=126. For p=503, q=590.
More examples:
p=3, q=2, p+q=5.
p=7, q=12, p+q=19.
p=13, q=40, p+q=53.
p=19, q=12, p+q=31.
p=23, q=126, p+q=149.
p=37, q=22, p+q=59.
p=43, q=40, p+q=83.
p=73, q=40, p+q=113.
p=103, q=70, p+q=173.
p=233, q=126, p+q=359.
p=359, q=210, p+q=569.
p=503, q=590, p+q=1093. - _Michel Marcus_, Aug 21 2013
		

Programs

  • PARI
    isok(p) = my(nn = 1, ok = 0); until (ok, q = nn*(3*nn - 1)/2; if (isprime(p+q), ok = 1; if (2*q > p, return (q))); q = nn*(3*nn + 1)/2; if (isprime(p+q), ok = 1; if (2*q > p, return (q));); nn++;); 0 \\ Michel Marcus, Aug 21 2013
    
  • PARI
    is(p)=my(n=1,t);while(!isprime(t=p+n*(3*n-1)/2)&&!isprime(t=p+n*(3*n+1)/2)&&2*t<=3*p,n++); 2*t>3*p && isprime(p) \\ Charles R Greathouse IV, Aug 21 2013

Extensions

a(10) = 233 inserted by Michel Marcus, Aug 21 2013