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

A115397 Erroneous version of A218656.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Mar 08 2006

Keywords

Examples

			n=6: 2*6+1 = 13 = 2+11 = 5+8 = 6+7 and
prime(1717)=14657, prime(636)=4721, prime(516)=3697,
a(6) = #{14657=2^4+11^4, 4721=5^4+8^4, 3697=6^4+7^4} = 3.
		

Crossrefs

A218754 Number of ways to write n=p+q(3+(-1)^n)/2 with q<=n/2 and p, q, p^2+3pq+q^2 all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 04 2012

Keywords

Comments

Conjecture: a(n)>0 for all n>=1188.
Conjecture verified for n up to 10^9. - Mauro Fiorentini, Sep 23 2023
This conjecture is stronger than both Goldbach's conjecture and Lemoine's conjecture.
Zhi-Wei Sun also made the following conjecture: Given any positive odd integer d, there is a prime p(d) such that for any prime p>p(d) there is a prime q

Conjecture verified for d up to 100 and p up to 10^7. - Mauro Fiorentini, Sep 23 2023

Examples

			For n=72 we have a(72)=1 since the only primes p and q with p+q=72, q<=36 and p^2+3pq+q^2 prime are p=67 and q=5.
		

Crossrefs

Cf. A000034 = 1,2,1,2,... = (3-(-1)^n)/2. (Note: Offset shifted w.r.t. use in the definition of this sequence.) - M. F. Hasler, Nov 05 2012

Programs

  • Mathematica
    a[n_]:=a[n]=Sum[If[PrimeQ[q]==True&&PrimeQ[n-q(3-(-1)^n)/2]&&PrimeQ[q^2+3q(n-q(3-(-1)^n)/2)+(n-q(3-(-1)^n)/2)^2]==True,1,0],{q,1,n/2}]
    Do[Print[n," ",a[n]],{n,1,20000}]

A218825 Number of ways to write 2n-1 as p+2q with p, q and p^2+60q^2 all prime.

Original entry on oeis.org

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

Author

Zhi-Wei Sun, Nov 07 2012

Keywords

Comments

Conjecture: a(n)>0 for all n>8.
This conjecture is stronger than Lemoine's conjecture. It has been verified for n up to 10^8.
Conjecture verified for 2n-1 up to 10^9. - Mauro Fiorentini, Jul 20 2023
Zhi-Wei Sun also made the following general conjecture: For any positive integer n, the set E(n) of positive odd integers not of the form p+2q with p, q, p^2+4(2^n-1)q^2 all prime, is finite. In particular, if we let M(n) denote the maximal element of E(n), then M(1)=3449, M(2)=1711, E(3)={1,3,5,7,31,73}, E(4)={1,3,5,7,9,11,13,15},
M(5)=6227, M(6)=1051, M(7)=2239, M(8)=2599, M(9)=7723,
M(10)=781, M(11)=1163, M(12)=587, M(13)=11443,
M(14)=2279, M(15)=157, M(16)=587, M(17)=32041,
M(18)=1051, M(19)=2083, M(20)=4681.
Conjecture verified for 2n-1 up to 10^9 for n <= 4 and up to 10^6 for n <= 20. - Mauro Fiorentini, Jul 20 2023
Zhi-Wei Sun also guessed that for any positive even integer d not congruent to 2 modulo 6 there exists a prime p(d) such that for any prime p>p(d) there is a prime q

p(4)=p(6)=3, p(10)=5, p(12)=3, p(16)=2, p(18)=3,
p(22)=11, p(24)=17, and p(28)=p(30)=7.

Examples

			a(10)=1 since the only primes p and q with p^2+60q^2 prime and p+2q=19 are p=13 and q=3.
		

Programs

  • Mathematica
    a[n_]:=a[n]=Sum[If[PrimeQ[q]==True&&PrimeQ[2n-1-2q]==True&&PrimeQ[(2n-1-2q)^2+60q^2]==True,1,0],{q,1,n-1}]
    Do[Print[n," ",a[n]],{n,1,20000}]
  • PARI
    A218825(n)={my(c=0,n21=n*2-1);forprime(q=2,n-1,isprime(n21-2*q) || next; isprime(q^2*60+(n21-2*q)^2) && c++); c}  \\ M. F. Hasler, Nov 07 2012

A218771 Primes of the form p^2 + 3pq + q^2 with p and q prime.

Original entry on oeis.org

31, 59, 79, 179, 191, 229, 251, 311, 389, 401, 479, 491, 541, 569, 719, 809, 971, 1019, 1061, 1109, 1151, 1249, 1301, 1409, 1451, 1499, 1619, 1931, 1949, 2111, 2141, 2339, 2591, 2609, 2711, 2801, 2939, 3089, 3371, 3389, 3449, 3881, 4021, 4091, 4211, 4391, 4451, 4679, 5039, 5051
Offset: 1

