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.

A276825 Number of ways to write n as x^3 + P_2, where x and P_2 are positive integers with P_2 a product of at most two primes.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Sep 19 2016

Keywords

Comments

Conjecture: Any integer n > 1 can be written as x^3 + P_2, where x and P_2 are positive integers with P_2 a product of at most two primes.
We have verified this for n up to 10^8, and we guess that a(n) > 1 for all n > 3275.
It seems that any integer n > 1 also can be written as x^2 + P_2, where x and P_2 are positive integers with P_2 a product of at most two primes. Goldbach's conjecture implies that for each integer n > 1 we can write 2*n as p + q with p <= n and q >= n both prime, and hence n^2 - (n-p)^2 = p*(2n-p) = p*q is a product of two primes. In 1923 Hardy and Littlewood conjectured that if an integer n is large enough and not a square then it can be written as the sum of a prime and a square.

Examples

			a(7) = 1 since 7 = 1^3 + 2*3 with 2 and 3 both prime.
a(17) = 1 since 17 = 2^3 + 3^2 with 3 prime.
a(28) = 1 since 28 = 3^3 + 1.
a(76) = 1 since 76 = 3^3 + 7^2 with 7 prime.
a(995) = 1 since 995 = 6^3 + 19*41 with 19 and 41 both prime.
a(1072) = 1 since 1072 = 5^3 + 947 with 947 prime.
a(1252) = 1 since 1252 = 9^3 + 523 with 523 prime.
a(1574) = 1 since 1574 = 7^3 + 1231 with 1231 prime.
a(1637) = 1 since 1637 = 7^3 + 2*647 with 2 and 647 both prime.
a(2458) = 1 since 2458 = 5^3 + 2333 with 2333 prime.
a(2647) = 1 since 2647 = 12^3 + 919 with 919 prime.
a(2752) = 1 since 2752 = 5^3 + 37*71 with 37 and 71 both prime.
a(2764) = 1 since 2764 = 11^3 + 1433 with 1433 prime.
a(3275) = 1 since 3275 = 1^3 + 2*1637 with 2 and 1637 both prime.
		

Crossrefs

Programs

  • Mathematica
    P2[n_]:=P2[n]=PrimeQ[Sqrt[n]]||(SquareFreeQ[n]&&Length[FactorInteger[n]]<=2)
    Do[r=0;Do[If[P2[n-k^3],r=r+1],{k,1,(n-1)^(1/3)}];Print[n," ",r];Continue,{n,1,80}]

A276830 Number of ways to write n as ((p-1)/2)^2 + P_2, where p is an odd prime and P_2 is a product of at most two primes.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Sep 20 2016

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1, and a(n) = 1 only for n = 2, 3, 4, 9, 17, 21, 25, 33, 49, 109, 169, 189, 361, 841, 961, 12769, 19321.
See also A276825 for a similar conjecture involving cubes, and some comments on x^2 + P_2.

Examples

			a(2) = 1 since 2 = ((3-1)/2)^2 + 1 with 3 prime.
a(3) = 1 since 3 = ((3-1)/2)^2 + 2 with 3 and 2 both prime.
a(4) = 1 since 4 = ((3-1)/2)^2 + 3 with 3 prime.
a(9) = 1 since 9 = ((5-1)/2)^2 + 5 with 5 prime.
a(17) = 1 since 17 = ((5-1)/2)^2 + 13 with 5 and 13 both prime.
a(21) = 1 since 21 = ((5-1)/2)^2 + 17 with 5 and 17 both prime.
a(25) = 1 since 25 = ((5-1)/2)^2 + 3*7 with 5, 3 and 7 all prime.
a(33) = 1 since 33 = ((5-1)/2)^2 + 29 with 5 and 29 both prime.
a(49) = 1 since 49 = ((13-1)/2)^2 + 13 with 13 prime.
a(109) = 1 since 109 = ((13-1)/2)^2 + 73 with 13 and 73 both prime.
a(169) = 1 since 169 = ((13-1)/2)^2 + 7*19 with 13, 7 and 19 all prime.
a(189) = 1 since 189 = ((5-1)/2)^2 + 5*37 with 5 and 37 both prime.
a(361) = 1 since 361 = ((37-1)/2)^2 + + 37 with 37 prime.
a(841) = 1 since 841 = ((37-1)/2)^2 + 11*47 with 37, 11 and 47 all prime.
a(961) = 1 since 961 = ((61-1)/2)^2 + 61 with 61 prime.
a(12769) = 1 since 12769 = ((109-1)/2)^2 + 59*167 with 109, 59 and 167 all prime.
a(19321) = 1 since 19321 = ((277-1)/2)^2 + 277 with 277 prime.
		

