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

A219252 Smallest prime q such that 2*n+1 = p + 4*q for some odd prime p, otherwise 0 if no such q exists.

Original entry on oeis.org

0, 0, 0, 0, 2, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 5, 3, 2, 2, 3, 3, 2, 7, 2, 2, 3, 2, 5, 3, 2, 5, 3, 2, 2, 3, 3, 2, 0, 2, 2, 3, 3, 2, 7, 2, 5, 3, 2, 5, 3, 5, 2, 7, 2, 2, 3, 2, 2, 3, 2, 5, 3, 5, 5, 7, 5, 2, 7, 2, 7, 3, 2, 2, 3, 3, 11, 7, 2, 2, 3, 3, 2, 7, 3, 2, 19, 2, 5, 3, 2
Offset: 1

Views

Author

Michel Lagneau, Apr 11 2013

Keywords

Comments

a(38) = 0.
Conjecture: except m = 77, all odd number > 9 are of the form m = p + 4*q where p and q are prime numbers.

Examples

			3 + 4*2 = 11 => a(5) = 2;
5 + 4*2 = 13 => a(6) = 2;
7 + 4*2 = 15 => a(7) = 2;
5 + 4*3 = 17 => a(8) = 3.
		

Crossrefs

Programs

  • Maple
    for n from 11 by 2 to 200 do:jj:=0:for j from 1 to 1000 while (jj=0) do:q:=ithprime(j):p:=n-4*q:if p> 0 and type(p,prime)=true  then jj:=1:printf(`%d, `,q):else fi:od:if jj=0 then printf(`%d, `,0):else fi:od:

A219604 Smallest prime p such that 2n+1 = 4q + p for some odd prime q, or 0 if no such prime exists.

Original entry on oeis.org

0, 0, 0, 0, 3, 5, 3, 5, 7, 13, 3, 5, 7, 17, 3, 5, 7, 17, 11, 13, 23, 17, 3, 5, 7, 41, 3, 5, 7, 17, 11, 13, 23, 17, 3, 5, 7, 0, 3, 5, 7, 17, 11, 13, 23, 17, 3, 5, 7, 73, 11, 13, 31, 17, 19, 37, 23, 41, 3, 5, 7, 73, 3, 5, 7, 17, 11, 13, 23, 17, 19, 29, 23, 73, 3
Offset: 1

Views

Author

Michel Lagneau, Apr 12 2013

Keywords

Comments

a(38) = 0.
Conjecture: except m = 77, all odd numbers > 9 are of the form m = p + 4*q where p and q are prime numbers.

Crossrefs

Programs

  • Maple
    for n from 11 by 2 to 200 do:jj:=0:for j from 1 to 1000 while (jj=0) do:p:=ithprime(j):q:=(n-p)/4:if q> 0 and type(q,prime)=true  then jj:=1:printf(`%d, `,p):else fi:od:if jj=0 then printf(`%d, `,0):else fi:od:
  • Mathematica
    Table[m=3;While[!(PrimeQ[m]&&(((2*n+1-m)/4)>1)&&PrimeQ[(2*n+1-m)/4]),m=m+2];Print[n," ",m],{n,5,200}]

A223174 Smallest prime p such that 2n+1 = p + 8*q for some odd prime q, or 0 if no such prime exists.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 5, 7, 0, 3, 5, 7, 17, 11, 13, 23, 17, 3, 5, 7, 0, 11, 13, 31, 17, 3, 5, 7, 41, 11, 13, 31, 17, 19, 37, 23, 41, 43, 29, 31, 73, 3, 5, 7, 41, 11, 13, 47, 17, 3, 5, 7, 73, 11, 13, 31, 17, 19, 37, 23, 41, 43, 29, 31, 97, 3, 5, 7, 41
Offset: 0

Views

Author

Michel Lagneau, May 09 2013

Keywords

Comments

For n > 8, a(12) = a(24) = 0.
The corresponding q = 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 3, 3, 3, 2, 3, 3, 2, 3, 5, 5, 5, 0, 5, 5, 3, 5, 7, 7, 7,... are not always the minimum values. The smallest primes q are in A223175.
Conjecture: except m = 25 and 49, all odd numbers > 17 are of the form m = p + 8*q where p and q are prime numbers.

