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.

A158708 Primes p such that p + floor(p/2) is prime.

Original entry on oeis.org

2, 5, 13, 29, 41, 53, 73, 101, 109, 149, 181, 233, 281, 293, 349, 401, 409, 421, 449, 461, 541, 569, 613, 661, 673, 701, 709, 769, 809, 821, 853, 881, 953, 1021, 1033, 1109, 1129, 1193, 1201, 1249, 1289, 1301, 1409, 1429, 1453, 1481, 1493, 1669, 1693, 1789
Offset: 1

Views

Author

Keywords

Comments

Apart from the first term, primes of the form 4n+1 such that 6n+1 is also prime. [Charles R Greathouse IV, Nov 09 2011]

Programs

  • Magma
    [p: p in PrimesUpTo(1800) | IsPrime(p+ (p div 2))]; // Vincenzo Librandi, Apr 15 2013
  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[Floor[p/2]+p],AppendTo[lst,p]],{n,6!}];lst
    Select[Prime[Range[300]], PrimeQ[Floor[# / 2] + #]&] (* Vincenzo Librandi, Apr 15 2013 *)
  • PARI
    forprime(p=2,1e4,if(isprime(p+p\2),print1(p", "))) \\ Charles R Greathouse IV, Nov 09 2011
    
  • PARI
    print1(2);forprime(p=3,1e4,if(p%4==1&&isprime(p\4*6+1),print1(", "p))) \\ Charles R Greathouse IV, Nov 09 2011