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.

Previous Showing 31-40 of 172 results. Next

A230141 Number of ways to write n = x + y + z with y <= z such that 6*x-1, 6*y-1, 6*z-1 are terms of A230138 and 6*(y+z)+1 is prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 10 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 2. Also, any integer n > 2 can be written as x + y + z (x, y, z > 0) such that 6*x-1, 6*y-1, 6*z-1 are terms of A230138 and 6*y*z-1 is prime.
This is a further refinement of the conjecture in A230140.
Note that if x + y + z = n then 6*n = (6*x-1) + (6*(y+z)+1). So a(n) > 0 implies Goldbach's conjecture for the even number 6*n.

Examples

			a(10) = 2 since 10 = 3 + 2 + 5 = 5 + 2 + 3, and 6*3-1 = 17, 6*2-1 = 11, 6*5-1 = 29 are terms of A230138, and 6*(2+5)+1 = 43 and 6*(2+3)+1 = 31 are also prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=PrimeQ[6n-1]&&PrimeQ[6n+1]&&PrimeQ[12n-7]
    a[n_]:=Sum[If[SQ[i]&&PrimeQ[6(n-i)+1]&&SQ[j]&&SQ[n-i-j],1,0],{i,1,n-2},{j,1,(n-i)/2}]
    Table[a[n],{n,1,100}]

A236566 Number of ordered ways to write 2*n = p + q with p, q and prime(p + 2) + 2 all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 28 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 2.
(ii) If n > 30, then 2*n + 1 can be written as 2*p + q with p, q and prime(p + 2) + 2 all prime.
Part (i) implies both the Goldbach conjecture and the twin prime conjecture. If all primes p with prime(p + 2) + 2 are smaller than an even number N > 2, then for any such a prime p the number N! + N - p is in the interval (N!, N! + N) and hence not prime.
Similarly, part (ii) implies both Lemoine's conjecture (cf. A046927) and the twin prime conjecture.
We have verified part (i) of the conjecture for n up to 2*10^8.

Examples

			a(10) = 1 since 2*10 = 3 + 17 with 3, 17 and prime(3 + 2) + 2 = 11 + 2 = 13 all prime.
a(589) = 1 since 2*589 = 577 + 601 with 577, 601 and prime(577 + 2) + 2 = 4229 + 2 = 4231 all prime.
		

Crossrefs

Programs

  • Mathematica
    p[m_]:=PrimeQ[Prime[m+2]+2]
    a[n_]:=Sum[If[p[Prime[k]]&&PrimeQ[2n-Prime[k]],1,0],{k,1,PrimePi[2n-1]}]
    Table[a[n],{n,1,100}]

A156284 From every interval (2^(m-1), 2^m), m >= 3, we remove primes p for which 2^m-p is a prime that was not removed for smaller values of m; the sequence gives all remaining odd primes.

Original entry on oeis.org

3, 7, 11, 17, 19, 23, 31, 37, 43, 59, 67, 71, 73, 79, 83, 89, 101, 103, 107, 113, 127, 131, 137, 139, 151, 157, 163, 179, 181, 191, 193, 199, 211, 223, 227, 229, 241, 251, 257, 263, 269
Offset: 1

Views

Author

Vladimir Shevelev, Feb 07 2009

Keywords

Comments

