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

A103153 a(n) is the smallest odd prime p such that 2*n+1 = 2*p + A000040(k) for some k>1, or 0 if no such prime exists.

Original entry on oeis.org

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

Views

Author

Lei Zhou, Feb 09 2005

Keywords

Examples

			For n < 4 there are no such primes, thus a(1)-a(3)=0. For n=4, 2*4+1 = 9 = 2*3+3, thus a(4)=3. For n=7, 2*7+1 = 15 = 2*5+5, thus a(7)=7.
		

Crossrefs

a(n)=0 if A103507(n)=0, otherwise A000040(A103507(n)).
Cf. A195352 (similar definition, but p=2 is allowed).

Programs

  • Mathematica
    Do[m = 3; While[ ! (PrimeQ[m] && ((n - 2*m) > 2) && PrimeQ[n - 2*m]), m = m + 2]; Print[m], {n, 9, 299, 2}]
  • Scheme
    (define (A103153 n) (let ((ind (A103507 n))) (if (zero? ind) 0 (A000040 ind))))

Extensions

Edited and Scheme code added by Antti Karttunen, Jun 19 2007
Definition corrected by Hugo Pfoertner, Sep 16 2011

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:

A195353 Odd numbers n>5 in the representation n=2*p+q, p, q prime, q maximal, at which a larger p than for any smaller n is needed. A195354 gives values of p.

Original entry on oeis.org

7, 13, 31, 91, 451, 539, 1397, 1417, 1777, 3139, 14419, 39751, 77507, 96157, 158173, 214979, 263113, 496723, 1046179, 3415297, 3546371, 4306549, 9456677, 18338311, 45521269, 243377803, 766707661, 1023263789, 8032822531, 92635306249, 151318414531, 352799777983
Offset: 1

Views

Author

Hugo Pfoertner, Sep 16 2011

Keywords

Comments

2*(Positions of records in A195352) + 1.
Checked up to n = 10^13.

Examples

			a(3)=31 because it is the first number for which the representation n=2*p+q needs a larger value of p than for all smaller odd numbers. 31=2*7+17, whereas all smaller odd n can be expressed using p=2 or p=3.
		

References

Crossrefs

Cf. A195352, A195354 (records of p), A194828 (similar, but looking for records of q with p maximized)

Extensions

a(36)-a(41) from Hugo Pfoertner, Sep 26 2011

A195354 Records of primes p in the representation of odd n>5 by n=2*p+q, p, q prime, q maximal. A195353 gives the values of n at which an increase of p is required.

Original entry on oeis.org

2, 3, 7, 19, 31, 41, 47, 67, 79, 139, 181, 229, 233, 277, 307, 383, 421, 463, 619, 643, 659, 691, 743, 967, 1231, 1483, 1609, 1931, 2389, 2719, 2791, 2953, 2971, 3079, 3121, 3217, 3301, 3319, 3617, 3719, 3767
Offset: 1

Views

Author

Hugo Pfoertner, Sep 16 2011

Keywords

Comments

Values of records in A195352. Related to Lemoine's conjecture. Due to the large number of possible representations (A046927) it is both possible to represent n=2*p+q with q<
Checked up to n=10^13.

References

Crossrefs

Extensions

a(36)-a(41) from Hugo Pfoertner, Sep 26 2011
Showing 1-4 of 4 results.