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 21-30 of 172 results. Next

A000954 Conjecturally largest even integer which is an unordered sum of two primes in exactly n ways.

Original entry on oeis.org

2, 12, 68, 128, 152, 188, 332, 398, 368, 488, 632, 692, 626, 992, 878, 908, 1112, 998, 1412, 1202, 1448, 1718, 1532, 1604, 1682, 2048, 2252, 2078, 2672, 2642, 2456, 2936, 2504, 2588, 2978, 3092, 3032, 3218, 3272, 3296, 3632, 3548, 3754, 4022, 4058, 4412
Offset: 0

Views

Author

Keywords

Comments

The Goldbach conjecture is that every even number is the sum of two primes.

Examples

			2 is largest even integer which is the sum of two primes in 0 ways, 12 is largest even integer which is the unordered sum of two primes in 1 way (5+7), etc.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{c = 0, k = 3}, While[k <= n/2, If[PrimeQ[k] && PrimeQ[n - k], c++ ]; k++ ]; c]; a = Table[0, {50}]; a[[1]] = 2; a[[2]] = 4; Do[m = n; b = f[n]; If[b < 100, a[[b + 1]] = n], {n, 6, 20000, 2}] (* Robert G. Wilson v, Dec 20 2003 *)

A067191 Numbers that can be expressed as the sum of two primes in exactly five ways.

Original entry on oeis.org

48, 54, 64, 70, 74, 76, 82, 86, 94, 104, 124, 136, 148, 158, 164, 188
Offset: 1

Views

Author

Amarnath Murthy, Jan 10 2002

Keywords

Comments

There are no other terms below 10000 and I conjecture there are no further terms in this sequence and A067188, A067189, etc. - Peter Bertok (peter(AT)bertok.com), Jan 13 2002
I believe that these conjectures follow from a more general one by Hardy and Littlewood (probably in Some problems of 'partitio numerorum' III, on the expression of a number as a sum of primes, Acta Math. 44(1922) 1-70). - R. K. Guy, Jan 14 2002
There are no further terms through 50000. - David Wasserman, Jan 15 2002

Examples

			70 is a term as 70 = 67 + 3 = 59 + 11 = 53 + 17 = 47 + 23 41 + 29 are all the five ways to express 70 as a sum of two primes.
		

Crossrefs

Numbers that can be expressed as the sum of two primes in k ways for k=0..10: A014092 (k=0), A067187 (k=1), A067188 (k=2), A067189 (k=3), A067190 (k=4), this sequence (k=5), A066722 (k=6), A352229 (k=7), A352230 (k=8), A352231 (k=9), A352233 (k=10).