Powers of 2 are not expressible as sums of two primes from this sequence. This is attained by a more economical algorithm than that for construction of A152451. If A(x) is the counting function for the terms a(n) <= x, then A(x) = pi(x) - O(x/(log^2(x)). It is known that the approximation of pi(x) by x/log(x) gives the remainder term as, at best, O(x/log^2(x)). Therefore beginning our process from m >= M (with arbitrarily large M), we obtain a sequence which essentially is indistinguishable from the sequence of all odd primes with the help of the approximation of pi(x) by x/log(x). Hence it is in principle impossible to prove the binary Goldbach conjecture by such an approximation of pi(x).

Crossrefs

A156537 a(n), a(n+1), a(n+2), for n=2,5,8,11,... are respectively the numbers of representations of the integers 2^k-2, 2^k, 2^k+2, where k=(n+4)/3, by unordered sums of two numbers of A156284.

Original entry on oeis.org

0, 0, 1, 1, 0, 1, 2, 0, 1, 2, 0, 3, 3, 0, 2, 5, 0, 4, 6, 0, 9, 19, 0, 8, 11, 0, 23, 51, 0, 27, 44, 0, 70, 207, 0, 80, 92, 0, 217, 399, 0, 279, 444, 0, 685, 1653, 0, 630, 1010, 0, 2137, 4893, 0, 3068, 3683, 0, 6855
Offset: 2

Views

Author

Vladimir Shevelev, Feb 09 2009, Feb 14 2009

Keywords

Comments

According to the construction of A156284, a_(3n)=0, n>=1. These terms may be called "wells". The growth of the depth of the "wells" is O(2^(n/3)log(n)/n^2).

Crossrefs

Extensions

Edited by N. J. A. Sloane, Feb 14 2009
Additional terms from Vladimir Shevelev, Mar 19 2009

A232443 Number of ways to write n = p + q - pi(q), where p and q are odd primes, and pi(q) is the number of primes not exceeding q.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 23 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 3. Moreover, every n = 6, 7, ... can be written as p + q - pi(q) with p, p + 6 and q all prime.
(ii) For each integer n > 7, there is a prime p < n with n + p - pi(p) prime.
(iii) Any integer n > 4 not equal to 9 or 17 can be written as p + q + pi(q) with p and q both prime.
(iv) Each integer n > 7 can be written as p + q + pi(p) + pi(q) with p and q both prime.

Examples

			a(4) = 1 since 4 = 3 + 3 - pi(3) with 3 prime.
a(5) = 1 since 5 = 3 + 5 - pi(5) with 3 and 5 prime.
a(6) = 2 since 6 = 3 + 7 - pi(7) = 5 + 3 - pi(3) with 3, 5, 7 all prime.
a(7) = 1 since 7 = 5 + 5 - pi(5) with 5 prime.
a(11) = 1 since 11 = 5 + 11 - pi(11) with 5 and 11 both prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=PQ[n]=n>2&&PrimeQ[n]
    a[n_]:=Sum[If[PQ[n-Prime[k]+k],1,0],{k,2,PrimePi[2n-2]}]
    Table[a[n],{n,1,100}]

A233867 a(n) = |{0 < m < 2*n: m is a square with 2*n - 1 - phi(m) prime}|, where phi(.) is Euler's totient function (A000010).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 17 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 1.
(ii) For any odd number 2*n - 1 > 4, there is a positive integer k < 2*n such that 2*n - 1 - phi(k) and 2*n - 1 + phi(k) are both prime.
By Goldbach's conjecture, 2*n > 2 could be written as p + q with p and q both prime, and hence 2*n - 1 = p + (q - 1) = p + phi(q).
By induction, phi(k^2) (k = 1,2,3,...) are pairwise distinct.

Examples

			a(29) = 1 since 2*29 - 1 = 37 + phi(5^2) with 37 prime.
a(39) = 1 since 2*39 - 1 = 71 + phi(3^2) with 71 prime.
a(66) = 1 since 2*66 - 1 = 89 + phi(7^2) with 89 prime.
a(128) = 1 since 2*128 - 1 = 223 + phi(8^2) with 223 prime.
a(182) = 1 since 2*182 - 1 = 331 + phi(8^2) with 331 prime.
a(413) = 1 since 2*413 - 1 = 823 + phi(2^2) with 823 prime.
a(171) = 3 since 2*171 - 1 = 233 + phi(18^2) = 257 + phi(14^2) = 293 + phi(12^2) with 233, 257, 293 all prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[2n-1-EulerPhi[k^2]],1,0],{k,1,Sqrt[2n-1]}]
    Table[a[n],{n,1,100}]

