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-5 of 5 results.

A258139 Number of ways to write n as p^2 + q with p and q both prime.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 2, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 2, 2, 0, 1, 0, 2, 1, 0, 1, 1, 0, 2, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 2, 2, 0, 2, 0, 3, 1, 0, 0, 1, 0, 3, 1, 0, 1, 2, 0, 3, 0, 1, 1, 2, 0, 0, 1, 1, 1, 2, 0, 2, 0, 1, 1, 1, 0, 2, 1, 1, 0, 1, 0, 3, 1, 0, 0, 2, 0, 2, 0, 0
Offset: 1

Views

Author

Zhi-Wei Sun, May 22 2015

Keywords

Comments

Conjecture: For any integer n > 0, we have a(n+r) > 0 for some r = 0,1,2,3,4,5. Moreover, if n = 6*k + 2, then a(n) > 0 except for k = 0, 1, 12, 28, 102, 117, 168, 4079.
We have verified the conjecture for n up to 10^9.

Examples

			a(11) = 2 since 11 = 2^2 + 7 = 3^2 + 2 with 2, 3, 7 all prime.
		

Crossrefs

Programs

  • Mathematica
    Do[r=0;Do[If[PrimeQ[n-Prime[k]^2],r=r+1],{k,1,PrimePi[Sqrt[n]]}];Print[n," ",r];Continue,{n,1,100}]

Formula

G.f.: (Sum_{k>=1} x^prime(k))*(Sum_{k>=1} x^(prime(k)^2)). - Ilya Gutkovskiy, Feb 05 2017

A258140 Number of ways to write 6*n + 2 as p^2 + q with p and q both prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 22 2015

Keywords

Comments

Conjecture: a(n) > 0 except for n = 0, 1, 12, 28, 102, 117, 168, 4079.
See also the comments in A258139.

Examples

			a(5) = 2 since 6*5 + 2 = 3^2 + 23 = 5^2 + 7 with 3, 23, 5, 7 all prime.
		

Crossrefs

Programs

  • Mathematica
    Do[r=0;Do[If[PrimeQ[6n+2-Prime[k]^2],r=r+1],{k,1,PrimePi[Sqrt[6n+2]]}];Print[n," ",r];Continue,{n,0,100}]
  • PARI
    a(n)=my(t=6*n+2,s); forprime(p=2,sqrtint(t-2), if(isprime(t-p^2), s++)); s \\ Charles R Greathouse IV, May 26 2015

A258168 Number of ways to write n as floor((p^2+q)/5) with p and q both prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 22 2015

Keywords

Comments

Conjecture: Let n be any positive integer. Then a(n) > 0. Moreover, one of the four consecutive numbers 5*n, 5*n+1, 5*n+2, 5*n+3 can be written as p^2+q with p and q both prime.
It seems that there are infinitely many positive integers n such that none of n, n+1, n+2, n+3, n+4 has the form p^2 + q with p and q both prime.
See also A258141 for a similar conjecture.
Note that neither 3763 nor 5443 can be written as floor((p^2+q)/4) with p and q both prime.

Examples

			a(1) = 3 since 1 = floor((2^2+2)/5) = floor((2^2+3)/5) = floor((2^2+5)/5) with 2, 3, 5 all prime.
a(2) = 4 since 2 = floor((2^2+7)/5) = floor((3^2+2)/5) = floor((3^2+3)/5) = floor((3^2+5)/5) with 2, 3, 5, 7 all prime.
		

Crossrefs

Programs

  • Mathematica
    Do[m=0;Do[If[PrimeQ[5n+r-Prime[k]^2],m=m+1],{r,0,4},{k,1,PrimePi[Sqrt[5n+r]]}];Print[n," ",m];Continue,{n,1,80}]

A258153 Numbers of the form p^2 + q with p, q and 2*p + 3 all prime.

Original entry on oeis.org

6, 7, 9, 11, 15, 17, 21, 23, 27, 28, 30, 32, 33, 35, 36, 38, 41, 42, 44, 45, 47, 48, 51, 52, 54, 56, 57, 60, 62, 63, 65, 66, 68, 71, 72, 75, 77, 78, 80, 83, 84, 86, 87, 90, 92, 93, 96, 98, 101, 102, 104, 105, 107, 108, 110, 111, 113, 114, 116, 117, 120, 122, 126, 128, 131, 132, 134, 135, 138, 141
Offset: 1

Views

Author

Zhi-Wei Sun, May 22 2015

Keywords

Comments

The conjecture in A258141 asserts that any six consecutive positive integers contain at least a term of the current sequence.

Examples

			a(1) = 6 since 6 = 2^2 + 2 with 2 and 2*2+3 = 7 both prime.
a(2) = 7 since 7 = 2^2 + 3 with 2, 3, 2*2+3 all prime.
		

Crossrefs

Programs

  • Mathematica
    n=0;Do[Do[If[PrimeQ[2Prime[k]+3]&&PrimeQ[m-Prime[k]^2],n=n+1;Print[n," ",m];Goto[aa]],{k,1,PrimePi[Sqrt[m]]}];
    Label[aa];Continue,{m,1,141}]
    Module[{pp=40},Select[Union[#[[1]]^2+#[[2]]&/@Select[Tuples[ Prime[ Range[ pp]],2],PrimeQ[2#[[1]]+3]&]],#<=Prime[pp]-4&]] (* Harvey P. Dale, Jul 24 2021 *)

A258661 Positive integers m such that none of the four consecutive numbers m, m+1, m+2, m+3 can be written as p^2 + q with p and q both prime.

Original entry on oeis.org

1, 2, 1009, 3598, 4354, 9214, 11662, 15051, 15052, 15873, 15874, 19042, 21772, 22497, 22498, 24334, 26242, 46654, 60514, 76173, 76174, 93634, 97341, 97342, 108898, 112893, 112894, 121101, 121102, 133954, 152098, 156813, 156814, 166462, 171393, 171394, 181473, 181474, 202498, 213441, 213442, 224674, 236193, 236194, 254013, 254014, 266253, 266254, 272482, 278781
Offset: 1

Views

Author

Zhi-Wei Sun, Jun 06 2015

Keywords

Comments

Conjecture: Any term not among 1, 2, 1009, 15051, 15052, 21772 has the form 36*k^2-2 or the form 36*k^2-3, where k is a positive integer.
Note that this conjecture implies the conjecture in A258168 since neither 36*k^2-2 nor 36*k^2-3 can be a multiple of 5.
For more comments, see the linked message to Number Theory Mailing List.

Examples

			a(1) = 1 since none of 1,2,3,4 has the form p^2+q with p and q both prime.
a(2) = 2 since none of 2,3,4,5 has the form p^2+q with p and q both prime.
		

Crossrefs

Programs

  • Mathematica
    n=0;Do[Do[If[PrimeQ[m+r-Prime[k]^2],Goto[aa]],{r,0,3},{k,1,PrimePi[Sqrt[m+r]]}];n=n+1;Print[n, " ", m];Label[aa];Continue,{m,1,278781}]
Showing 1-5 of 5 results.