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.

A145472 Primes p such that (p+7)/2 is prime.

Original entry on oeis.org

3, 7, 19, 31, 67, 79, 127, 139, 151, 199, 211, 271, 307, 379, 439, 547, 607, 619, 691, 727, 739, 751, 787, 811, 859, 907, 919, 967, 991, 1039, 1087, 1231, 1279, 1447, 1459, 1471, 1531, 1567, 1699, 1747, 1759, 1831, 1867, 1987, 2011, 2131, 2179, 2239, 2251
Offset: 1

Views

Author

Artur Jasinski, Oct 11 2008

Keywords

Comments

All these primes are congruent to 3 mod 4 and (with the exception of the first one) to 7 mod 12.

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(2500)| IsPrime((p + 7) div 2)]; // Vincenzo Librandi, Feb 04 2013
    
  • Mathematica
    aa = {}; k = 7; Do[If[PrimeQ[(k + Prime[n])/2], AppendTo[aa, Prime[n]]], {n, 1, 500}];aa
    Select[Prime[Range[400]],PrimeQ[(#+7)/2]&] (* Harvey P. Dale, Jan 11 2020 *)
  • PARI
    list(n)=my(t=1, p, i=1); while(i2&&isprime((7+p)/2), print1(n, ", "))) \\Anders Hellström, Jan 23 2017
    
  • PARI
    list(lim)=my(v=List()); forprime(p=3,lim, if(isprime((p+7)/2), listput(v,p))); Vec(v) \\ Charles R Greathouse IV, Jan 23 2017

A290838 a(n) = smallest prime p such that 2p - 2n + 1 is prime.

Original entry on oeis.org

2, 2, 3, 5, 5, 7, 7, 13, 11, 11, 11, 13, 13, 19, 17, 17, 17, 19, 19, 37, 23, 23, 23, 29, 29, 31, 29, 29, 29, 31, 31, 37, 37, 41, 37, 37, 37, 43, 41, 41, 41, 43, 43, 61, 47, 47, 47, 53, 53, 67, 53, 53, 53, 59, 59, 61, 59, 59, 59, 61, 61, 67, 67, 71, 67, 67, 67, 73
Offset: 0

Views

Author

XU Pingya, Aug 11 2017

Keywords

Comments

a(n) > n. - Iain Fox, Nov 13 2017

Crossrefs

Programs

  • Mathematica
    Table[j=0; found=False; While[!found,j++; found=PrimeQ[2Prime[j]-2n+1] && 2Prime[j]-2n+1>0]; Prime[j],{n,67}]
    (* Second program: *)
    Table[SelectFirst[Prime@ Range[n^2], And[# > 0, PrimeQ@ #] &[2 # - 2 n + 1] &], {n, 67}] (* Michael De Vlieger, Aug 14 2017 *)
  • PARI
    a(n) = {my(p=2); while(!isprime(2*p-2*n+1), p = nextprime(p+1)); p; } \\ Michel Marcus, Aug 12 2017
    
  • PARI
    a(n) = forprime(p=n+1, , if(isprime(2*p - 2*n + 1), return(p))) \\ Iain Fox, Nov 13 2017

Formula

a(-n) = A290839(n+1) - Iain Fox, Dec 14 2017

Extensions

a(0) prepended by Iain Fox, Dec 14 2017
Showing 1-2 of 2 results.