Crossrefs

Programs

  • Mathematica
    PP[n_]:=PP[n]=PrimeQ[Sqrt[n]]||(SquareFreeQ[n]&&Length[FactorInteger[n]]<=2)
    Do[r=0;Do[If[PP[n-((Prime[k]-1)/2)^2],r=r+1;If[r>1,Goto[aa]]],{k,2,PrimePi[2*Sqrt[n]+1]}];Print[n," ",r];
    Label[aa];If[Mod[n,50000]==0,Print[n]];Continue,{n,10^5,1000000}]

A322006 a(n) = number of primes of the form p = n - q, where q is a prime or semiprime.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 2, 3, 3, 4, 3, 3, 4, 4, 4, 4, 6, 5, 5, 4, 6, 5, 7, 4, 8, 5, 8, 5, 9, 4, 7, 4, 8, 7, 9, 4, 11, 5, 9, 6, 11, 6, 11, 6, 11, 8, 12, 4, 13, 6, 12, 8, 13, 6, 14, 5, 13, 8, 13, 4, 16, 5, 15, 9, 16, 7, 16, 6, 14, 9, 16, 5, 18, 6, 16, 10, 19, 7, 19, 6, 17, 10, 18, 4, 21, 9, 17, 9, 19, 8
Offset: 0

Views

Author

M. F. Hasler, Jan 06 2019

Keywords

Comments

Related to Chen's theorem (Chen 1966, 1973) which states that every sufficiently large even number is the sum of a prime and another prime or semiprime. Yamada (2015) has proved that this holds for all even numbers larger than exp(exp(36)).
In terms of this sequence, Chen's theorem with Yamada's bound is equivalent to say that a(2*n) > 0 for all n > 1.7 * 10^1872344071119348 (exponent ~ 1.8*10^15).
Sequence A322007(n) = a(2n) lists the bisection corresponding to even numbers only.
A235645 lists the number of decompositions of 2n into a prime p and a prime or semiprime q; this is less than a(2n) because p + q and q + p is the same decomposition (if q is a prime), but this sequence will count the two distinct primes 2n - q and 2n - p (if q <> p).

Examples

			a(4) = 1 is the first nonzero term corresponding to 4 = 2 + 2 or, rather, to the prime 2 = 4 - 2.
a(5) = 2 because the primes 2 = 5 - 3 and 3 = 5 - 2 are of the required form n - q where q = 3 resp. q = 2 are primes.
a(6) = 2 because the primes 2 = 6 - 4 and 3 = 6 - 3 are of the required form n - q, since q = 4 is a semiprime and q = 3 is a prime.
		

References

  • Chen, J. R. (1966). "On the representation of a large even integer as the sum of a prime and the product of at most two primes". Kexue Tongbao. 11 (9): 385-386.
  • Chen, J. R. (1973). "On the representation of a larger even integer as the sum of a prime and the product of at most two primes". Sci. Sinica. 16: 157-176.

Crossrefs

Programs

  • PARI
    A322006(n,s=0)={forprime(p=2,n-2,bigomega(n-p)<3&&s++);s}

A322007 a(n) = number of primes of the form p = 2n - q, where q is a prime or semiprime.

Original entry on oeis.org