Examples

			a(14) = 5 because, for p=5 the corresponding q=3 and 5+8*3 = 29 is prime.
		

Crossrefs

Programs

  • Maple
    for n from 1 by 2 to 200 do:jj:=0:for j from 1 to 1000 while (jj=0) do:p:=ithprime(j):q:=(n-p)/8:if q> 0 and type(q,prime)=true  then jj:=1:printf(`%d, `,p):else fi:od:if jj=0 then printf(`%d, `,0):else fi:od:

A223175 Smallest prime q such that 2n+1 = p + 8*q for some odd prime p, or 0 if no such prime exists.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 2, 2, 3, 2, 2, 3, 2, 3, 3, 2, 2, 0, 5, 2, 3, 2, 2, 3, 2, 3, 3, 2, 3, 7, 2, 2, 7, 5, 2, 3, 2, 2, 3, 5, 2, 3, 2, 5, 3, 2, 3, 7, 5, 2, 7, 2, 2, 3, 2, 2, 3, 2, 3, 3, 7, 3, 7, 5, 2, 7, 2, 5, 3, 2, 2, 7, 7, 3, 3, 2, 2, 7, 5, 2
Offset: 0

Views

Author

Michel Lagneau, May 09 2013

Keywords

Comments

For n > 8, a(12) = a(24) = 0.
The corresponding p: 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 5, 7, 0, 11, 13, 7, 17, 19, 13, 23, 17, 19, 29, 31, 0, 11,... are not always the minimum values. The smallest primes p are in A223174.
Conjecture: except m = 25 and 49, all odd numbers > 17 are of the form m = p + 8*q where p and q are prime numbers.

Examples

			a(14) = 2 because, for q=2 the corresponding p=13 and 13+8*2 = 29 is prime.
		

Crossrefs

Programs

  • Maple
    for n from 1 by 2 to 200 do:jj:=0:for j from 1 to 1000 while (jj=0) do:q:=ithprime(j):p:=n-8*q:if p> 0 and type(p, prime)=true  then jj:=1:printf(`%d, `, q):else fi:od:if jj=0 then printf(`%d, `, 0):else fi:od:

A220187 Smallest integer m such that number of representations of 2 m + 1 as p + 4 q is n, with p, q primes.

Original entry on oeis.org

5, 9, 12, 24, 37, 43, 40, 67, 88, 97, 109, 127, 145, 160, 199, 157, 217, 316, 262, 232, 220, 277, 307, 352, 388, 451, 397, 427, 568, 412, 562, 367, 556, 532, 472, 652, 724, 697, 637, 667, 808, 757, 871, 577, 682, 1081, 1264, 967, 787, 952, 1057, 907, 1087, 1117, 1012, 1102, 1333, 1147, 1252, 892, 1543, 997, 1342, 1237, 1327
Offset: 1

Views

Author

Zak Seidov, Apr 13 2013

Keywords

Examples

			a(2) = 9 because 19 = 7 + 4*3 = 11 + 4*2 (2 representations),
a(3) = 12 because 25 = 5 + 4*5 = 13 + 4*3 = 17 + 4*2 (3 representations).
		

Crossrefs

Cf. A219254 Number of representations of 2n+1 as p+4q.

A225518 Number of ways to express 2n+1 as p + 8*q, with p and q primes.

Original entry on oeis.org

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

Views

Author

Michel Lagneau, May 09 2013

Keywords

Comments

This is related to the conjecture given in A223174 and A223175.
For n > 8, a(12) = a(24) = 0 because A223174(12)= A223174(24)= 0.

Examples

			a(14) = 2 because 29 = 5+8*3 = 13+8*2 with 2 decompositions.
a(23) = 3 because 47 = 7+8*5 = 23+8*3 = 31+8*2 with 3 decompositions.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := (ways = 0; Do[p = 2k + 1; q = (n-k)/4; If[PrimeQ[p] && PrimeQ[q], ways++], {k, 1, n}]; ways); Table[a[n], {n, 0, 90}]
Showing 1-6 of 6 results.