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.

A230261 Number of ways to write 2*n - 1 = p + q with p, p + 6 and q^4 + 1 all prime, where q is a positive integer.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 14 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 3. Also, any odd number greater than 6 can be written as p + q (q > 0) with p, p + 6 and q^2 + 1 all prime.
(ii) Any integer n > 1 can be written as x + y (x, y > 0) with x^4 + 1 and y^2 + y + 1 both prime.
(iii) Each integer n > 2 can be expressed as x + y (x, y > 0) with 4*x^2 + 3 and 4*y^2 -3 both prime.
Either of parts (i) and (ii) implies that there are infinitely many primes of the form x^4 + 1.

Examples

			a(6) = 2 since 2*6-1 = 5 + 6 = 7 + 4, and 5, 5+6 = 11, 7, 7+6 = 13, 6^4+1 = 1297 and 4^4+1 = 257 are all prime.
a(25) = 1 since 2*25-1 = 47 + 2, and 47, 47+6 = 53, 2^4+1 = 17 are all prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[Prime[i]+6]&&PrimeQ[(2n-1-Prime[i])^4+1],1,0],{i,1,PrimePi[2n-2]}]
    Table[a[n],{n,1,100}]
  • PARI
    a(n)=my(s,p=5,q=7);forprime(r=11,2*n+4,if(r-p==6&&isprime((2*n-1-p)^4+1),s++); if(r-q==6&&isprime((2*n-1-q)^4+1),s++); p=q;q=r);s \\ Charles R Greathouse IV, Oct 14 2013