Programs

  • Mathematica
    upperbound=10^4; range=ConstantArray[0,2*upperbound];
    primeRange=Prime[Range[PrimePi[upperbound]]];
    (range[[Plus@@#]]++)&/@(DeleteDuplicates[Sort[#]&/@Tuples[primeRange,2]]);{"upperbound="<>ToString[upperbound],Flatten[Position[Take[range,upperbound],5]]} (* Hans Rudolf Widmer, Jul 06 2021 *)

Extensions

Corrected and extended by Peter Bertok (peter(AT)bertok.com), Jan 13 2002

A071335 Number of partitions of n into sum of at most three primes.

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 3, 2, 3, 3, 3, 3, 4, 3, 4, 4, 5, 4, 5, 4, 6, 5, 6, 6, 6, 6, 7, 5, 8, 5, 8, 5, 10, 6, 8, 8, 10, 6, 11, 5, 12, 7, 12, 7, 13, 7, 14, 9, 13, 9, 15, 7, 17, 8, 15, 8, 17, 7, 17, 10, 18, 9, 20, 8, 21, 11, 21, 8, 21, 7, 23, 11, 23, 11, 23, 10, 28, 12, 25, 11, 26
Offset: 1

Views

Author

Reinhard Zumkeller, May 19 2002

Keywords

Comments

a(n) = A010051(n) + A061358(n) + A068307(n). [From Reinhard Zumkeller, Aug 08 2009]

Examples

			a(21)=6 as 21 = 2+19 = 2+2+17 = 3+5+13 = 3+7+11 = 5+5+11 = 7+7+7.
		

Crossrefs

Programs

  • Mathematica
    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}] (* Frank M Jackson, Mar 25 2013 *)
    Table[Length[Select[IntegerPartitions[n,3],AllTrue[#,PrimeQ]&]],{n,90}] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Oct 21 2016 *)

A116979 Number of distinct representations of primorials as the sum of two primes.

Original entry on oeis.org

0, 0, 1, 3, 19, 114, 905, 9493, 124180, 2044847, 43755729, 1043468386, 30309948241
Offset: 0

Views

Author

Jonathan Vos Post, Apr 01 2006

Keywords

Comments

Related to Goldbach's conjecture. Let g(2n) = A002375(n). The primorials produce maximal values of the function g in the following sense: the basic shape of the function g is k*x/log(x)^2 and each primorial requires a larger value of k than the previous one. - T. D. Noe, Apr 28 2006
Relates also to a more generic problem of how many numbers there are such that their arithmetic derivative is equal to the n-th primorial number. See A351029. - Antti Karttunen, Jan 17 2024

Examples

			a(2) = 1 because 2nd primorial = 6 = 3 + 3 uniquely.
a(3) = 3 because 3rd primorial = 30 = 7 + 23 = 11 + 19 = 13 + 17.
a(4) = 19 because 4th primorial = 210 = 11 + 199 = 13 + 197 = 17 + 193 = 19 + 191 = 29 + 181 = 31 + 179 = 37 + 173 = 43 + 167 = 47 + 163 = 53 + 157 = 59 + 151 = 61 + 149 = 71 + 139 = 73 + 137 = 79 + 131 = 83 + 127 = 97 + 113 = 101 + 109 = 103 + 107.
		

Crossrefs

Cf. A002375 (number of decompositions of 2n into unordered sums of two odd primes).

Programs

  • Mathematica
    n=1; Join[{0,0}, Table[n=n*Prime[k]; cnt=0; Do[If[PrimeQ[2n-Prime[i]],cnt++ ], {i,2,PrimePi[n]}]; cnt, {k,2,10}]] (* T. D. Noe, Apr 28 2006 *)

Formula

a(n) = #{p(i) + p(j) = A002110(n) for p(k) = A000040(k) and i >= j}.
a(n) = A351029(n) - A369000(n). - Antti Karttunen, Jan 17 2024

Extensions

More terms from T. D. Noe, Apr 28 2006
a(11)-a(12) from Donovan Johnson, Dec 19 2009

A199920 Number of ways to write n = p+k with p, p+6, 6k-1 and 6k+1 all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 22 2012

Keywords

Comments

Conjecture: a(n)>0 for all n>11.
This implies that there are infinitely many twin primes and also infinitely many sexy primes. It has been verified for n up to 10^9. See also A199800 for a weaker version of this conjecture.
Zhi-Wei Sun also conjectured that any integer n>6 not equal to 319 can be written as p+k with p, p+6, 3k-2+(n mod 2) and 3k+2-(n mod 2) all prime.

Examples

			a(21)=1 since 21=11+10 with 11, 11+6, 6*10-1 and 6*10+1 all prime.
		

Crossrefs

Programs

A218867 Number of prime pairs {p,q} with p>q and {p-4,q+4} also prime such that p+(1+(n mod 6))q=n if n is not congruent to 4 (mod 6), and p-q=n and q

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 13 2012

Keywords

Comments

Conjecture: a(n)>0 for all n>50000 with n different from 50627, 61127, 66503.
This conjecture implies that there are infinitely many cousin prime pairs. It is similar to the conjectures related to A219157 and A219055.

Examples

			a(20)=1 since 20=11+3*3 with 11-4 and 3+4 prime. a(28)=1 since 28=41-13 with 41-4 and 13+4 prime.
		

Crossrefs

Programs

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

A219157 Number of prime pairs {p,q} with p>q and p-2,q+2 also prime such that p+(1+mod(-n,6))q=n if n is not congruent to 2 mod 6, and p-q=n and q

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 12 2012

Keywords

Comments

Conjecture: a(n)>0 for all n>30000 with n different from 38451, 46441, 50671, 62371.
This conjecture is stronger than the twin prime conjecture. It is similar to the conjecture associated with A219055 about sexy prime pairs.

Examples

			a(16)=1 since 16=7+3*3 with 7-2 and 3+2 prime. a(26)=1 since 26=31-5 with 31-2 and 5+2 prime.
		

Crossrefs

Programs

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

A219185 Number of prime pairs {p,q} (p>q) with 3(p-q)-1 and 3(p-q)+1 both prime such that p+(1+(n mod 2))q=n.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 13 2012

Keywords

Comments

Conjecture: a(n)>0 for all odd n>4676 and even n>30986.
This conjecture has been verified for n up to 5*10^7. It implies Goldbach's conjecture, Lemoine's conjecture and the twin prime conjecture.

Examples

			a(11)=1 since 11=5+2*3, and both 3(5-3)-1=5 and 3(5-3)+1=7 are prime.
a(16)=2 since 16=11+5=13+3, and 3(11-5)-1, 3(11-5)+1, 3(13-3)-1, 3(13-3)+1 are all prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=a[n]=Sum[If[PrimeQ[n-(1+Mod[n,2])Prime[k]]==True&&PrimeQ[3(n-(2+Mod[n,2])Prime[k])-1]==True&&PrimeQ[3(n-(2+Mod[n,2])Prime[k])+1]==True,1,0],
    {k,1,PrimePi[(n-1)/(2+Mod[n,2])]}]
    Do[Print[n," ",a[n]],{n,1,100000}]
  • PARI
    a(n)=if(n%2, aOdd(n), aEven(n))
    aOdd(n)=my(s); forprime(q=2,(n-1)\3, my(p=n-2*q); if(isprime(n-2*q) && isprime(3*n-9*q-1) && isprime(3*n-9*q+1), s++)); s
    aEven(n)=my(s); forprime(q=2,n/2, if(isprime(n-q) && isprime(3*n-6*q-1) && isprime(3*n-6*q+1), s++)); s
    \\ Charles R Greathouse IV, Jul 31 2016

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 24 2013

Keywords

Comments

Note that this sequence is different from A232443.
Conjecture: a(n) > 0 for all n > 3. Also, a(n) = 1 only for n = 4, 5, 6, 7, 9, 10, 11, 12, 15, 16, 28, 35.

Examples

			a(10) = 1 since 10 = 7 + 7 - pi(7), and 7 is an odd prime not exceeding 10.
a(11) = 1 since 11 = 5 + 11 - pi(11), and 5 and 11 are odd primes not exceeding 11.
a(15) = 1 since 15 = 13 + 5 - pi(5), and 13 and 5 are odd primes not exceeding 15.
a(28) = 1 since 28 = 17 + 19 - pi(19), and 17 and 19 are odd primes not exceeding 28.
a(35) = 1 since 35 = 29 + 11 - pi(11), and 29 and 11 are odd primes not exceeding 35.
		

Crossrefs

Programs

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

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 06 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 2, and a(n) = 1 only for n = 3, 6, 13, 16, 19, 28, 34, 40, 61, 166, 278.
This is stronger than Goldbach's conjecture.
The conjecture is true for n <= 5*10^8. - Dmitry Kamenetsky, Mar 13 2020

Examples

			a(13) = 1 since 2*13 = 3 + 23 with 3, 23 and A000720(3) = 2 all prime.
a(278) = 1 since 2*278 = 509 + 47 with 509, 47 and A000720(509) = 97 all prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[2n-Prime[Prime[k]]],1,0],{k,1,PrimePi[PrimePi[2n-1]]}]
    Table[a[n],{n,1,80}]
Previous Showing 21-30 of 172 results. Next