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

A156642 Number of decompositions of 4n+2 into unordered sums of two primes of the form 4k+3.

Original entry on oeis.org

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

Views

Author

Vladimir Shevelev, Feb 12 2009

Keywords

Comments

Conjecture. For n >= 1, a(n) > 0. This conjecture does not follow from the validity of the Goldbach binary conjecture because numbers of the form 4n+2, generally speaking, also have decompositions into sums of two primes of the form 4k+1.

Examples

			From _Lei Zhou_, Mar 19 2013: (Start)
n=1: 4n+2=6, 6=3+3; this is the only case that matches the definition, so a(1)=1;
n=3: 4n+2=14, 14=3+11=7+7; two instances found, so a(3)=2. (End)
		

Crossrefs

Programs

  • Mathematica
    Table[m = 4*n + 2; p1 = m + 1; ct = 0; While[p1 = p1 - 4; p2 = m - p1; p1 >= p2, If[PrimeQ[p1] && PrimeQ[p2], ct++]]; ct, {n, 1, 100}] (* Lei Zhou, Mar 19 2013 *)

A217696 Let p = A002145(n) be the n-th prime of the form 4k+3, then a(n) is the smallest number such that p is the smallest prime of the form 4k+3 for which 4*a(n)+2-p is prime.

Original entry on oeis.org

1, 4, 10, 24, 76, 102, 196, 74, 104, 348, 314, 345, 86, 660, 443, 1494, 914, 1329, 2613, 1635, 1316, 1856, 1688, 2589, 2628, 6423, 3116, 2165, 6320, 4445, 7278, 4743, 16539, 17783, 6084, 3806, 6281, 8946, 15129, 6266, 10976, 19538, 16794, 31160, 32916, 57041
Offset: 1

Views

Author

Lei Zhou, Mar 19 2013

Keywords

Comments

It is conjectured that a(n) is defined for all positive integers.
This is also the index of first occurrence of the n-th prime in the form of 4k+3 in A214834.

Examples

			n=1: the first prime in the form of 4k+3 is 3, 3+3=6=4*1+2, so a(1)=1;
n=2: the second prime in the form of 4k+3 is 7, 7+7=14=3+11=4*3+2, and 11 is also a prime in the form of 4k+3, so a(2)!=3. 7+11=18=4*4+2=3+15, and 15 is not a prime number. So a(2)=4.
		

Crossrefs

Programs

  • Mathematica
    goal = 46; plst = {}; pct = 0; clst = {}; n = -1; While[pct < goal,
    n = n + 4; If[PrimeQ[n], AppendTo[plst, n]; AppendTo[clst, 0];
      pct++]]; n = 2; cct = 0; While[cct < goal, n = n + 4; p1 = n + 1;
    While[p1 = p1 - 4; p2 = n - p1; ! ((PrimeQ[p1]) && (PrimeQ[p2]) && (Mod[p2, 4] == 3))]; If[MemberQ[plst, p2], If[id = Position[plst, p2][[1, 1]]; clst[[id]] == 0, clst[[id]] = (n - 2)/4; cct++]]]; clst
  • PARI
    ok(n,p)=if(!isprime(n-p),return(0));forprime(q=2,p-1,if(q%4==3 && isprime(n-q),return(0)));1
    a(n)=my(p,k); forprime(q=2,,if(q%4==3&&n--==0,p=q;break)); k=(p+1)/4; while(!ok(4*k+2,p),k++); k \\ Charles R Greathouse IV, Mar 19 2013

A217697 a(n) is the smallest positive integer such that 4n+2 can be partitioned into the sum of two primes in the form of 4k+3 in n ways.

Original entry on oeis.org

1, 3, 12, 19, 28, 22, 37, 61, 58, 52, 67, 82, 124, 112, 148, 97, 175, 127, 214, 172, 157, 295, 280, 232, 217, 328, 331, 277, 247, 262, 520, 337, 388, 448, 430, 409, 382, 442, 367, 397, 610, 487, 412, 535, 547, 502, 592, 472, 703, 766, 652, 727, 637, 991, 802
Offset: 1

Views

Author

Lei Zhou, Mar 19 2013

Keywords

Comments

This is also the index of the first occurrence of n in A156642.

Examples

			a(3) = 12 because 50 = 4*12 + 2 is the smallest number of the form 4m + 2 which can be expressed as a sum of 2 primes of the form 4k + 3 in 3 ways (3 + 47, 7 + 43, and 19 + 31).
a(3) = 12 because A156642(12) = 3 while for 0<=n<12, A156642(n) < 3.
		

Crossrefs

Programs

  • Mathematica
    goal = 56; a = {}; Do[AppendTo[a, 0], {n, 1, goal}]; found = 0; k = 0; While[found < goal, k++; m = 4*k + 2; p1 = m + 1; ct = 0;
    While[p1 = p1 - 4; p2 = m - p1; p1 >= p2, If[PrimeQ[p1] && PrimeQ[p2], ct++]]; If[ct <= goal, If[a[[ct]] == 0, a[[ct]] = k; found++]]]; a
Showing 1-3 of 3 results.