A069360 Number of prime pairs (p,q), p <= q, such that (p+q)/2 = 2*n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Apr 15 2002

Keywords

Comments

The Goldbach conjecture, if true, would imply a(n) > 0.
Row lengths of table A260689, n > 1. - Reinhard Zumkeller, Nov 17 2015

Examples

			n=8: there are 16 pairs (i,j) with (i+j)/2=n*2=16; only two of them, (3,29) and (13,19), consist of primes, therefore a(8)=2.
		

Crossrefs

Bisection of A002375.
Cf. A082467 (least k such that n-k and n+k are both primes), A134677 (records), A134678 (where records occur), A135146 (index of first occurrence of n).

Programs

Formula

For n > 1: a(n) = #{k | 2*n-k and 2*n+k are prime, 1<=k<=2*n}.
a(n) = Sum_{i=3..2n} isprime(i) * isprime(4n-i) * (sign(4n-i) mod 4), n > 1. - Wesley Ivan Hurt, Dec 18 2016

Extensions

Edited by Klaus Brockhaus, Nov 20 2007
a(1)=1, thanks to Charles R Greathouse IV, who noticed this; b-file adjusted.

A218007 Number of partitions of n into at most three primes (including 1).

Original entry on oeis.org

1, 2, 3, 3, 4, 4, 5, 4, 5, 4, 5, 4, 6, 5, 7, 5, 7, 5, 8, 6, 9, 6, 9, 7, 10, 7, 10, 5, 10, 6, 12, 7, 13, 7, 12, 8, 14, 7, 14, 6, 15, 8, 17, 9, 17, 8, 18, 10, 19, 10, 19, 7, 20, 9, 21, 9, 20, 7, 21, 11, 25, 11, 24, 9, 26, 11, 27, 9, 24, 8, 28, 12, 30, 13, 29
Offset: 1

Views

Author

Frank M Jackson, Mar 26 2013

Keywords

Comments

The above sequence relies on the strong Goldbach's conjecture that any positive integer is the sum of at most three distinct terms from {1 union primes}.

Examples

			a(21)=9 as 21 = 1+1+19 = 2+19 = 1+3+17 = 2+2+17 = 1+7+13 = 3+5+13 = 3+7+11 = 5+5+11 = 7+7+7
		

Crossrefs

Programs

  • Mathematica
    primeQ[p0_] := If[p0==1, True, PrimeQ[p0]]; SetAttributes[primeQ, Listable]; goldbachcount[p1_] := (parts=IntegerPartitions[p1, 3]; count=0; n=1; While[n<=Length[parts], If[Intersection[Flatten[primeQ[parts[[n]]]]][[1]] == True, count++]; n++]; count); Table[goldbachcount[i], {i, 1, 100}]
    Table[Length[Select[#/.(1->2)&/@IntegerPartitions[n,3],AllTrue[#,PrimeQ]&]],{n,80}] (* Harvey P. Dale, Jan 11 2023 *)

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 10 2012

Keywords

Comments

Conjecture: a(n) > 0 for all n > 784.
This conjecture implies Goldbach's conjecture, Lemoine's conjecture, and that there are infinitely many primes of the form p^2 + q^2 - 1 with p and q both prime.
It has been verified for n up to 10^8.
Zhi-Wei Sun also made the following general conjecture: Let d be any odd integer not congruent to 1 modulo 3. Then, all large even numbers can be written as p + q with p, q, p^2 + q^2 + d all prime. If d is also not divisible by 5, then all large odd numbers can be represented as p + 2q with p, q, p^2 + q^2 + d all prime.

Examples

			a(12) = 1 since {5, 7} is the only prime pair {p, q} for which  p + q = 12, and p^2 + q^2 - 1 is prime.
		

Crossrefs

Programs

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

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
Previous Showing 31-40 of 172 results. Next