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

A071635 Number of decompositions of 4*n+2 into sum of two primes of form 4*k+1.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, May 27 2002

Keywords

Comments

For a(m)=0 see A071636.

Examples

			a(10)=2 as 4*10+2 = 42 = 5+37 = (4*1+1)+(4*9+1) = 13+29 = (4*3+1)+(4*7+1) and the other two decompositions 42 = 11+31 = (4*2+3)+(4*7+3) = 19+23 = (4*4+3)+(4*5+3), A002375(21)=4.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{s = 0}, For[p = 3, p <= 2n+1, p = NextPrime[p], If[Mod[p, 4] == 1 && PrimeQ[4n+2-p], s++]]; s];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Dec 17 2021, after Andrew Howroyd *)
  • PARI
    a(n)={my(s=0); forprime(p=3, 2*n+1, if(p%4==1 && isprime(4*n+2-p), s++)); s} \\ Andrew Howroyd, Feb 02 2020

Formula

a(n) = A002375(2*n+1) - A156642(n). - Vladimir Shevelev, Feb 12 2009

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