Author

Zhi-Wei Sun, Nov 05 2012

Keywords

Comments

It is easy to see that a(n) is congruent to 1 or 9 modulo 10. For each n there is a unique pair of primes p < q such that p^2 + 3pq + q^2 = a(n).
This sequence is of particular interest due to Zhi-Wei Sun's surprising conjecture related to A218754. That conjecture implies that this sequence is infinite.

Examples

			a(1)=31 since 2^2 + 3*2*3 + 3^2 = 31 and 2,3,31 are prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]
    i=0; Do[Do[If[SQ[4Prime[n]+5Prime[k]^2] && PrimeQ[(Sqrt[4Prime[n] + 5Prime[k]^2] - 3Prime[k])/2] == True, i=i+1; Print[i," ", Prime[n]]; Goto[aa]], {k,1,PrimePi[Sqrt[Prime[n]/5]]}];
    Label[aa];Continue,{n,1,1000000}]
  • PARI
    list(lim)=my(v=List(),t);forprime(p=2, sqrtint(lim\4), forprime(q=p+1,sqrt(lim-p^2), if(isprime(t=p^2+3*p*q+q^2), listput(v,t), if(t>lim,break)))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Nov 05 2012
    
  • PARI
    is_A218771(n,v=0)={ my(r,c=0); isprime(n) & forprime( q=1,sqrtint(n\5), issquare(4*n+5*q^2, &r) || next; isprime((r-3*q)/2) || next; v || return(1); v>1 & print1([q,(r-3*q)/2]","); c++);c}  \\ - M. F. Hasler, Nov 05 2012

A219026 Number of primes p<=n such that 2n-p and 2n+p-2 are both prime.

Original entry on oeis.org

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

Author

Zhi-Wei Sun, Nov 10 2012

Keywords

Comments

Conjecture: a(n)>0 except for n=1,2,4,6,10,22,57.
This is stronger than the Goldbach conjecture; it has been verified for n up to 5*10^7.
Zhi-Wei Sun also conjectured that if n is not among 1,2,3,5,8,87,108 then there is a prime p in (n,2n)
such that 2n-p and 2n+p-2 are both prime. For conjectures in Section 2 of arXiv:1211.1588, he had similar conjectures with p<=n replaced by p in (n,2n)
For example, if n is not among 1,2,4,6,10,15 then there is a prime p in (n,2n) such that
2n-p and 2n+p+2 are both prime.

Examples

			a(8)=2 since 3 and 5 are the only primes p<=8 with 16-p and 14+p both prime.
		

Programs

A218797 Number of ways to write 2n - 1 as p + q + r with p <= q <= r and p, q, r, p^2 + q^2 + r^2 all prime.

Original entry on oeis.org

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

Author

Zhi-Wei Sun, Nov 05 2012

Keywords

Comments

Conjecture: a(n) > 0 for all n=1715,1716,....
This conjecture is stronger than the weak Goldbach conjecture. It has been verified for n up to 500,000. Those 0

Examples

			a(7)=2 since 13=3+3+7=3+5+5, and both 3^2+3^2+7^2=67 and 3^2+5^2+5^2=59 are primes.
		

Programs

  • Mathematica
    a[n_]:=a[n]=Sum[If[PrimeQ[n-Prime[j]-Prime[k]]==True&&PrimeQ[Prime[j]^2+Prime[k]^2+(n-Prime[j]-Prime[k])^2]==True,1,0],{j,1,PrimePi[n/3]},{k,j,PrimePi[(n-Prime[j])/2]}]
    Do[Print[n," ",a[2n-1]],{n,1,10000}]

A219025 Number of primes p

Original entry on oeis.org

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

Author

Zhi-Wei Sun, Nov 10 2012

Keywords

Comments

Conjecture: a(n)>0 for all n=6,7,...
This has been verified for n up to 10^8.
Zhi-Wei Sun also made the following general conjecture:
Let P(x) be any non-constant integer-valued polynomial with positive leading coefficient. If n is large enough, then there is a prime p
See also A219023 for similar conjectures.

Examples

			a(11)=2 since the 5 and 7 are the only primes p<11 with 66-p and 66+p both prime.
		

Programs

  • Mathematica
    a[n_]:=a[n]=Sum[If[PrimeQ[6n-Prime[k]]==True&&PrimeQ[6n+Prime[k]]==True,1,0],{k,1,PrimePi[n-1]}]
    Do[Print[n," ",a[n]],{n,1,20000}]
Showing 1-7 of 7 results.