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.

A232194 Number of ways to write n = x + y (x, y > 0) with n*x + y and n*y - x both prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 20 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 2. Also, a(n) = 1 only for n = 3, 4, 6, 20, 24.
(ii) Any positive integer n not among 1, 30, 54 can be written as x + y (x, y > 0) with n*x + y and n*y + x both prime.
(iii) Each integer n > 1 not equal to 8 can be expressed as x + y (x, y > 0) with n*x^2 + y (or x^4 + n*y) prime.
(iv) Any integer n > 5 can be written as p + q (q > 0) with p and n*q^2 + 1 both prime.
See also A232174 for a similar conjecture.

Examples

			a(3) = 1 since 3 = 1 + 2 with 3*1 + 2 = 3*2 - 1 = 5 prime.
a(4) = 1 since 4 = 1 + 3 with 4*1 + 3 = 7 and 4*3 - 1 = 11 both prime.
a(6) = 1 since 6 = 1 + 5 with 6*1 + 5 = 11 and 6*5 - 1 = 29 both prime.
a(20) = 1 since 20 = 9 + 11 with 20*9 + 11 = 191 and 20*11 - 9 = 211 both prime.
a(24) = 1 since 24*19 + 5 = 461 and 24*5 - 19 = 101 both prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[n*x+(n-x)]&&PrimeQ[n*(n-x)-x],1,0],{x,1,n-1}]
    Table[a[n],{n,1,100}]