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.

Showing 1-3 of 3 results.

A227899 Number of primes p < n with 3*p - 4 and n^2 + (n - p)^2 both prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 14 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 3.

Examples

			a(5) = 1 since 5 = 3 + 2, and the three numbers 3, 3*3 - 4 = 5 and 5^2 + (5-3)^2 = 29 are all prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[3Prime[i]-4]&&PrimeQ[n^2+(n-Prime[i])^2],1,0],{i,1,PrimePi[n-1]}]
    Table[a[n],{n,1,100}]

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}]

A232109 Least prime p < n + 5 with n + (p-1)*(p-3)/8 prime, or 0 if such a prime p does not exist.

Original entry on oeis.org

5, 3, 3, 5, 3, 5, 3, 7, 11, 5, 3, 5, 3, 7, 17, 5, 3, 5, 3, 7, 11, 5, 3, 23, 17, 7, 11, 5, 3, 5, 3, 13, 11, 7, 19, 5, 3, 7, 17, 5, 3, 5, 3, 7, 17, 5, 3, 23, 11, 7, 11, 5, 3, 23, 17, 7, 11, 5, 3, 5, 3, 31, 11, 7, 19, 5, 3, 7, 11, 5, 3, 5, 3, 13, 17, 7, 19, 5, 3, 7, 17, 5, 3, 23, 17, 7, 11, 5, 3, 29, 11, 13, 11, 7, 19, 5, 3, 7, 11, 5
Offset: 1

Views

Author

Zhi-Wei Sun, Nov 18 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0. Moreover, for any integer n > 1 there exists a prime p < 2*sqrt(n)*log(7n) such that n + (p-1)*(p-3)/8 is prime.
This implies that any integer n > 1 can be written as (p-1)/2 + q with q a positive integer, and p and (p^2-1)/8 + q both prime.

Examples

			a(1) = 5 since neither 1 + (2-1)*(2-3)/8 = 7/8 nor 1 + (3-1)*(3-3)/8 = 1  is prime, but 1 + (5-1)*(5-3)/8 = 2 is prime.
		

Crossrefs

Programs

  • Mathematica
    Do[Do[If[PrimeQ[n+(Prime[k]-1)(Prime[k]-3)/8],Goto[aa]],{k,1,PrimePi[n+4]}];
    Print[n," ",0];Label[aa];Continue,{n,1,100}]
Showing 1-3 of 3 results.