0, 0, 1, 2, 3, 3, 4, 4, 6, 5, 6, 7, 8, 8, 9, 7, 8, 9, 11, 9, 11, 11, 11, 12, 13, 12, 13, 14, 13, 13, 16, 15, 16, 16, 14, 16, 18, 16, 19, 19, 17, 18, 21, 17, 19, 22, 19, 19, 24, 19, 21, 23, 20, 21, 26, 22, 23, 28, 23, 24, 29, 23, 24, 29, 21, 25, 29, 24, 25, 29, 27, 25, 33, 26, 27, 32, 27
Offset: 0

Views

Author

M. F. Hasler, Jan 06 2019

Keywords

Comments

Related to Chen's theorem (Chen 1966, 1973) which states that every sufficiently large even number is the sum of a prime and another prime or semiprime. Yamada (2015) has proved that this holds for all even numbers larger than exp(exp(36)).
In terms of this sequence, Chen's theorem with Yamada's bound is equivalent to say that a(n) > 0 for all n > 1.7 * 10^1872344071119348 (exponent ~ 1.8*10^15).
A235645 lists the number of decompositions of 2n into a prime p and a prime or semiprime q; this is less than a(n) because p + q and q + p is the same decomposition (if q is a prime), but this sequence will count two distinct primes 2n - q and 2n - p (if q <> p).
Sequence A322006 lists the same for even and odd numbers n, not only for even numbers 2n.

Examples

			a(4) = 2 since for n = 4, 2n = 8 = 2 + 6 = 3 + 5 = 5 + 3, i.e., primes 2, 3 and 5 are of the form specified in the definition (since 6 = 2*3 is a semiprime and 5 and 3 are primes).
		

References

  • Chen, J. R. (1966). "On the representation of a large even integer as the sum of a prime and the product of at most two primes". Kexue Tongbao. 11 (9): 385-386.
  • Chen, J. R. (1973). "On the representation of a larger even integer as the sum of a prime and the product of at most two primes". Sci. Sinica. 16: 157-176.

Crossrefs

Programs

  • PARI
    A322007(n,s=0)={forprime(p=2,-2+n*=2,bigomega(n-p)<3&&s++);s}

Formula

a(n) = A322006(2n).

A339708 a(n) is the number of decompositions of 2*n as the sum of an odd prime and a semiprime.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 1, 3, 4, 1, 4, 2, 2, 6, 4, 3, 5, 5, 2, 4, 7, 4, 7, 6, 3, 10, 5, 4, 10, 6, 6, 7, 8, 5, 9, 9, 4, 8, 10, 4, 11, 10, 9, 13, 9, 7, 10, 10, 9, 10, 9, 8, 11, 13, 4, 16, 13, 9, 15, 11, 11, 13, 14, 13, 13, 10, 10, 15, 16, 8, 19, 11, 11, 17, 14, 15, 17, 18, 9, 13, 17, 15
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Dec 13 2020

Keywords

Examples

			a(10) = 2 because 20 = 5+15 = 11+9 where 5 and 11 are primes and 15 and 9 are semiprimes.
		

Crossrefs

Programs

  • Maple
    N:= 300: # for a(1)..a(N/2)
    P:= select(isprime,[seq(i,i=3..N,2)]):
    S:= sort(select(`<`,[seq(seq(P[i]*P[j],i=1..j),j=1..nops(P))],N)):
    V:= Vector(N):
    for p in P do
    for s in S do
      v:= p+s;
        if v>N then break fi;
      V[v]:= V[v]+1
    od od:
    seq(V[i],i=2..N,2);
  • Mathematica
    {0}~Join~Array[Count[IntegerPartitions[2 #, {2}, All, -(# - 2)], ?(And[AnyTrue[#, PrimeQ], AnyTrue[#, PrimeOmega[#] == 2 &]] &)] &, 86, 2] (* _Michael De Vlieger, Dec 13 2020 *)
  • PARI
    a(n) = {my(nb=0); forprime(p=3, 2*n, if (bigomega(2*n-p) == 2, nb++);); nb;} \\ Michel Marcus, Dec 14 2020
Showing 1-5 of 5 results.